8 #include "sll_assert.h"
9 #include "sll_errors.h"
10 #include "sll_memory.h"
11 #include "sll_working_precision.h"
84 eta_hermite_continuity, &
86 const_eta_min_slope, &
87 const_eta_max_slope, &
93 sll_int32,
intent(in) :: npts
94 sll_real64,
intent(in) :: eta_min
95 sll_real64,
intent(in) :: eta_max
96 sll_int32,
intent(in) :: degree
97 sll_int32,
intent(in) :: eta_hermite_continuity
98 sll_int32,
intent(in) :: eta_bc_type
99 sll_real64,
intent(in),
optional :: const_eta_min_slope
100 sll_real64,
intent(in),
optional :: const_eta_max_slope
101 sll_real64,
dimension(:),
intent(in),
optional :: eta_min_slopes
102 sll_real64,
dimension(:),
intent(in),
optional :: eta_max_slopes
105 sll_allocate(interpolator, ierr)
107 interpolator%npts = npts
109 call interpolator%init( &
114 eta_hermite_continuity, &
116 const_eta_min_slope, &
117 const_eta_max_slope, &
129 eta_hermite_continuity, &
131 const_eta_min_slope, &
132 const_eta_max_slope, &
137 sll_int32,
intent(in) :: npts
138 sll_real64,
intent(in) :: eta_min
139 sll_real64,
intent(in) :: eta_max
140 sll_int32,
intent(in) :: degree
141 sll_int32,
intent(in) :: eta_hermite_continuity
142 sll_int32,
intent(in) :: eta_bc_type
143 sll_real64,
intent(in),
optional :: const_eta_min_slope
144 sll_real64,
intent(in),
optional :: const_eta_max_slope
145 sll_real64,
dimension(:),
intent(in),
optional :: eta_min_slopes
146 sll_real64,
dimension(:),
intent(in),
optional :: eta_max_slopes
153 eta_hermite_continuity, &
155 const_eta_min_slope, &
156 const_eta_max_slope, &
168 sll_real64,
dimension(:),
intent(in) :: data_array
169 sll_real64,
dimension(:),
intent(in),
optional :: eta_coords
170 sll_int32,
intent(in),
optional :: size_eta_coords
172 if (
present(eta_coords) .or.
present(size_eta_coords))
then
173 sll_error(
'wrap_compute_interpolants_hermite_1d',
'This case is not yet implemented')
183 sll_real64,
intent(in) :: eta1
195 sll_int32,
intent(in) :: num_pts
196 sll_real64,
dimension(num_pts),
intent(in) :: coordinates
197 sll_real64,
dimension(:),
intent(in) ::
data
198 sll_real64,
dimension(num_pts),
intent(out) :: output_array
202 output_array(i) = this%interpolate_from_interpolant_value(coordinates(i))
208 sll_real64,
intent(in) :: alpha
209 sll_int32,
intent(in) :: num_pts
210 sll_real64,
dimension(:),
intent(in) ::
data
211 sll_real64,
dimension(1:num_pts),
intent(out) :: output_array
215 print *,
'interpolate_array_disp_hi1d:', &
216 ' not implemented for hermite interpolation'
217 sll_assert(this%npts > 0)
218 output_array = 0.0_f64*alpha +
data
224 sll_real64,
intent(in) :: alpha
225 sll_int32,
intent(in) :: num_pts
226 sll_real64,
dimension(num_pts),
intent(inout) ::
data
230 print *,
'interpolate_array_disp_inplace_hi1d:', &
231 ' not implemented for hermite interpolation'
232 sll_assert(this%npts > 0)
247 vals_to_interpolate, &
250 sll_int32,
intent(in) :: num_pts
251 sll_real64,
dimension(num_pts),
intent(in) :: vals_to_interpolate
252 sll_real64,
dimension(num_pts),
intent(out) :: output_array
254 output_array = 0.0_f64
255 print *,
'interpolate_from_interpolant_array:', &
256 ' not implemented for hermite interpolation'
258 print *, maxval(vals_to_interpolate)
259 output_array = 0._f64
262 sll_assert(interpolator%npts > 0)
268 vals_to_interpolate, &
271 sll_int32,
intent(in) :: num_pts
272 sll_real64,
dimension(:),
intent(in) :: vals_to_interpolate
273 sll_real64,
dimension(:),
intent(out) :: output_array
275 output_array = 0.0_f64
276 print *,
'interpolate_from_interpolant_derivatives_eta1: ', &
277 'not implemented for hermite interpolation'
279 print *, maxval(vals_to_interpolate)
280 print *, maxval(output_array)
283 sll_assert(interpolator%npts > 0)
289 sll_real64,
intent(in) :: eta1
290 print *,
'interpolate_derivative_eta1_hi1d: ', &
291 'not implemented for hermite interpolation'
296 sll_assert(interpolator%npts > 0)
355 sll_real64,
dimension(:),
intent(in),
optional :: coeffs
356 print *,
'set_coefficients_hi1d(): ERROR: This function has not been ', &
358 if (
present(coeffs))
then
359 print *,
'#coeffs present but not used'
363 sll_assert(interpolator%npts > 0)
370 print *,
'get_coefficients_hi1d(): ERROR: This function has not been ', &
372 sll_assert(interpolator%npts > 0)
real(kind=f64) function, public sll_f_interpolate_value_hermite_1d(eta, interp)
type(sll_t_hermite_interpolation_1d) function, pointer, public sll_f_new_hermite_interpolation_1d(npts, eta_min, eta_max, degree, eta_hermite_continuity, eta_bc_type, const_eta_min_slope, const_eta_max_slope, eta_min_slopes, eta_max_slopes)
subroutine, public sll_s_compute_interpolants_hermite_1d(interp, f)
Interpolator class and methods of hermite 1D interpolator.
real(kind=f64) function, dimension(:), pointer get_coefficients_hi1d(interpolator)
real(kind=f64) function wrap_interpolate_value_hermite_1d(interpolator, eta1)
subroutine set_coefficients_hi1d(interpolator, coeffs)
subroutine wrap_compute_interpolants_hermite_1d(interpolator, data_array, eta_coords, size_eta_coords)
subroutine interpolate_array_derivatives_hi1d(interpolator, num_pts, vals_to_interpolate, output_array)
subroutine interpolate_array_disp_hi1d(this, num_pts, data, alpha, output_array)
subroutine interpolate_array_disp_inplace_hi1d(this, num_pts, data, alpha)
subroutine interpolate_array_values_hi1d(interpolator, num_pts, vals_to_interpolate, output_array)
real(kind=f64) function interpolate_derivative_eta1_hi1d(interpolator, eta1)
subroutine wrap_interpolate_array_hermite_1d(this, num_pts, data, coordinates, output_array)
type(sll_hermite_interpolator_1d) function, pointer, public sll_f_new_hermite_interpolator_1d(npts, eta_min, eta_max, degree, eta_hermite_continuity, eta_bc_type, const_eta_min_slope, const_eta_max_slope, eta_min_slopes, eta_max_slopes)
subroutine initialize_hermite_interpolator_1d(interpolator, npts, eta_min, eta_max, degree, eta_hermite_continuity, eta_bc_type, const_eta_min_slope, const_eta_max_slope, eta_min_slopes, eta_max_slopes)
Module for 1D interpolation and reconstruction.
The hermite-based interpolator is only a wrapper around the capabilities of the hermite interpolation...
Abstract class for 1D interpolation and reconstruction.