39 module function opr_sx_cfl(dt, u, v, w, xh, coef, nelv) result(cfl)
40 type(space_t),
intent(in) :: Xh
41 type(coef_t),
intent(in) :: coef
42 integer,
intent(in) :: nelv
43 real(kind=rp),
intent(in) :: dt
44 real(kind=rp),
dimension(Xh%lx, Xh%ly, Xh%lz, nelv) :: u, v, w
49 cfl = sx_cfl_lx14(dt, u, v, w, &
50 coef%drdx, coef%dsdx, coef%dtdx, &
51 coef%drdy, coef%dsdy, coef%dtdy, &
52 coef%drdz, coef%dsdz, coef%dtdz, &
53 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
56 cfl = sx_cfl_lx13(dt, u, v, w, &
57 coef%drdx, coef%dsdx, coef%dtdx, &
58 coef%drdy, coef%dsdy, coef%dtdy, &
59 coef%drdz, coef%dsdz, coef%dtdz, &
60 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
63 cfl = sx_cfl_lx12(dt, u, v, w, &
64 coef%drdx, coef%dsdx, coef%dtdx, &
65 coef%drdy, coef%dsdy, coef%dtdy, &
66 coef%drdz, coef%dsdz, coef%dtdz, &
67 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
70 cfl = sx_cfl_lx11(dt, u, v, w, &
71 coef%drdx, coef%dsdx, coef%dtdx, &
72 coef%drdy, coef%dsdy, coef%dtdy, &
73 coef%drdz, coef%dsdz, coef%dtdz, &
74 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
77 cfl = sx_cfl_lx10(dt, u, v, w, &
78 coef%drdx, coef%dsdx, coef%dtdx, &
79 coef%drdy, coef%dsdy, coef%dtdy, &
80 coef%drdz, coef%dsdz, coef%dtdz, &
81 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
84 cfl = sx_cfl_lx9(dt, u, v, w, &
85 coef%drdx, coef%dsdx, coef%dtdx, &
86 coef%drdy, coef%dsdy, coef%dtdy, &
87 coef%drdz, coef%dsdz, coef%dtdz, &
88 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
91 cfl = sx_cfl_lx8(dt, u, v, w, &
92 coef%drdx, coef%dsdx, coef%dtdx, &
93 coef%drdy, coef%dsdy, coef%dtdy, &
94 coef%drdz, coef%dsdz, coef%dtdz, &
95 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
98 cfl = sx_cfl_lx7(dt, u, v, w, &
99 coef%drdx, coef%dsdx, coef%dtdx, &
100 coef%drdy, coef%dsdy, coef%dtdy, &
101 coef%drdz, coef%dsdz, coef%dtdz, &
102 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
105 cfl = sx_cfl_lx6(dt, u, v, w, &
106 coef%drdx, coef%dsdx, coef%dtdx, &
107 coef%drdy, coef%dsdy, coef%dtdy, &
108 coef%drdz, coef%dsdz, coef%dtdz, &
109 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
112 cfl = sx_cfl_lx5(dt, u, v, w, &
113 coef%drdx, coef%dsdx, coef%dtdx, &
114 coef%drdy, coef%dsdy, coef%dtdy, &
115 coef%drdz, coef%dsdz, coef%dtdz, &
116 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
119 cfl = sx_cfl_lx4(dt, u, v, w, &
120 coef%drdx, coef%dsdx, coef%dtdx, &
121 coef%drdy, coef%dsdy, coef%dtdy, &
122 coef%drdz, coef%dsdz, coef%dtdz, &
123 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
126 cfl = sx_cfl_lx3(dt, u, v, w, &
127 coef%drdx, coef%dsdx, coef%dtdx, &
128 coef%drdy, coef%dsdy, coef%dtdy, &
129 coef%drdz, coef%dsdz, coef%dtdz, &
130 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
133 cfl = sx_cfl_lx2(dt, u, v, w, &
134 coef%drdx, coef%dsdx, coef%dtdx, &
135 coef%drdy, coef%dsdy, coef%dtdy, &
136 coef%drdz, coef%dsdz, coef%dtdz, &
137 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
140 cfl = sx_cfl_lx(dt, u, v, w, &
141 coef%drdx, coef%dsdx, coef%dtdx, &
142 coef%drdy, coef%dsdy, coef%dtdy, &
143 coef%drdz, coef%dsdz, coef%dtdz, &
144 xh%dr_inv, xh%ds_inv, xh%dt_inv, &
145 coef%jacinv, nelv, xh%lx)
148 end function opr_sx_cfl
150 function sx_cfl_lx(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
151 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
152 jacinv, nelv, lx)
result(cfl)
153 integer,
intent(in) :: nelv, lx
154 real(kind=rp),
intent(in) :: dt
155 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
156 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
157 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
158 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
159 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
160 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
161 real(kind=rp) :: cflr, cfls, cflt, cflm
162 real(kind=rp) :: ur, us, ut
164 integer :: i, j, k, e
171 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
172 + v(i,j,k,e)*drdy(i,j,k,e) &
173 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
174 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
175 + v(i,j,k,e)*dsdy(i,j,k,e) &
176 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
177 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
178 + v(i,j,k,e)*dtdy(i,j,k,e) &
179 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
181 cflr = abs(dt*ur*dr_inv(i))
182 cfls = abs(dt*us*ds_inv(j))
183 cflt = abs(dt*ut*dt_inv(k))
185 cflm = cflr + cfls + cflt
192 end function sx_cfl_lx
194 function sx_cfl_lx14(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
195 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
196 jacinv, nelv)
result(cfl)
197 integer,
parameter :: lx = 14
198 integer,
intent(in) :: nelv
199 real(kind=rp),
intent(in) :: dt
200 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
201 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
202 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
203 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
204 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
205 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
206 real(kind=rp) :: cflr, cfls, cflt, cflm
207 real(kind=rp) :: ur, us, ut
209 integer :: i, j, k, e
216 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
217 + v(i,j,k,e)*drdy(i,j,k,e) &
218 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
219 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
220 + v(i,j,k,e)*dsdy(i,j,k,e) &
221 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
222 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
223 + v(i,j,k,e)*dtdy(i,j,k,e) &
224 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
226 cflr = abs(dt*ur*dr_inv(i))
227 cfls = abs(dt*us*ds_inv(j))
228 cflt = abs(dt*ut*dt_inv(k))
230 cflm = cflr + cfls + cflt
237 end function sx_cfl_lx14
239 function sx_cfl_lx13(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
240 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
241 jacinv, nelv)
result(cfl)
242 integer,
parameter :: lx = 13
243 integer,
intent(in) :: nelv
244 real(kind=rp),
intent(in) :: dt
245 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
246 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
247 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
248 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
249 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
250 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
251 real(kind=rp) :: cflr, cfls, cflt, cflm
252 real(kind=rp) :: ur, us, ut
254 integer :: i, j, k, e
261 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
262 + v(i,j,k,e)*drdy(i,j,k,e) &
263 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
264 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
265 + v(i,j,k,e)*dsdy(i,j,k,e) &
266 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
267 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
268 + v(i,j,k,e)*dtdy(i,j,k,e) &
269 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
271 cflr = abs(dt*ur*dr_inv(i))
272 cfls = abs(dt*us*ds_inv(j))
273 cflt = abs(dt*ut*dt_inv(k))
275 cflm = cflr + cfls + cflt
282 end function sx_cfl_lx13
284 function sx_cfl_lx12(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
285 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
286 jacinv, nelv)
result(cfl)
287 integer,
parameter :: lx = 12
288 integer,
intent(in) :: nelv
289 real(kind=rp),
intent(in) :: dt
290 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
291 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
292 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
293 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
294 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
295 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
296 real(kind=rp) :: cflr, cfls, cflt, cflm
297 real(kind=rp) :: ur, us, ut
299 integer :: i, j, k, e
306 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
307 + v(i,j,k,e)*drdy(i,j,k,e) &
308 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
309 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
310 + v(i,j,k,e)*dsdy(i,j,k,e) &
311 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
312 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
313 + v(i,j,k,e)*dtdy(i,j,k,e) &
314 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
316 cflr = abs(dt*ur*dr_inv(i))
317 cfls = abs(dt*us*ds_inv(j))
318 cflt = abs(dt*ut*dt_inv(k))
320 cflm = cflr + cfls + cflt
327 end function sx_cfl_lx12
329 function sx_cfl_lx11(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
330 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
331 jacinv, nelv)
result(cfl)
332 integer,
parameter :: lx = 11
333 integer,
intent(in) :: nelv
334 real(kind=rp),
intent(in) :: dt
335 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
336 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
337 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
338 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
339 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
340 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
341 real(kind=rp) :: cflr, cfls, cflt, cflm
342 real(kind=rp) :: ur, us, ut
344 integer :: i, j, k, e
351 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
352 + v(i,j,k,e)*drdy(i,j,k,e) &
353 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
354 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
355 + v(i,j,k,e)*dsdy(i,j,k,e) &
356 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
357 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
358 + v(i,j,k,e)*dtdy(i,j,k,e) &
359 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
361 cflr = abs(dt*ur*dr_inv(i))
362 cfls = abs(dt*us*ds_inv(j))
363 cflt = abs(dt*ut*dt_inv(k))
365 cflm = cflr + cfls + cflt
372 end function sx_cfl_lx11
374 function sx_cfl_lx10(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
375 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
376 jacinv, nelv)
result(cfl)
377 integer,
parameter :: lx = 10
378 integer,
intent(in) :: nelv
379 real(kind=rp),
intent(in) :: dt
380 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
381 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
382 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
383 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
384 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
385 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
386 real(kind=rp) :: cflr, cfls, cflt, cflm
387 real(kind=rp) :: ur, us, ut
389 integer :: i, j, k, e
396 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
397 + v(i,j,k,e)*drdy(i,j,k,e) &
398 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
399 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
400 + v(i,j,k,e)*dsdy(i,j,k,e) &
401 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
402 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
403 + v(i,j,k,e)*dtdy(i,j,k,e) &
404 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
406 cflr = abs(dt*ur*dr_inv(i))
407 cfls = abs(dt*us*ds_inv(j))
408 cflt = abs(dt*ut*dt_inv(k))
410 cflm = cflr + cfls + cflt
417 end function sx_cfl_lx10
419 function sx_cfl_lx9(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
420 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
421 jacinv, nelv)
result(cfl)
422 integer,
parameter :: lx = 9
423 integer,
intent(in) :: nelv
424 real(kind=rp),
intent(in) :: dt
425 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
426 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
427 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
428 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
429 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
430 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
431 real(kind=rp) :: cflr, cfls, cflt, cflm
432 real(kind=rp) :: ur, us, ut
434 integer :: i, j, k, e
441 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
442 + v(i,j,k,e)*drdy(i,j,k,e) &
443 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
444 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
445 + v(i,j,k,e)*dsdy(i,j,k,e) &
446 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
447 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
448 + v(i,j,k,e)*dtdy(i,j,k,e) &
449 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
451 cflr = abs(dt*ur*dr_inv(i))
452 cfls = abs(dt*us*ds_inv(j))
453 cflt = abs(dt*ut*dt_inv(k))
455 cflm = cflr + cfls + cflt
462 end function sx_cfl_lx9
464 function sx_cfl_lx8(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
465 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
466 jacinv, nelv)
result(cfl)
467 integer,
parameter :: lx = 8
468 integer,
intent(in) :: nelv
469 real(kind=rp),
intent(in) :: dt
470 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
471 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
472 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
473 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
474 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
475 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
476 real(kind=rp) :: cflr, cfls, cflt, cflm
477 real(kind=rp) :: ur, us, ut
479 integer :: i, j, k, e
486 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
487 + v(i,j,k,e)*drdy(i,j,k,e) &
488 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
489 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
490 + v(i,j,k,e)*dsdy(i,j,k,e) &
491 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
492 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
493 + v(i,j,k,e)*dtdy(i,j,k,e) &
494 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
496 cflr = abs(dt*ur*dr_inv(i))
497 cfls = abs(dt*us*ds_inv(j))
498 cflt = abs(dt*ut*dt_inv(k))
500 cflm = cflr + cfls + cflt
507 end function sx_cfl_lx8
509 function sx_cfl_lx7(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
510 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
511 jacinv, nelv)
result(cfl)
512 integer,
parameter :: lx = 7
513 integer,
intent(in) :: nelv
514 real(kind=rp),
intent(in) :: dt
515 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
516 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
517 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
518 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
519 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
520 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
521 real(kind=rp) :: cflr, cfls, cflt, cflm
522 real(kind=rp) :: ur, us, ut
524 integer :: i, j, k, e
531 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
532 + v(i,j,k,e)*drdy(i,j,k,e) &
533 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
534 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
535 + v(i,j,k,e)*dsdy(i,j,k,e) &
536 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
537 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
538 + v(i,j,k,e)*dtdy(i,j,k,e) &
539 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
541 cflr = abs(dt*ur*dr_inv(i))
542 cfls = abs(dt*us*ds_inv(j))
543 cflt = abs(dt*ut*dt_inv(k))
545 cflm = cflr + cfls + cflt
552 end function sx_cfl_lx7
554 function sx_cfl_lx6(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
555 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
556 jacinv, nelv)
result(cfl)
557 integer,
parameter :: lx = 6
558 integer,
intent(in) :: nelv
559 real(kind=rp),
intent(in) :: dt
560 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
561 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
562 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
563 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
564 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
565 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
566 real(kind=rp) :: cflr, cfls, cflt, cflm
567 real(kind=rp) :: ur, us, ut
569 integer :: i, j, k, e
576 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
577 + v(i,j,k,e)*drdy(i,j,k,e) &
578 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
579 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
580 + v(i,j,k,e)*dsdy(i,j,k,e) &
581 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
582 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
583 + v(i,j,k,e)*dtdy(i,j,k,e) &
584 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
586 cflr = abs(dt*ur*dr_inv(i))
587 cfls = abs(dt*us*ds_inv(j))
588 cflt = abs(dt*ut*dt_inv(k))
590 cflm = cflr + cfls + cflt
597 end function sx_cfl_lx6
599 function sx_cfl_lx5(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
600 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
601 jacinv, nelv)
result(cfl)
602 integer,
parameter :: lx = 5
603 integer,
intent(in) :: nelv
604 real(kind=rp),
intent(in) :: dt
605 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
606 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
607 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
608 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
609 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
610 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
611 real(kind=rp) :: cflr, cfls, cflt, cflm
612 real(kind=rp) :: ur, us, ut
614 integer :: i, j, k, e
621 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
622 + v(i,j,k,e)*drdy(i,j,k,e) &
623 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
624 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
625 + v(i,j,k,e)*dsdy(i,j,k,e) &
626 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
627 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
628 + v(i,j,k,e)*dtdy(i,j,k,e) &
629 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
631 cflr = abs(dt*ur*dr_inv(i))
632 cfls = abs(dt*us*ds_inv(j))
633 cflt = abs(dt*ut*dt_inv(k))
635 cflm = cflr + cfls + cflt
642 end function sx_cfl_lx5
644 function sx_cfl_lx4(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
645 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
646 jacinv, nelv)
result(cfl)
647 integer,
parameter :: lx = 4
648 integer,
intent(in) :: nelv
649 real(kind=rp),
intent(in) :: dt
650 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
651 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
652 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
653 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
654 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
655 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
656 real(kind=rp) :: cflr, cfls, cflt, cflm
657 real(kind=rp) :: ur, us, ut
659 integer :: i, j, k, e
666 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
667 + v(i,j,k,e)*drdy(i,j,k,e) &
668 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
669 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
670 + v(i,j,k,e)*dsdy(i,j,k,e) &
671 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
672 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
673 + v(i,j,k,e)*dtdy(i,j,k,e) &
674 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
676 cflr = abs(dt*ur*dr_inv(i))
677 cfls = abs(dt*us*ds_inv(j))
678 cflt = abs(dt*ut*dt_inv(k))
680 cflm = cflr + cfls + cflt
687 end function sx_cfl_lx4
689 function sx_cfl_lx3(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
690 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
691 jacinv, nelv)
result(cfl)
692 integer,
parameter :: lx = 3
693 integer,
intent(in) :: nelv
694 real(kind=rp),
intent(in) :: dt
695 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
696 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
697 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
698 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
699 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
700 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
701 real(kind=rp) :: cflr, cfls, cflt, cflm
702 real(kind=rp) :: ur, us, ut
704 integer :: i, j, k, e
711 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
712 + v(i,j,k,e)*drdy(i,j,k,e) &
713 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
714 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
715 + v(i,j,k,e)*dsdy(i,j,k,e) &
716 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
717 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
718 + v(i,j,k,e)*dtdy(i,j,k,e) &
719 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
721 cflr = abs(dt*ur*dr_inv(i))
722 cfls = abs(dt*us*ds_inv(j))
723 cflt = abs(dt*ut*dt_inv(k))
725 cflm = cflr + cfls + cflt
732 end function sx_cfl_lx3
734 function sx_cfl_lx2(dt, u, v, w, drdx, dsdx, dtdx, drdy, dsdy, dtdy, &
735 drdz, dsdz, dtdz, dr_inv, ds_inv, dt_inv, &
736 jacinv, nelv)
result(cfl)
737 integer,
parameter :: lx = 2
738 integer,
intent(in) :: nelv
739 real(kind=rp),
intent(in) :: dt
740 real(kind=rp),
dimension(lx, lx, lx, nelv) :: u, v, w
741 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdx, dsdx, dtdx
742 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdy, dsdy, dtdy
743 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: drdz, dsdz, dtdz
744 real(kind=rp),
dimension(lx),
intent(in) :: dr_inv, ds_inv, dt_inv
745 real(kind=rp),
dimension(lx, lx, lx, nelv),
intent(in) :: jacinv
746 real(kind=rp) :: cflr, cfls, cflt, cflm
747 real(kind=rp) :: ur, us, ut
749 integer :: i, j, k, e
756 ur = ( u(i,j,k,e)*drdx(i,j,k,e) &
757 + v(i,j,k,e)*drdy(i,j,k,e) &
758 + w(i,j,k,e)*drdz(i,j,k,e) ) * jacinv(i,j,k,e)
759 us = ( u(i,j,k,e)*dsdx(i,j,k,e) &
760 + v(i,j,k,e)*dsdy(i,j,k,e) &
761 + w(i,j,k,e)*dsdz(i,j,k,e) ) * jacinv(i,j,k,e)
762 ut = ( u(i,j,k,e)*dtdx(i,j,k,e) &
763 + v(i,j,k,e)*dtdy(i,j,k,e) &
764 + w(i,j,k,e)*dtdz(i,j,k,e) ) * jacinv(i,j,k,e)
766 cflr = abs(dt*ur*dr_inv(i))
767 cfls = abs(dt*us*ds_inv(j))
768 cflt = abs(dt*ut*dt_inv(k))
770 cflm = cflr + cfls + cflt
777 end function sx_cfl_lx2
Operators SX-Aurora backend.