33submodule(
opr_sx) sx_convect_scalar
40 module subroutine opr_sx_convect_scalar(du, u, cr, cs, ct, xh_gll, xh_gl, &
41 coef_gll, coef_gl, gll_to_gl)
42 type(space_t),
intent(in) :: Xh_GL
43 type(space_t),
intent(in) :: Xh_GLL
44 type(coef_t),
intent(in) :: coef_GLL
45 type(coef_t),
intent(in) :: coef_GL
46 type(interpolator_t),
intent(inout) :: GLL_to_GL
47 real(kind=
rp),
intent(inout) :: &
48 du(xh_gll%lx, xh_gll%ly, xh_gll%lz, coef_gl%msh%nelv)
49 real(kind=
rp),
intent(inout) :: &
50 u(xh_gl%lx, xh_gl%lx, xh_gl%lx, coef_gl%msh%nelv)
51 real(kind=
rp),
intent(inout) :: cr(xh_gl%lxyz, coef_gl%msh%nelv)
52 real(kind=
rp),
intent(inout) :: cs(xh_gl%lxyz, coef_gl%msh%nelv)
53 real(kind=
rp),
intent(inout) :: ct(xh_gl%lxyz, coef_gl%msh%nelv)
54 associate(dx => xh_gl%dx, dy => xh_gl%dy, dz => xh_gl%dz, &
55 lx => xh_gl%lx, nelv => coef_gl%msh%nelv)
59 call sx_convect_scalar_lx18(du, u, cr, cs, ct, dx, dy, dz, &
60 xh_gll, coef_gll, gll_to_gl, nelv)
62 call sx_convect_scalar_lx17(du, u, cr, cs, ct, dx, dy, dz, &
63 xh_gll, coef_gll, gll_to_gl, nelv)
65 call sx_convect_scalar_lx16(du, u, cr, cs, ct, dx, dy, dz, &
66 xh_gll, coef_gll, gll_to_gl, nelv)
68 call sx_convect_scalar_lx15(du, u, cr, cs, ct, dx, dy, dz, &
69 xh_gll, coef_gll, gll_to_gl, nelv)
71 call sx_convect_scalar_lx14(du, u, cr, cs, ct, dx, dy, dz, &
72 xh_gll, coef_gll, gll_to_gl, nelv)
74 call sx_convect_scalar_lx13(du, u, cr, cs, ct, dx, dy, dz, &
75 xh_gll, coef_gll, gll_to_gl, nelv)
77 call sx_convect_scalar_lx12(du, u, cr, cs, ct, dx, dy, dz, &
78 xh_gll, coef_gll, gll_to_gl, nelv)
80 call sx_convect_scalar_lx11(du, u, cr, cs, ct, dx, dy, dz, &
81 xh_gll, coef_gll, gll_to_gl, nelv)
83 call sx_convect_scalar_lx10(du, u, cr, cs, ct, dx, dy, dz, &
84 xh_gll, coef_gll, gll_to_gl, nelv)
86 call sx_convect_scalar_lx9(du, u, cr, cs, ct, dx, dy, dz, &
87 xh_gll, coef_gll, gll_to_gl, nelv)
89 call sx_convect_scalar_lx8(du, u, cr, cs, ct, dx, dy, dz, &
90 xh_gll, coef_gll, gll_to_gl, nelv)
92 call sx_convect_scalar_lx7(du, u, cr, cs, ct, dx, dy, dz, &
93 xh_gll, coef_gll, gll_to_gl, nelv)
95 call sx_convect_scalar_lx6(du, u, cr, cs, ct, dx, dy, dz, &
96 xh_gll, coef_gll, gll_to_gl, nelv)
98 call sx_convect_scalar_lx5(du, u, cr, cs, ct, dx, dy, dz, &
99 xh_gll, coef_gll, gll_to_gl, nelv)
101 call sx_convect_scalar_lx4(du, u, cr, cs, ct, dx, dy, dz, &
102 xh_gll, coef_gll, gll_to_gl, nelv)
104 call sx_convect_scalar_lx3(du, u, cr, cs, ct, dx, dy, dz, &
105 xh_gll, coef_gll, gll_to_gl, nelv)
107 call sx_convect_scalar_lx2(du, u, cr, cs, ct, dx, dy, dz, &
108 xh_gll, coef_gll, gll_to_gl, nelv)
110 call sx_convect_scalar_lx(du, u, cr, cs, ct, dx, dy, dz, &
111 xh_gll, coef_gll, gll_to_gl, nelv, lx)
115 end subroutine opr_sx_convect_scalar
117 subroutine sx_convect_scalar_lx(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
118 coef_GLL, GLL_to_GL, nelv, lx)
119 integer,
intent(in) :: nelv, lx
120 type(space_t),
intent(in) :: Xh_GLL
121 type(coef_t),
intent(in) :: coef_GLL
122 type(interpolator_t),
intent(inout) :: GLL_to_GL
123 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
124 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
125 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
126 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
127 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
128 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
129 real(kind=
rp) :: ur(lx, lx, lx, nelv)
130 real(kind=
rp) :: us(lx, lx, lx, nelv)
131 real(kind=
rp) :: ut(lx, lx, lx, nelv)
132 real(kind=
rp) :: ud(lx, lx, lx, nelv)
133 real(kind=
rp) :: wr, ws, wt
134 integer :: e, i, j, k, jj, kk, n_GLL
135 n_gll = nelv * xh_gll%lxyz
137 do jj = 1, lx * lx * nelv
140 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
153 ws = ws + dy(j, kk) * u(i, kk, k, e)
168 wt = wt + dz(k, kk) * u(i, j, kk, e)
176 do i = 1, lx * lx * lx
178 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
179 + cs(i,e) * us(i,1,1,e) &
180 + ct(i,e) * ut(i,1,1,e) )
183 call gll_to_gl%map(du, ud, nelv, xh_gll)
184 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
185 call col2(du, coef_gll%Binv, n_gll)
187 end subroutine sx_convect_scalar_lx
189 subroutine sx_convect_scalar_lx18(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
190 coef_GLL, GLL_to_GL, nelv)
191 integer,
parameter :: lx = 18
192 integer,
intent(in) :: nelv
193 type(space_t),
intent(in) :: Xh_GLL
194 type(coef_t),
intent(in) :: coef_GLL
195 type(interpolator_t),
intent(inout) :: GLL_to_GL
196 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
197 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
198 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
199 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
200 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
201 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
202 real(kind=
rp) :: ur(lx, lx, lx, nelv)
203 real(kind=
rp) :: us(lx, lx, lx, nelv)
204 real(kind=
rp) :: ut(lx, lx, lx, nelv)
205 real(kind=
rp) :: ud(lx, lx, lx, nelv)
206 real(kind=
rp) :: wr, ws, wt
207 integer :: e, i, j, k, jj, kk, n_GLL
208 n_gll = nelv * xh_gll%lxyz
210 do jj = 1, lx * lx * nelv
213 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
226 ws = ws + dy(j, kk) * u(i, kk, k, e)
241 wt = wt + dz(k, kk) * u(i, j, kk, e)
249 do i = 1, lx * lx * lx
251 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
252 + cs(i,e) * us(i,1,1,e) &
253 + ct(i,e) * ut(i,1,1,e) )
256 call gll_to_gl%map(du, ud, nelv, xh_gll)
257 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
258 call col2(du, coef_gll%Binv, n_gll)
260 end subroutine sx_convect_scalar_lx18
262 subroutine sx_convect_scalar_lx17(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
263 coef_GLL, GLL_to_GL, nelv)
264 integer,
parameter :: lx = 17
265 integer,
intent(in) :: nelv
266 type(space_t),
intent(in) :: Xh_GLL
267 type(coef_t),
intent(in) :: coef_GLL
268 type(interpolator_t),
intent(inout) :: GLL_to_GL
269 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
270 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
271 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
272 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
273 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
274 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
275 real(kind=
rp) :: ur(lx, lx, lx, nelv)
276 real(kind=
rp) :: us(lx, lx, lx, nelv)
277 real(kind=
rp) :: ut(lx, lx, lx, nelv)
278 real(kind=
rp) :: ud(lx, lx, lx, nelv)
279 real(kind=
rp) :: wr, ws, wt
280 integer :: e, i, j, k, jj, kk, n_GLL
281 n_gll = nelv * xh_gll%lxyz
283 do jj = 1, lx * lx * nelv
286 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
299 ws = ws + dy(j, kk) * u(i, kk, k, e)
314 wt = wt + dz(k, kk) * u(i, j, kk, e)
322 do i = 1, lx * lx * lx
324 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
325 + cs(i,e) * us(i,1,1,e) &
326 + ct(i,e) * ut(i,1,1,e) )
329 call gll_to_gl%map(du, ud, nelv, xh_gll)
330 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
331 call col2(du, coef_gll%Binv, n_gll)
333 end subroutine sx_convect_scalar_lx17
335 subroutine sx_convect_scalar_lx16(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
336 coef_GLL, GLL_to_GL, nelv)
337 integer,
parameter :: lx = 16
338 integer,
intent(in) :: nelv
339 type(space_t),
intent(in) :: Xh_GLL
340 type(coef_t),
intent(in) :: coef_GLL
341 type(interpolator_t),
intent(inout) :: GLL_to_GL
342 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
343 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
344 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
345 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
346 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
347 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
348 real(kind=
rp) :: ur(lx, lx, lx, nelv)
349 real(kind=
rp) :: us(lx, lx, lx, nelv)
350 real(kind=
rp) :: ut(lx, lx, lx, nelv)
351 real(kind=
rp) :: ud(lx, lx, lx, nelv)
352 real(kind=
rp) :: wr, ws, wt
353 integer :: e, i, j, k, jj, kk, n_GLL
354 n_gll = nelv * xh_gll%lxyz
356 do jj = 1, lx * lx * nelv
359 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
372 ws = ws + dy(j, kk) * u(i, kk, k, e)
387 wt = wt + dz(k, kk) * u(i, j, kk, e)
395 do i = 1, lx * lx * lx
397 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
398 + cs(i,e) * us(i,1,1,e) &
399 + ct(i,e) * ut(i,1,1,e) )
402 call gll_to_gl%map(du, ud, nelv, xh_gll)
403 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
404 call col2(du, coef_gll%Binv, n_gll)
406 end subroutine sx_convect_scalar_lx16
408 subroutine sx_convect_scalar_lx15(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
409 coef_GLL, GLL_to_GL, nelv)
410 integer,
parameter :: lx = 15
411 integer,
intent(in) :: nelv
412 type(space_t),
intent(in) :: Xh_GLL
413 type(coef_t),
intent(in) :: coef_GLL
414 type(interpolator_t),
intent(inout) :: GLL_to_GL
415 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
416 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
417 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
418 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
419 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
420 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
421 real(kind=
rp) :: ur(lx, lx, lx, nelv)
422 real(kind=
rp) :: us(lx, lx, lx, nelv)
423 real(kind=
rp) :: ut(lx, lx, lx, nelv)
424 real(kind=
rp) :: ud(lx, lx, lx, nelv)
425 real(kind=
rp) :: wr, ws, wt
426 integer :: e, i, j, k, jj, kk, n_GLL
427 n_gll = nelv * xh_gll%lxyz
429 do jj = 1, lx * lx * nelv
432 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
445 ws = ws + dy(j, kk) * u(i, kk, k, e)
460 wt = wt + dz(k, kk) * u(i, j, kk, e)
468 do i = 1, lx * lx * lx
470 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
471 + cs(i,e) * us(i,1,1,e) &
472 + ct(i,e) * ut(i,1,1,e) )
475 call gll_to_gl%map(du, ud, nelv, xh_gll)
476 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
477 call col2(du, coef_gll%Binv, n_gll)
479 end subroutine sx_convect_scalar_lx15
481 subroutine sx_convect_scalar_lx14(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
482 coef_GLL, GLL_to_GL, nelv)
483 integer,
parameter :: lx = 14
484 integer,
intent(in) :: nelv
485 type(space_t),
intent(in) :: Xh_GLL
486 type(coef_t),
intent(in) :: coef_GLL
487 type(interpolator_t),
intent(inout) :: GLL_to_GL
488 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
489 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
490 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
491 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
492 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
493 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
494 real(kind=
rp) :: ur(lx, lx, lx, nelv)
495 real(kind=
rp) :: us(lx, lx, lx, nelv)
496 real(kind=
rp) :: ut(lx, lx, lx, nelv)
497 real(kind=
rp) :: ud(lx, lx, lx, nelv)
498 real(kind=
rp) :: wr, ws, wt
499 integer :: e, i, j, k, jj, kk, n_GLL
500 n_gll = nelv * xh_gll%lxyz
502 do jj = 1, lx * lx * nelv
505 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
518 ws = ws + dy(j, kk) * u(i, kk, k, e)
533 wt = wt + dz(k, kk) * u(i, j, kk, e)
541 do i = 1, lx * lx * lx
543 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
544 + cs(i,e) * us(i,1,1,e) &
545 + ct(i,e) * ut(i,1,1,e) )
548 call gll_to_gl%map(du, ud, nelv, xh_gll)
549 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
550 call col2(du, coef_gll%Binv, n_gll)
552 end subroutine sx_convect_scalar_lx14
554 subroutine sx_convect_scalar_lx13(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
555 coef_GLL, GLL_to_GL, nelv)
556 integer,
parameter :: lx = 13
557 integer,
intent(in) :: nelv
558 type(space_t),
intent(in) :: Xh_GLL
559 type(coef_t),
intent(in) :: coef_GLL
560 type(interpolator_t),
intent(inout) :: GLL_to_GL
561 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
562 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
563 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
564 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
565 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
566 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
567 real(kind=
rp) :: ur(lx, lx, lx, nelv)
568 real(kind=
rp) :: us(lx, lx, lx, nelv)
569 real(kind=
rp) :: ut(lx, lx, lx, nelv)
570 real(kind=
rp) :: ud(lx, lx, lx, nelv)
571 real(kind=
rp) :: wr, ws, wt
572 integer :: e, i, j, k, jj, kk, n_GLL
573 n_gll = nelv * xh_gll%lxyz
575 do jj = 1, lx * lx * nelv
578 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
591 ws = ws + dy(j, kk) * u(i, kk, k, e)
606 wt = wt + dz(k, kk) * u(i, j, kk, e)
614 do i = 1, lx * lx * lx
616 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
617 + cs(i,e) * us(i,1,1,e) &
618 + ct(i,e) * ut(i,1,1,e) )
621 call gll_to_gl%map(du, ud, nelv, xh_gll)
622 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
623 call col2(du, coef_gll%Binv, n_gll)
625 end subroutine sx_convect_scalar_lx13
627 subroutine sx_convect_scalar_lx12(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
628 coef_GLL, GLL_to_GL, nelv)
629 integer,
parameter :: lx = 12
630 integer,
intent(in) :: nelv
631 type(space_t),
intent(in) :: Xh_GLL
632 type(coef_t),
intent(in) :: coef_GLL
633 type(interpolator_t),
intent(inout) :: GLL_to_GL
634 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
635 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
636 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
637 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
638 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
639 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
640 real(kind=
rp) :: ur(lx, lx, lx, nelv)
641 real(kind=
rp) :: us(lx, lx, lx, nelv)
642 real(kind=
rp) :: ut(lx, lx, lx, nelv)
643 real(kind=
rp) :: ud(lx, lx, lx, nelv)
644 real(kind=
rp) :: wr, ws, wt
645 integer :: e, i, j, k, jj, kk, n_GLL
646 n_gll = nelv * xh_gll%lxyz
648 do jj = 1, lx * lx * nelv
651 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
664 ws = ws + dy(j, kk) * u(i, kk, k, e)
679 wt = wt + dz(k, kk) * u(i, j, kk, e)
687 do i = 1, lx * lx * lx
689 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
690 + cs(i,e) * us(i,1,1,e) &
691 + ct(i,e) * ut(i,1,1,e) )
694 call gll_to_gl%map(du, ud, nelv, xh_gll)
695 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
696 call col2(du, coef_gll%Binv, n_gll)
698 end subroutine sx_convect_scalar_lx12
700 subroutine sx_convect_scalar_lx11(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
701 coef_GLL, GLL_to_GL, nelv)
702 integer,
parameter :: lx = 11
703 integer,
intent(in) :: nelv
704 type(space_t),
intent(in) :: Xh_GLL
705 type(coef_t),
intent(in) :: coef_GLL
706 type(interpolator_t),
intent(inout) :: GLL_to_GL
707 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
708 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
709 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
710 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
711 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
712 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
713 real(kind=
rp) :: ur(lx, lx, lx, nelv)
714 real(kind=
rp) :: us(lx, lx, lx, nelv)
715 real(kind=
rp) :: ut(lx, lx, lx, nelv)
716 real(kind=
rp) :: ud(lx, lx, lx, nelv)
717 real(kind=
rp) :: wr, ws, wt
718 integer :: e, i, j, k, jj, kk, n_GLL
719 n_gll = nelv * xh_gll%lxyz
721 do jj = 1, lx * lx * nelv
724 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
737 ws = ws + dy(j, kk) * u(i, kk, k, e)
752 wt = wt + dz(k, kk) * u(i, j, kk, e)
760 do i = 1, lx * lx * lx
762 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
763 + cs(i,e) * us(i,1,1,e) &
764 + ct(i,e) * ut(i,1,1,e) )
767 call gll_to_gl%map(du, ud, nelv, xh_gll)
768 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
769 call col2(du, coef_gll%Binv, n_gll)
771 end subroutine sx_convect_scalar_lx11
773 subroutine sx_convect_scalar_lx10(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
774 coef_GLL, GLL_to_GL, nelv)
775 integer,
parameter :: lx = 10
776 integer,
intent(in) :: nelv
777 type(space_t),
intent(in) :: Xh_GLL
778 type(coef_t),
intent(in) :: coef_GLL
779 type(interpolator_t),
intent(inout) :: GLL_to_GL
780 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
781 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
782 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
783 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
784 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
785 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
786 real(kind=
rp) :: ur(lx, lx, lx, nelv)
787 real(kind=
rp) :: us(lx, lx, lx, nelv)
788 real(kind=
rp) :: ut(lx, lx, lx, nelv)
789 real(kind=
rp) :: ud(lx, lx, lx, nelv)
790 real(kind=
rp) :: wr, ws, wt
791 integer :: e, i, j, k, jj, kk, n_GLL
792 n_gll = nelv * xh_gll%lxyz
794 do jj = 1, lx * lx * nelv
797 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
810 ws = ws + dy(j, kk) * u(i, kk, k, e)
825 wt = wt + dz(k, kk) * u(i, j, kk, e)
833 do i = 1, lx * lx * lx
835 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
836 + cs(i,e) * us(i,1,1,e) &
837 + ct(i,e) * ut(i,1,1,e) )
840 call gll_to_gl%map(du, ud, nelv, xh_gll)
841 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
842 call col2(du, coef_gll%Binv, n_gll)
844 end subroutine sx_convect_scalar_lx10
846 subroutine sx_convect_scalar_lx9(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
847 coef_GLL, GLL_to_GL, nelv)
848 integer,
parameter :: lx = 9
849 integer,
intent(in) :: nelv
850 type(space_t),
intent(in) :: Xh_GLL
851 type(coef_t),
intent(in) :: coef_GLL
852 type(interpolator_t),
intent(inout) :: GLL_to_GL
853 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
854 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
855 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
856 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
857 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
858 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
859 real(kind=
rp) :: ur(lx, lx, lx, nelv)
860 real(kind=
rp) :: us(lx, lx, lx, nelv)
861 real(kind=
rp) :: ut(lx, lx, lx, nelv)
862 real(kind=
rp) :: ud(lx, lx, lx, nelv)
863 real(kind=
rp) :: wr, ws, wt
864 integer :: e, i, j, k, jj, kk, n_GLL
865 n_gll = nelv * xh_gll%lxyz
867 do jj = 1, lx * lx * nelv
870 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
883 ws = ws + dy(j, kk) * u(i, kk, k, e)
898 wt = wt + dz(k, kk) * u(i, j, kk, e)
906 do i = 1, lx * lx * lx
908 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
909 + cs(i,e) * us(i,1,1,e) &
910 + ct(i,e) * ut(i,1,1,e) )
913 call gll_to_gl%map(du, ud, nelv, xh_gll)
914 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
915 call col2(du, coef_gll%Binv, n_gll)
917 end subroutine sx_convect_scalar_lx9
919 subroutine sx_convect_scalar_lx8(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
920 coef_GLL, GLL_to_GL, nelv)
921 integer,
parameter :: lx = 8
922 integer,
intent(in) :: nelv
923 type(space_t),
intent(in) :: Xh_GLL
924 type(coef_t),
intent(in) :: coef_GLL
925 type(interpolator_t),
intent(inout) :: GLL_to_GL
926 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
927 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
928 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
929 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
930 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
931 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
932 real(kind=
rp) :: ur(lx, lx, lx, nelv)
933 real(kind=
rp) :: us(lx, lx, lx, nelv)
934 real(kind=
rp) :: ut(lx, lx, lx, nelv)
935 real(kind=
rp) :: ud(lx, lx, lx, nelv)
936 real(kind=
rp) :: wr, ws, wt
937 integer :: e, i, j, k, jj, kk, n_GLL
938 n_gll = nelv * xh_gll%lxyz
940 do jj = 1, lx * lx * nelv
943 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
956 ws = ws + dy(j, kk) * u(i, kk, k, e)
971 wt = wt + dz(k, kk) * u(i, j, kk, e)
979 do i = 1, lx * lx * lx
981 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
982 + cs(i,e) * us(i,1,1,e) &
983 + ct(i,e) * ut(i,1,1,e) )
986 call gll_to_gl%map(du, ud, nelv, xh_gll)
987 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
988 call col2(du, coef_gll%Binv, n_gll)
990 end subroutine sx_convect_scalar_lx8
992 subroutine sx_convect_scalar_lx7(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
993 coef_GLL, GLL_to_GL, nelv)
994 integer,
parameter :: lx = 7
995 integer,
intent(in) :: nelv
996 type(space_t),
intent(in) :: Xh_GLL
997 type(coef_t),
intent(in) :: coef_GLL
998 type(interpolator_t),
intent(inout) :: GLL_to_GL
999 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
1000 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
1001 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
1002 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
1003 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
1004 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
1005 real(kind=
rp) :: ur(lx, lx, lx, nelv)
1006 real(kind=
rp) :: us(lx, lx, lx, nelv)
1007 real(kind=
rp) :: ut(lx, lx, lx, nelv)
1008 real(kind=
rp) :: ud(lx, lx, lx, nelv)
1009 real(kind=
rp) :: wr, ws, wt
1010 integer :: e, i, j, k, jj, kk, n_GLL
1011 n_gll = nelv * xh_gll%lxyz
1013 do jj = 1, lx * lx * nelv
1016 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
1018 ur(i, jj, 1, 1) = wr
1029 ws = ws + dy(j, kk) * u(i, kk, k, e)
1044 wt = wt + dz(k, kk) * u(i, j, kk, e)
1052 do i = 1, lx * lx * lx
1054 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
1055 + cs(i,e) * us(i,1,1,e) &
1056 + ct(i,e) * ut(i,1,1,e) )
1059 call gll_to_gl%map(du, ud, nelv, xh_gll)
1060 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
1061 call col2(du, coef_gll%Binv, n_gll)
1063 end subroutine sx_convect_scalar_lx7
1065 subroutine sx_convect_scalar_lx6(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
1066 coef_GLL, GLL_to_GL, nelv)
1067 integer,
parameter :: lx = 6
1068 integer,
intent(in) :: nelv
1069 type(space_t),
intent(in) :: Xh_GLL
1070 type(coef_t),
intent(in) :: coef_GLL
1071 type(interpolator_t),
intent(inout) :: GLL_to_GL
1072 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
1073 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
1074 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
1075 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
1076 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
1077 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
1078 real(kind=
rp) :: ur(lx, lx, lx, nelv)
1079 real(kind=
rp) :: us(lx, lx, lx, nelv)
1080 real(kind=
rp) :: ut(lx, lx, lx, nelv)
1081 real(kind=
rp) :: ud(lx, lx, lx, nelv)
1082 real(kind=
rp) :: wr, ws, wt
1083 integer :: e, i, j, k, jj, kk, n_GLL
1084 n_gll = nelv * xh_gll%lxyz
1086 do jj = 1, lx * lx * nelv
1089 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
1091 ur(i, jj, 1, 1) = wr
1102 ws = ws + dy(j, kk) * u(i, kk, k, e)
1117 wt = wt + dz(k, kk) * u(i, j, kk, e)
1125 do i = 1, lx * lx * lx
1127 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
1128 + cs(i,e) * us(i,1,1,e) &
1129 + ct(i,e) * ut(i,1,1,e) )
1132 call gll_to_gl%map(du, ud, nelv, xh_gll)
1133 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
1134 call col2(du, coef_gll%Binv, n_gll)
1136 end subroutine sx_convect_scalar_lx6
1138 subroutine sx_convect_scalar_lx5(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
1139 coef_GLL, GLL_to_GL, nelv)
1140 integer,
parameter :: lx = 5
1141 integer,
intent(in) :: nelv
1142 type(space_t),
intent(in) :: Xh_GLL
1143 type(coef_t),
intent(in) :: coef_GLL
1144 type(interpolator_t),
intent(inout) :: GLL_to_GL
1145 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
1146 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
1147 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
1148 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
1149 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
1150 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
1151 real(kind=
rp) :: ur(lx, lx, lx, nelv)
1152 real(kind=
rp) :: us(lx, lx, lx, nelv)
1153 real(kind=
rp) :: ut(lx, lx, lx, nelv)
1154 real(kind=
rp) :: ud(lx, lx, lx, nelv)
1155 real(kind=
rp) :: wr, ws, wt
1156 integer :: e, i, j, k, jj, kk, n_GLL
1157 n_gll = nelv * xh_gll%lxyz
1159 do jj = 1, lx * lx * nelv
1162 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
1164 ur(i, jj, 1, 1) = wr
1175 ws = ws + dy(j, kk) * u(i, kk, k, e)
1190 wt = wt + dz(k, kk) * u(i, j, kk, e)
1198 do i = 1, lx * lx * lx
1200 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
1201 + cs(i,e) * us(i,1,1,e) &
1202 + ct(i,e) * ut(i,1,1,e) )
1205 call gll_to_gl%map(du, ud, nelv, xh_gll)
1206 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
1207 call col2(du, coef_gll%Binv, n_gll)
1209 end subroutine sx_convect_scalar_lx5
1211 subroutine sx_convect_scalar_lx4(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
1212 coef_GLL, GLL_to_GL, nelv)
1213 integer,
parameter :: lx = 4
1214 integer,
intent(in) :: nelv
1215 type(space_t),
intent(in) :: Xh_GLL
1216 type(coef_t),
intent(in) :: coef_GLL
1217 type(interpolator_t),
intent(inout) :: GLL_to_GL
1218 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
1219 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
1220 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
1221 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
1222 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
1223 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
1224 real(kind=
rp) :: ur(lx, lx, lx, nelv)
1225 real(kind=
rp) :: us(lx, lx, lx, nelv)
1226 real(kind=
rp) :: ut(lx, lx, lx, nelv)
1227 real(kind=
rp) :: ud(lx, lx, lx, nelv)
1228 real(kind=
rp) :: wr, ws, wt
1229 integer :: e, i, j, k, jj, kk, n_GLL
1230 n_gll = nelv * xh_gll%lxyz
1232 do jj = 1, lx * lx * nelv
1235 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
1237 ur(i, jj, 1, 1) = wr
1248 ws = ws + dy(j, kk) * u(i, kk, k, e)
1263 wt = wt + dz(k, kk) * u(i, j, kk, e)
1271 do i = 1, lx * lx * lx
1273 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
1274 + cs(i,e) * us(i,1,1,e) &
1275 + ct(i,e) * ut(i,1,1,e) )
1278 call gll_to_gl%map(du, ud, nelv, xh_gll)
1279 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
1280 call col2(du, coef_gll%Binv, n_gll)
1282 end subroutine sx_convect_scalar_lx4
1284 subroutine sx_convect_scalar_lx3(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
1285 coef_GLL, GLL_to_GL, nelv)
1286 integer,
parameter :: lx = 3
1287 integer,
intent(in) :: nelv
1288 type(space_t),
intent(in) :: Xh_GLL
1289 type(coef_t),
intent(in) :: coef_GLL
1290 type(interpolator_t),
intent(inout) :: GLL_to_GL
1291 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
1292 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
1293 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
1294 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
1295 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
1296 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
1297 real(kind=
rp) :: ur(lx, lx, lx, nelv)
1298 real(kind=
rp) :: us(lx, lx, lx, nelv)
1299 real(kind=
rp) :: ut(lx, lx, lx, nelv)
1300 real(kind=
rp) :: ud(lx, lx, lx, nelv)
1301 real(kind=
rp) :: wr, ws, wt
1302 integer :: e, i, j, k, jj, kk, n_GLL
1303 n_gll = nelv * xh_gll%lxyz
1305 do jj = 1, lx * lx * nelv
1308 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
1310 ur(i, jj, 1, 1) = wr
1321 ws = ws + dy(j, kk) * u(i, kk, k, e)
1336 wt = wt + dz(k, kk) * u(i, j, kk, e)
1344 do i = 1, lx * lx * lx
1346 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
1347 + cs(i,e) * us(i,1,1,e) &
1348 + ct(i,e) * ut(i,1,1,e) )
1351 call gll_to_gl%map(du, ud, nelv, xh_gll)
1352 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
1353 call col2(du, coef_gll%Binv, n_gll)
1355 end subroutine sx_convect_scalar_lx3
1357 subroutine sx_convect_scalar_lx2(du, u, cr, cs, ct, dx, dy, dz, Xh_GLL, &
1358 coef_GLL, GLL_to_GL, nelv)
1359 integer,
parameter :: lx = 2
1360 integer,
intent(in) :: nelv
1361 type(space_t),
intent(in) :: Xh_GLL
1362 type(coef_t),
intent(in) :: coef_GLL
1363 type(interpolator_t),
intent(inout) :: GLL_to_GL
1364 real(kind=
rp),
intent(inout) :: du(xh_gll%lx, xh_gll%lx, xh_gll%lx, nelv)
1365 real(kind=
rp),
intent(in) :: u(lx, lx, lx, nelv)
1366 real(kind=
rp),
intent(in) :: cr(lx*lx*lx, nelv)
1367 real(kind=
rp),
intent(in) :: cs(lx*lx*lx, nelv)
1368 real(kind=
rp),
intent(in) :: ct(lx*lx*lx, nelv)
1369 real(kind=
rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
1370 real(kind=
rp) :: ur(lx, lx, lx, nelv)
1371 real(kind=
rp) :: us(lx, lx, lx, nelv)
1372 real(kind=
rp) :: ut(lx, lx, lx, nelv)
1373 real(kind=
rp) :: ud(lx, lx, lx, nelv)
1374 real(kind=
rp) :: wr, ws, wt
1375 integer :: e, i, j, k, jj, kk, n_GLL
1376 n_gll = nelv * xh_gll%lxyz
1378 do jj = 1, lx * lx * nelv
1381 wr = wr + dx(i, kk) * u(kk, jj, 1, 1)
1383 ur(i, jj, 1, 1) = wr
1394 ws = ws + dy(j, kk) * u(i, kk, k, e)
1409 wt = wt + dz(k, kk) * u(i, j, kk, e)
1417 do i = 1, lx * lx * lx
1419 ud(i,1,1,e) = ( cr(i,e) * ur(i,1,1,e) &
1420 + cs(i,e) * us(i,1,1,e) &
1421 + ct(i,e) * ut(i,1,1,e) )
1424 call gll_to_gl%map(du, ud, nelv, xh_gll)
1425 call coef_gll%gs_h%op(du, n_gll, gs_op_add)
1426 call col2(du, coef_gll%Binv, n_gll)
1428 end subroutine sx_convect_scalar_lx2
1430end submodule sx_convect_scalar
subroutine, public col2(a, b, n)
Vector multiplication .
integer, parameter, public rp
Global precision used in computations.
Operators SX-Aurora backend.