Another spline implementation logistics
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Libpspio |
Invalid
|
Undecided
|
Unassigned |
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 to 1 if you have GSL support.])
CPPFLAGS=
LIBS=
if test "${enable_fortran}" = "yes"; then
FCFLAGS=
fi
else
AC_ERROR([GSL support does not work])
fi
AC_DEFINE(
[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_
int ierr;
ierr = gsl_spline_
if ( ierr ) {
RETURN_
}
break;
#elif HAVE_JB_SPLINE
case PSPIO_INTERP_
//Not yet implemented
#else
default:
RETURN_
#endif
}
Let me know if this sounds good!
Changed in libpspio: | |
status: | New → Invalid |
In the code itself last #else should be omitted in order to get NOT_IMPLEMENTED case:
switch ((*interp)->method) { GSL_CSPLINE: init((* interp) ->gsl_spl, mesh->r, f, mesh->np); WITH_ERROR( PSPIO_EGSL ); JB_CSPLINE: WITH_ERROR( PSPIO_ENOSUPPOR T);
#ifdef HAVE_GSL
case PSPIO_INTERP_
int ierr;
ierr = gsl_spline_
if ( ierr ) {
RETURN_
}
break;
#elif HAVE_JB_SPLINE
case PSPIO_INTERP_
//Not yet implemented
#endif
default:
RETURN_
}
OK, I think now it would work.