24 #include "sll_memory.h"
25 #include "sll_working_precision.h"
49 sll_int32 :: stencil_r
50 sll_int32 :: stencil_s
51 sll_real64,
dimension(:),
pointer :: weights
52 sll_real64,
dimension(:, :),
pointer :: buf
68 sll_int32,
intent(in) :: nc_x1
70 sll_int32,
intent(in) :: nc_x2
71 sll_real64,
intent(in) :: x2_min
72 sll_real64,
intent(in) :: x2_max
73 sll_int32,
intent(in) :: stencil_r
74 sll_int32,
intent(in) :: stencil_s
77 sll_allocate(deriv, ierr)
101 sll_int32,
intent(in) :: nc_x1
103 sll_int32,
intent(in) :: nc_x2
104 sll_real64,
intent(in) :: x2_min
105 sll_real64,
intent(in) :: x2_max
106 sll_int32,
intent(in) :: stencil_r
107 sll_int32,
intent(in) :: stencil_s
114 deriv%adv_x1 => adv_x1
116 deriv%x2_min = x2_min
117 deriv%x2_max = x2_max
118 deriv%stencil_r = stencil_r
119 deriv%stencil_s = stencil_s
123 sll_allocate(deriv%weights(r:s), ierr)
124 sll_allocate(deriv%buf(r:s, nc_x1 + 1), ierr)
141 sll_real64,
intent(in) :: a1
142 sll_real64,
intent(in) :: a2
143 sll_real64,
dimension(:, :),
intent(in) :: input
144 sll_real64,
dimension(:, :),
intent(out) :: output
149 sll_real64,
dimension(:, :),
pointer :: buf
150 sll_real64,
dimension(:),
pointer :: w
154 sll_real64 :: delta_x2
165 length = (deriv%x2_max - deriv%x2_min)
166 delta_x2 = length/real(nc_x2, f64)
170 adv_x1 => deriv%adv_x1
177 dt_loc = -real(ell, f64)*delta_x2/a2
178 i2_loc = modulo(i2 + ell - 1, nc_x2) + 1
179 call adv_x1%advect_1d_constant( &
182 input(1:nc_x1 + 1, i2_loc), &
183 buf(ell, 1:nc_x1 + 1))
189 tmp = tmp + w(ell)*buf(ell, i1)
191 output(i1, i2) = tmp*a2/delta_x2
Abstract class for advection.
subroutine, public sll_s_compute_oblic_derivative_2d(deriv, A1, A2, input, output)
type(sll_t_oblic_2d_derivative) function, pointer, public sll_f_new_oblic_2d_derivative(Nc_x1, adv_x1, Nc_x2, x2_min, x2_max, stencil_r, stencil_s)
subroutine initialize_oblic_2d_derivative(deriv, Nc_x1, adv_x1, Nc_x2, x2_min, x2_max, stencil_r, stencil_s)
subroutine, public sll_s_compute_w_hermite(w, r, s)