libpspio-developers team mailing list archive
-
libpspio-developers team
-
Mailing list archive
-
Message #00043
[Bug 1349168] Re: Another spline implementation logistics
The idea is that JB splines will always be compiled and availlable, so
that when GSL is also present one can choose between them at runtime.
That is why there is no HAVE_JB_SPLINE macro, as it will always be true.
--
You received this bug notification because you are a member of Libpspio
Developers, which is subscribed to Libpspio.
https://bugs.launchpad.net/bugs/1349168
Title:
Another spline implementation logistics
Status in Libpspio pseudopotential I/O library:
New
Bug description:
To introduce JB spline I though there is a need of another constant
definition (HAVE_JB_SPLINE) in configure.ac:
# GNU Scientific Library (optional)
if test "${enable_gsl}" = "yes"; then
PIO_CHECK_GSL
if test "${pio_gsl_ok}" = "yes"; then
AC_DEFINE([HAVE_GSL], 1,
[Define to 1 if you have GSL support.])
CPPFLAGS="${CPPFLAGS} ${pio_gsl_incs}"
LIBS="${pio_gsl_libs} ${LIBS}"
if test "${enable_fortran}" = "yes"; then
FCFLAGS="${FCFLAGS} ${pio_gsl_incs}"
fi
else
AC_ERROR([GSL support does not work])
fi
AC_DEFINE([HAVE_JB_SPLINE], 1,
[Define to 1 if you have JB spline support.])
fi
Than in the interpolation.c an example would be:
switch ((*interp)->method) {
#ifdef HAVE_GSL
case PSPIO_INTERP_GSL_CSPLINE:
int ierr;
ierr = gsl_spline_init((*interp)->gsl_spl, mesh->r, f, mesh->np);
if ( ierr ) {
RETURN_WITH_ERROR( PSPIO_EGSL );
}
break;
#elif HAVE_JB_SPLINE
case PSPIO_INTERP_JB_CSPLINE:
//Not yet implemented
#else
default:
RETURN_WITH_ERROR(PSPIO_ENOSUPPORT);
#endif
}
Let me know if this sounds good!
To manage notifications about this bug go to:
https://bugs.launchpad.net/libpspio/+bug/1349168/+subscriptions
References