diff --git a/src/bspline_sub_module.f90 b/src/bspline_sub_module.f90 index 145f210..37ff162 100644 --- a/src/bspline_sub_module.f90 +++ b/src/bspline_sub_module.f90 @@ -58,6 +58,9 @@ end function b1fqad_func end interface public :: b1fqad_func + integer(ip),parameter,public :: bspline_order_linear = 2_ip !! spline order `k` parameter + !! (for input to the `db*ink` routines) + !! [order = polynomial degree + 1] integer(ip),parameter,public :: bspline_order_quadratic = 3_ip !! spline order `k` parameter !! (for input to the `db*ink` routines) !! [order = polynomial degree + 1] diff --git a/test/bspline_linear_test.f90 b/test/bspline_linear_test.f90 index fbb474b..26064ef 100644 --- a/test/bspline_linear_test.f90 +++ b/test/bspline_linear_test.f90 @@ -39,11 +39,11 @@ program bspline_linear_test iloy = 1 ! initialize - call b2%initialize(x,fcn_1d,2,iflag,extrap=.true.) ! linear + call b2%initialize(x,fcn_1d,bspline_order_linear,iflag,extrap=.true.) ! linear if (iflag/=0) error stop 'Error initializing 1D linear spline: '//get_status_message(iflag) - call b3%initialize(x,fcn_1d,3,iflag,extrap=.true.) ! quadratic + call b3%initialize(x,fcn_1d,bspline_order_quadratic,iflag,extrap=.true.) ! quadratic if (iflag/=0) error stop 'Error initializing 1D quadratic spline: '//get_status_message(iflag) - call b4%initialize(x,fcn_1d,4,iflag,extrap=.true.) ! cubic + call b4%initialize(x,fcn_1d,bspline_order_cubic,iflag,extrap=.true.) ! cubic if (iflag/=0) error stop 'Error initializing 1D cubic spline: '//get_status_message(iflag) call s1%initialize(x,fcn_1d,iflag) if (iflag/=0) error stop 'Error initializing 1D linear interpolator'