34 #include "sll_assert.h"
35 #include "sll_errors.h"
36 #include "sll_memory.h"
37 #include "sll_working_precision.h"
108 eta1_hermite_continuity, &
109 eta2_hermite_continuity, &
112 const_eta1_min_slope, &
113 const_eta1_max_slope, &
114 const_eta2_min_slope, &
115 const_eta2_max_slope, &
123 sll_int32,
intent(in) :: npts1
124 sll_int32,
intent(in) :: npts2
125 sll_real64,
intent(in) :: eta1_min
126 sll_real64,
intent(in) :: eta1_max
127 sll_real64,
intent(in) :: eta2_min
128 sll_real64,
intent(in) :: eta2_max
129 sll_int32,
intent(in) :: degree1
130 sll_int32,
intent(in) :: degree2
131 sll_int32,
intent(in) :: eta1_hermite_continuity
132 sll_int32,
intent(in) :: eta2_hermite_continuity
133 sll_int32,
intent(in) :: eta1_bc_type
134 sll_int32,
intent(in) :: eta2_bc_type
135 sll_real64,
intent(in),
optional :: const_eta1_min_slope
136 sll_real64,
intent(in),
optional :: const_eta1_max_slope
137 sll_real64,
intent(in),
optional :: const_eta2_min_slope
138 sll_real64,
intent(in),
optional :: const_eta2_max_slope
139 sll_real64,
dimension(:),
intent(in),
optional :: eta1_min_slopes
140 sll_real64,
dimension(:),
intent(in),
optional :: eta1_max_slopes
141 sll_real64,
dimension(:),
intent(in),
optional :: eta2_min_slopes
142 sll_real64,
dimension(:),
intent(in),
optional :: eta2_max_slopes
145 sll_allocate(interpolator, ierr)
147 interpolator%npts1 = npts1
148 interpolator%npts2 = npts2
150 call interpolator%init( &
159 eta1_hermite_continuity, &
160 eta2_hermite_continuity, &
163 const_eta1_min_slope, &
164 const_eta1_max_slope, &
165 const_eta2_min_slope, &
166 const_eta2_max_slope, &
184 eta1_hermite_continuity, &
185 eta2_hermite_continuity, &
188 const_eta1_min_slope, &
189 const_eta1_max_slope, &
190 const_eta2_min_slope, &
191 const_eta2_max_slope, &
198 sll_int32,
intent(in) :: npts1
199 sll_int32,
intent(in) :: npts2
200 sll_real64,
intent(in) :: eta1_min
201 sll_real64,
intent(in) :: eta1_max
202 sll_real64,
intent(in) :: eta2_min
203 sll_real64,
intent(in) :: eta2_max
204 sll_int32,
intent(in) :: degree1
205 sll_int32,
intent(in) :: degree2
206 sll_int32,
intent(in) :: eta1_hermite_continuity
207 sll_int32,
intent(in) :: eta2_hermite_continuity
208 sll_int32,
intent(in) :: eta1_bc_type
209 sll_int32,
intent(in) :: eta2_bc_type
210 sll_real64,
intent(in),
optional :: const_eta1_min_slope
211 sll_real64,
intent(in),
optional :: const_eta1_max_slope
212 sll_real64,
intent(in),
optional :: const_eta2_min_slope
213 sll_real64,
intent(in),
optional :: const_eta2_max_slope
214 sll_real64,
dimension(:),
intent(in),
optional :: eta1_min_slopes
215 sll_real64,
dimension(:),
intent(in),
optional :: eta1_max_slopes
216 sll_real64,
dimension(:),
intent(in),
optional :: eta2_min_slopes
217 sll_real64,
dimension(:),
intent(in),
optional :: eta2_max_slopes
228 eta1_hermite_continuity, &
229 eta2_hermite_continuity, &
232 const_eta1_min_slope, &
233 const_eta1_max_slope, &
234 const_eta2_min_slope, &
235 const_eta2_max_slope, &
251 sll_real64,
dimension(:, :),
intent(in) :: data_array
252 sll_real64,
dimension(:),
intent(in),
optional :: eta1_coords
253 sll_real64,
dimension(:),
intent(in),
optional :: eta2_coords
254 sll_int32,
intent(in),
optional :: size_eta1_coords
255 sll_int32,
intent(in),
optional :: size_eta2_coords
257 if (
present(eta1_coords) .or.
present(eta2_coords) &
258 .or.
present(size_eta1_coords) .or.
present(size_eta2_coords))
then
259 sll_error(
'wrap_compute_interpolants_hermite_2d',
'This case is not yet implemented')
269 sll_real64,
intent(in) :: eta1
270 sll_real64,
intent(in) :: eta2
278 sll_real64,
intent(in) :: eta1
279 sll_real64,
intent(in) :: eta2
280 val = 0._f64 + eta1 + eta2
281 print *,
'#wrap_interpolate_deriv1_hermite_2d'
282 print *,
'#not implemented for the moment'
284 sll_assert(interpolator%npts1 > 0)
291 sll_real64,
intent(in) :: eta1
292 sll_real64,
intent(in) :: eta2
293 val = 0._f64 + eta1 + eta2
294 print *,
'#wrap_interpolate_deriv1_hermite_2d'
295 print *,
'#not implemented for the moment'
297 sll_assert(interpolator%npts1 > 0)
310 sll_int32,
intent(in) :: num_points1
311 sll_int32,
intent(in) :: num_points2
312 sll_real64,
dimension(:, :),
intent(in) :: eta1
313 sll_real64,
dimension(:, :),
intent(in) :: eta2
314 sll_real64,
dimension(:, :),
intent(in) :: data_in
315 sll_real64,
intent(out) :: data_out(num_points1, num_points2)
319 do j = 1, num_points2
320 do i = 1, num_points1
321 data_out(i, j) = this%interpolate_from_interpolant_value(eta1(i, j), eta2(i, j))
338 sll_int32,
intent(in) :: num_points1
339 sll_int32,
intent(in) :: num_points2
340 sll_real64,
dimension(:, :),
intent(in) :: alpha1
341 sll_real64,
dimension(:, :),
intent(in) :: alpha2
342 sll_real64,
dimension(:, :),
intent(in) :: data_in
343 sll_real64,
intent(out) :: data_out(num_points1, num_points2)
344 print *,
'#wrap_interpolate2d_disp_hermite_2d'
345 print *,
'#not implemented for the moment'
346 data_out = 0.0_f64*data_in
348 sll_assert(
size(alpha1, 1) == num_points1)
349 sll_assert(
size(alpha2, 1) == num_points1)
350 sll_assert(this%npts1 == num_points1)
364 sll_real64,
dimension(:),
intent(in),
optional :: coeffs_1d
365 sll_real64,
dimension(:, :),
intent(in),
optional :: coeffs_2d
366 sll_int32,
intent(in),
optional :: coeff2d_size1
367 sll_int32,
intent(in),
optional :: coeff2d_size2
368 sll_real64,
dimension(:),
intent(in),
optional :: knots1
369 sll_real64,
dimension(:),
intent(in),
optional :: knots2
370 sll_int32,
intent(in),
optional :: size_knots1
371 sll_int32,
intent(in),
optional :: size_knots2
372 print *,
'wrap_set_coefficients_hermite_2d(): ERROR: This function has not been ', &
374 print *, interpolator%npts1
375 if (
present(coeffs_1d))
then
376 print *,
'coeffs_1d present but not used'
378 if (
present(coeffs_2d))
then
379 print *,
'coeffs_2d present but not used'
381 if (
present(coeff2d_size1))
then
382 print *,
'coeff2d_size1 present but not used'
384 if (
present(coeff2d_size2))
then
385 print *,
'coeff2d_size2 present but not used'
387 if (
present(knots1))
then
388 print *,
'knots1 present but not used'
390 if (
present(knots2))
then
391 print *,
'knots2 present but not used'
393 if (
present(size_knots1))
then
394 print *,
'size_knots1 present but not used'
396 if (
present(size_knots2))
then
397 print *,
'size_knots2 present but not used'
404 sll_real64,
dimension(:, :),
pointer :: res
406 print *,
'wrap_get_coefficients_hermite_2d: ERROR: This function has not been ', &
409 print *, interpolator%npts1
417 print *,
'wrap_coefficients_are_set_hermite_2d(): '
418 print *,
'this function has not been implemented yet.'
419 print *,
'#', interpolator%npts1
425 print *,
'#warning delete_sll_hermite_interpolator_2d'
426 print *,
'#not implemented for the moment'
427 sll_assert(interpolator%npts1 > 0)
subroutine, public sll_s_compute_interpolants_hermite_2d(interp, f)
type(sll_t_hermite_interpolation_2d) function, pointer, public sll_f_new_hermite_interpolation_2d(npts1, npts2, eta1_min, eta1_max, eta2_min, eta2_max, degree1, degree2, eta1_hermite_continuity, eta2_hermite_continuity, eta1_bc_type, eta2_bc_type, const_eta1_min_slope, const_eta1_max_slope, const_eta2_min_slope, const_eta2_max_slope, eta1_min_slopes, eta1_max_slopes, eta2_min_slopes, eta2_max_slopes)
real(kind=f64) function, public sll_f_interpolate_value_hermite_2d(eta1, eta2, interp)
Hermite interpolation in 2d.
subroutine delete_sll_hermite_interpolator_2d(interpolator)
type(sll_hermite_interpolator_2d) function, pointer, public sll_f_new_hermite_interpolator_2d(npts1, npts2, eta1_min, eta1_max, eta2_min, eta2_max, degree1, degree2, eta1_hermite_continuity, eta2_hermite_continuity, eta1_bc_type, eta2_bc_type, const_eta1_min_slope, const_eta1_max_slope, const_eta2_min_slope, const_eta2_max_slope, eta1_min_slopes, eta1_max_slopes, eta2_min_slopes, eta2_max_slopes)
real(kind=f64) function, dimension(:, :), pointer wrap_get_coefficients_hermite_2d(interpolator)
logical function wrap_coefficients_are_set_hermite_2d(interpolator)
subroutine wrap_set_coefficients_hermite_2d(interpolator, coeffs_1d, coeffs_2d, coeff2d_size1, coeff2d_size2, knots1, size_knots1, knots2, size_knots2)
subroutine initialize_hermite_interpolator_2d(interpolator, npts1, npts2, eta1_min, eta1_max, eta2_min, eta2_max, degree1, degree2, eta1_hermite_continuity, eta2_hermite_continuity, eta1_bc_type, eta2_bc_type, const_eta1_min_slope, const_eta1_max_slope, const_eta2_min_slope, const_eta2_max_slope, eta1_min_slopes, eta1_max_slopes, eta2_min_slopes, eta2_max_slopes)
subroutine wrap_compute_interpolants_hermite_2d(interpolator, data_array, eta1_coords, size_eta1_coords, eta2_coords, size_eta2_coords)
real(kind=f64) function wrap_interpolate_deriv2_hermite_2d(interpolator, eta1, eta2)
real(kind=f64) function wrap_interpolate_deriv1_hermite_2d(interpolator, eta1, eta2)
subroutine wrap_interpolate_array_hermite_2d(this, num_points1, num_points2, data_in, eta1, eta2, data_out)
real(kind=f64) function wrap_interpolate_value_hermite_2d(interpolator, eta1, eta2)
subroutine wrap_interpolate2d_disp_hermite_2d(this, num_points1, num_points2, data_in, alpha1, alpha2, data_out)
abstract data type for 2d interpolation
The hermite-based interpolator is only a wrapper around the capabilities of the hermite interpolation...
Base class/basic interface for 2D interpolators.