11 #include "sll_memory.h"
12 #include "sll_errors.h"
13 #include "sll_working_precision.h"
38 sll_int32 :: num_points
39 sll_real64 :: cell_size
40 sll_real64 :: domain_size
82 sll_int32,
intent(in) :: num_points
83 sll_real64,
intent(in) :: xmin
84 sll_real64,
intent(in) :: xmax
85 sll_int32,
intent(in) ::
type
86 sll_int32,
intent(in) :: order
88 sll_allocate(res, ierr)
101 sll_int32,
intent(in) :: num_pts
102 sll_real64,
dimension(num_pts),
intent(in) :: coordinates
103 sll_real64,
dimension(:),
intent(in) ::
data
104 sll_real64,
dimension(num_pts),
intent(out) :: output_array
108 print *,
'periodic_interpolate1d: periodic interpolation not implemented', &
109 ' for array of displacements'
110 output_array = -1000000._f64
112 print *, maxval(coordinates)
113 print *, maxval(data)
114 print *, maxval(output_array)
115 print *, this%num_points
121 sll_int32,
intent(in) :: num_pts
122 sll_real64,
intent(in) :: alpha
123 sll_real64,
dimension(:),
intent(in) ::
data
124 sll_real64,
dimension(num_pts),
intent(out) :: output_array
129 -alpha/this%cell_size)
131 output_array(num_pts) = output_array(1)
136 sll_int32,
intent(in) :: num_pts
137 sll_real64,
intent(in) :: alpha
138 sll_real64,
dimension(num_pts),
intent(inout) ::
data
141 sll_real64 :: tmp(num_pts)
146 -alpha/this%cell_size)
149 data(num_pts) = tmp(1)
161 sll_real64,
dimension(:),
intent(in) :: data_array
162 sll_real64,
dimension(:),
intent(in),
optional :: eta_coords
163 sll_int32,
intent(in),
optional :: size_eta_coords
165 print *,
'compute_interpolants_per1d:', &
166 ' not implemented for periodic interpolation'
168 if (
present(eta_coords) .or.
present(size_eta_coords))
then
169 sll_error(
'compute_interpolants_per1d',
'This case is not yet implemented')
172 print *, maxval(data_array)
173 print *, interpolator%num_points
185 vals_to_interpolate, &
188 sll_int32,
intent(in) :: num_pts
189 sll_real64,
dimension(num_pts),
intent(in) :: vals_to_interpolate
190 sll_real64,
dimension(num_pts),
intent(out) :: output_array
192 output_array = -1000000._f64
193 print *,
'interpolate_values_per1d:', &
194 ' not implemented for periodic interpolation'
195 print *, interpolator%num_points
197 print *, maxval(vals_to_interpolate)
226 sll_real64,
intent(in) :: eta1
227 print *,
'interpolate_value_per1d: ', &
228 'not implemented for periodic interpolation'
231 print *, interpolator%num_points
238 sll_real64,
intent(in) :: eta1
239 print *,
'interpolate_deriv1_per1d: ', &
240 'not implemented for periodic interpolation'
243 print *, interpolator%num_points
273 sll_int32,
intent(in) :: num_points
274 sll_real64,
intent(in) :: xmin
275 sll_real64,
intent(in) :: xmax
276 sll_int32,
intent(in) ::
type
277 sll_int32,
intent(in) :: order
285 interpolator%num_points = num_points - 1
286 interpolator%cell_size = (xmax - xmin)/real(num_points - 1, f64)
287 interpolator%domain_size = xmax - xmin
300 sll_real64,
dimension(:),
intent(in),
optional :: coeffs
301 print *,
'set_coefficients_per1d(): ERROR: This function has not been ', &
303 if (
present(coeffs))
then
304 print *,
'#coeffs present but not used'
306 print *, interpolator%num_points
314 print *,
'get_coefficients_per1d(): ERROR: This function has not been ', &
316 print *, interpolator%num_points
Deallocate the interpolator object.
Module for 1D interpolation and reconstruction.
subroutine, public sll_s_periodic_interp_free(this)
subroutine, public sll_s_periodic_interp_init(this, N, interpolator, order)
subroutine, public sll_s_periodic_interp(this, u_out, u, alpha)
Interpolator with periodic boundary conditions.
subroutine initialize_per1d_interpolator(interpolator, num_points, xmin, xmax, type, order)
initialize periodic interpolator
real(kind=f64) function, dimension(:), pointer get_coefficients_per1d(interpolator)
subroutine delete_per1d(obj)
real(kind=f64) function interpolate_deriv1_per1d(interpolator, eta1)
subroutine per_interpolate1d(this, num_pts, data, coordinates, output_array)
subroutine interpolate_values_per1d(interpolator, num_pts, vals_to_interpolate, output_array)
real(kind=f64) function interpolate_value_per1d(interpolator, eta1)
subroutine set_coefficients_per1d(interpolator, coeffs)
type(sll_t_periodic_interpolator_1d) function, pointer new_periodic_1d_interpolator(num_points, xmin, xmax, type, order)
Create a new interpolator.
subroutine compute_interpolants_per1d(interpolator, data_array, eta_coords, size_eta_coords)
subroutine per_interpolate1d_disp(this, num_pts, data, alpha, output_array)
subroutine per_interpolate1d_disp_inplace(this, num_pts, data, alpha)
Abstract class for 1D interpolation and reconstruction.