18 #include "sll_working_precision.h"
19 #include "sll_memory.h"
20 #include "sll_assert.h"
27 sll_int32 :: num_points
31 procedure, pass(interpolator) :: initialize => &
33 procedure :: compute_interpolants => null_fd_1d_array_msg
34 procedure :: interpolate_from_interpolant_value => null_fd_1d_arg_msg
39 procedure :: interpolate_from_interpolant_derivative_eta1 => null_fd_1d_arg_msg
40 procedure :: interpolate_from_interpolant_array => null_fd_1d_array_sub
41 procedure :: interpolate_pointer_values => null_fd_1d_ptr_sub
42 procedure :: interpolate_from_interpolant_derivatives_eta1 => null_fd_1d_array_sub
43 procedure :: interpolate_pointer_derivatives => &
45 procedure, pass :: interpolate_array => null_fd_1d_interp_array
46 procedure, pass :: reconstruct_array => null_fd_1d_reconstruct
47 procedure, pass :: interpolate_array_disp => null_fd_1d_array_disp
58 sll_int32,
intent(in) :: num_points
59 sll_real64,
intent(in) :: delta
60 interpolator%num_points = num_points
61 interpolator%delta = delta
62 interpolator%r_delta = 1.0_f64/delta
68 vals_to_interpolate, &
72 sll_int32,
intent(in) :: num_pts
75 sll_real64,
dimension(:),
pointer :: vals_to_interpolate
76 sll_real64,
dimension(:),
pointer :: output
79 sll_real64,
dimension(:),
pointer :: dptr
81 sll_assert(
size(vals_to_interpolate) >= num_pts)
82 sll_assert(
size(output) >= num_pts)
84 r_delta = interpolator%r_delta
87 output(1) = r_delta*(-1.5_f64*vals_to_interpolate(1) + &
88 2.0_f64*vals_to_interpolate(2) - &
89 0.5_f64*vals_to_interpolate(3))
93 output(i) = 0.5_f64*r_delta*(vals_to_interpolate(i + 1) - &
94 vals_to_interpolate(i - 1))
98 output(num_pts) = r_delta*(0.5_f64*vals_to_interpolate(num_pts - 2) - &
99 2.0_f64*vals_to_interpolate(num_pts - 1) + &
100 1.5_f64*vals_to_interpolate(num_pts))
Finite differences implementation of sll_c_interpolator_1d.
subroutine finite_difference_1d_interp_derivatives(interpolator, num_pts, vals_to_interpolate, output)
subroutine initialize_finite_difference_1d_interp(interpolator, num_points, delta)
Module for 1D interpolation and reconstruction.
Finite differences implementation of 1d interpolator.
Abstract class for 1D interpolation and reconstruction.