19 #include "sll_working_precision.h"
20 #include "sll_memory.h"
21 #include "sll_assert.h"
40 type(sll_plan_gyroaverage_polar),
pointer :: gyro
41 sll_int32 :: gyroaverage_case
42 sll_real64 :: eta_min(2)
43 sll_real64 :: eta_max(2)
46 sll_int32 :: interp_degree(2)
49 procedure, pass(gyroaverage) :: initialize => &
51 procedure, pass(gyroaverage) :: compute_gyroaverage => &
67 sll_real64,
intent(in) :: eta_min(2)
68 sll_real64,
intent(in) :: eta_max(2)
69 sll_int32,
intent(in) :: nc(2)
70 sll_int32,
optional :: n_points
71 sll_int32,
optional :: interp_degree(2)
72 sll_int32,
optional :: gyroaverage_case
75 sll_allocate(gyroaverage, ierr)
96 sll_real64,
intent(in) :: eta_min(2)
97 sll_real64,
intent(in) :: eta_max(2)
98 sll_int32,
intent(in) :: nc(2)
99 sll_int32,
optional :: n_points
100 sll_int32,
optional :: interp_degree(2)
101 sll_int32,
optional :: gyroaverage_case
104 gyroaverage%eta_min = eta_min
105 gyroaverage%eta_max = eta_max
108 if (.not. (
present(n_points)))
then
109 gyroaverage%N_points = 4
111 gyroaverage%N_points = n_points
114 if (.not. (
present(interp_degree)))
then
115 gyroaverage%interp_degree(1) = 3
116 gyroaverage%interp_degree(2) = 3
118 gyroaverage%interp_degree = interp_degree
121 if (.not. (
present(gyroaverage_case)))
then
124 select case (gyroaverage_case)
135 print *,
'#bad value of gyroaverage_case=', gyroaverage%gyroaverage_case
136 print *,
'#not implemented'
137 print *,
'#in initialize_gyroaverage_2d_polar_computation'
140 gyroaverage%gyroaverage_case = gyroaverage_case
147 sll_real64,
intent(in) :: larmor_rad
148 sll_real64,
dimension(:, :),
intent(in) :: f
149 sll_real64,
dimension(:, :),
intent(out) :: jf
151 select case (gyroaverage%gyroaverage_case)
174 print *,
'#bad value of gyroaverage_case=', gyroaverage%gyroaverage_case
175 print *,
'#not implemented'
176 print *,
'in compute_gyroaverage_2d_polar'
subroutine initialize_gyroaverage_2d_polar_computation(gyroaverage, eta_min, eta_max, Nc, N_points, interp_degree, gyroaverage_case)
type(gyroaverage_2d_polar_computation) function, pointer new_gyroaverage_2d_polar_computation(eta_min, eta_max, Nc, N_points, interp_degree, gyroaverage_case)
integer(kind=i32), parameter sll_gyroaverage_pade
integer(kind=i32), parameter sll_gyroaverage_splines
integer(kind=i32), parameter sll_gyroaverage_hermite
integer(kind=i32), parameter sll_gyroaverage_hermite_c1_with_invariance
integer(kind=i32), parameter sll_gyroaverage_hermite_c1
integer(kind=i32), parameter sll_gyroaverage_hermite_c1_precompute
integer(kind=i32), parameter sll_gyroaverage_splines_with_invariance
integer(kind=i32), parameter sll_gyroaverage_splines_precompute_with_fft
integer(kind=i32), parameter sll_gyroaverage_splines_precompute
subroutine compute_gyroaverage_2d_polar(gyroaverage, larmor_rad, f, Jf)