46 real(kind=
rp),
allocatable :: d(:,:,:,:)
47 type(
gs_t),
pointer :: gs_h
61 type(
coef_t),
intent(inout),
target :: coef
62 type(
dofmap_t),
intent(inout),
target :: dof
63 type(
gs_t),
intent(inout),
target :: gs_h
69 allocate(this%d(dof%Xh%lx,dof%Xh%ly,dof%Xh%lz, dof%msh%nelv))
76 if (
allocated(this%d))
then
87 integer,
intent(in) :: n
89 real(kind=
rp),
dimension(n),
intent(inout) :: z
90 real(kind=
rp),
dimension(n),
intent(inout) :: r
91 call col3(z,r,this%d,n)
97 associate(dof => this%dof, coef => this%coef, &
98 gs_h => this%gs_h, nelv => this%dof%msh%nelv)
108 call sx_update_lx13(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
109 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
111 call sx_update_lx13(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
112 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
114 call sx_update_lx12(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
115 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
117 call sx_update_lx11(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
118 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
120 call sx_update_lx10(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
121 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
123 call sx_update_lx9(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
124 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
126 call sx_update_lx8(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
127 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
129 call sx_update_lx7(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
130 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
132 call sx_update_lx6(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
133 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
135 call sx_update_lx5(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
136 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
138 call sx_update_lx4(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
139 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
141 call sx_update_lx2(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
142 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, nelv)
144 call sx_update_lx(this%d, coef%Xh%dxt, coef%Xh%dyt, coef%Xh%dzt, &
145 coef%G11, coef%G22, coef%G33, coef%G12, coef%G13, coef%G23, &
149 call col2(this%d, coef%h1, coef%dof%size())
150 if (coef%ifh2)
call addcol3(this%d, coef%h2, coef%B, coef%dof%size())
151 call gs_h%op(this%d, dof%size(), gs_op_add)
152 if (.not. coef%ifh2)
call col2(this%d, coef%mult, coef%dof%size())
153 call invcol1(this%d, dof%size())
157 subroutine sx_update_lx(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n, lx)
158 integer,
intent(in) :: n, lx
159 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
160 real(kind=rp),
intent(in) :: dxt(lx,lx)
161 real(kind=rp),
intent(in) :: dyt(lx,lx)
162 real(kind=rp),
intent(in) :: dzt(lx,lx)
163 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
164 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
165 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
166 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
167 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
168 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
169 integer :: i, j, k, l, e
177 d(i,j,k,e) = d(i,j,k,e) + &
178 g11(l,j,k,e) * dxt(i,l)**2
180 d(i,j,k,e) = d(i,j,k,e) + &
181 g22(i,l,k,e) * dyt(j,l)**2
183 d(i,j,k,e) = d(i,j,k,e) + &
184 g33(i,j,l,e) * dzt(k,l)**2
195 d(1,j,k,e) = d(1,j,k,e) &
196 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
197 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
198 d(lx,j,k,e) = d(lx,j,k,e) &
199 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
200 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
208 d(i,1,k,e) = d(i,1,k,e) &
209 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
210 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
211 d(i,lx,k,e) = d(i,lx,k,e) &
212 + g12(i,lx,k,e) * dyt(lx,lx)*dxt(i,i) &
213 + g23(i,lx,k,e) * dyt(lx,lx)*dzt(k,k)
221 d(i,j,1,e) = d(i,j,1,e) &
222 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
223 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
224 d(i,j,lx,e) = d(i,j,lx,e) &
225 + g13(i,j,lx,e) * dzt(lx,lx)*dxt(i,i) &
226 + g23(i,j,lx,e) * dzt(lx,lx)*dyt(j,j)
233 subroutine sx_update_lx14(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
234 integer,
parameter :: lx = 14
235 integer,
parameter :: ly = 14
236 integer,
parameter :: lz = 14
237 integer,
intent(in) :: n
238 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
239 real(kind=rp),
intent(in) :: dxt(lx,lx)
240 real(kind=rp),
intent(in) :: dyt(lx,lx)
241 real(kind=rp),
intent(in) :: dzt(lx,lx)
242 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
243 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
244 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
245 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
246 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
247 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
248 integer :: i, j, k, l, e
256 d(i,j,k,e) = d(i,j,k,e) + &
257 g11(l,j,k,e) * dxt(i,l)**2
259 d(i,j,k,e) = d(i,j,k,e) + &
260 g22(i,l,k,e) * dyt(j,l)**2
262 d(i,j,k,e) = d(i,j,k,e) + &
263 g33(i,j,l,e) * dzt(k,l)**2
274 d(1,j,k,e) = d(1,j,k,e) &
275 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
276 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
277 d(lx,j,k,e) = d(lx,j,k,e) &
278 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
279 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
287 d(i,1,k,e) = d(i,1,k,e) &
288 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
289 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
290 d(i,ly,k,e) = d(i,ly,k,e) &
291 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
292 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
300 d(i,j,1,e) = d(i,j,1,e) &
301 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
302 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
303 d(i,j,lz,e) = d(i,j,lz,e) &
304 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
305 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
312 subroutine sx_update_lx13(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
313 integer,
parameter :: lx = 13
314 integer,
parameter :: ly = 13
315 integer,
parameter :: lz = 13
316 integer,
intent(in) :: n
317 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
318 real(kind=rp),
intent(in) :: dxt(lx,lx)
319 real(kind=rp),
intent(in) :: dyt(lx,lx)
320 real(kind=rp),
intent(in) :: dzt(lx,lx)
321 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
322 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
323 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
324 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
325 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
326 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
327 integer :: i, j, k, l, e
335 d(i,j,k,e) = d(i,j,k,e) + &
336 g11(l,j,k,e) * dxt(i,l)**2
338 d(i,j,k,e) = d(i,j,k,e) + &
339 g22(i,l,k,e) * dyt(j,l)**2
341 d(i,j,k,e) = d(i,j,k,e) + &
342 g33(i,j,l,e) * dzt(k,l)**2
353 d(1,j,k,e) = d(1,j,k,e) &
354 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
355 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
356 d(lx,j,k,e) = d(lx,j,k,e) &
357 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
358 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
366 d(i,1,k,e) = d(i,1,k,e) &
367 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
368 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
369 d(i,ly,k,e) = d(i,ly,k,e) &
370 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
371 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
379 d(i,j,1,e) = d(i,j,1,e) &
380 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
381 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
382 d(i,j,lz,e) = d(i,j,lz,e) &
383 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
384 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
391 subroutine sx_update_lx12(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
392 integer,
parameter :: lx = 12
393 integer,
parameter :: ly = 12
394 integer,
parameter :: lz = 12
395 integer,
intent(in) :: n
396 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
397 real(kind=rp),
intent(in) :: dxt(lx,lx)
398 real(kind=rp),
intent(in) :: dyt(lx,lx)
399 real(kind=rp),
intent(in) :: dzt(lx,lx)
400 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
401 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
402 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
403 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
404 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
405 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
406 integer :: i, j, k, l, e
414 d(i,j,k,e) = d(i,j,k,e) + &
415 g11(l,j,k,e) * dxt(i,l)**2
417 d(i,j,k,e) = d(i,j,k,e) + &
418 g22(i,l,k,e) * dyt(j,l)**2
420 d(i,j,k,e) = d(i,j,k,e) + &
421 g33(i,j,l,e) * dzt(k,l)**2
432 d(1,j,k,e) = d(1,j,k,e) &
433 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
434 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
435 d(lx,j,k,e) = d(lx,j,k,e) &
436 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
437 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
445 d(i,1,k,e) = d(i,1,k,e) &
446 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
447 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
448 d(i,ly,k,e) = d(i,ly,k,e) &
449 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
450 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
458 d(i,j,1,e) = d(i,j,1,e) &
459 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
460 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
461 d(i,j,lz,e) = d(i,j,lz,e) &
462 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
463 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
470 subroutine sx_update_lx11(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
471 integer,
parameter :: lx = 11
472 integer,
parameter :: ly = 11
473 integer,
parameter :: lz = 11
474 integer,
intent(in) :: n
475 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
476 real(kind=rp),
intent(in) :: dxt(lx,lx)
477 real(kind=rp),
intent(in) :: dyt(lx,lx)
478 real(kind=rp),
intent(in) :: dzt(lx,lx)
479 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
480 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
481 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
482 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
483 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
484 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
485 integer :: i, j, k, l, e
493 d(i,j,k,e) = d(i,j,k,e) + &
494 g11(l,j,k,e) * dxt(i,l)**2
496 d(i,j,k,e) = d(i,j,k,e) + &
497 g22(i,l,k,e) * dyt(j,l)**2
499 d(i,j,k,e) = d(i,j,k,e) + &
500 g33(i,j,l,e) * dzt(k,l)**2
511 d(1,j,k,e) = d(1,j,k,e) &
512 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
513 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
514 d(lx,j,k,e) = d(lx,j,k,e) &
515 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
516 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
524 d(i,1,k,e) = d(i,1,k,e) &
525 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
526 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
527 d(i,ly,k,e) = d(i,ly,k,e) &
528 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
529 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
537 d(i,j,1,e) = d(i,j,1,e) &
538 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
539 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
540 d(i,j,lz,e) = d(i,j,lz,e) &
541 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
542 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
549 subroutine sx_update_lx10(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
550 integer,
parameter :: lx = 10
551 integer,
parameter :: ly = 10
552 integer,
parameter :: lz = 10
553 integer,
intent(in) :: n
554 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
555 real(kind=rp),
intent(in) :: dxt(lx,lx)
556 real(kind=rp),
intent(in) :: dyt(lx,lx)
557 real(kind=rp),
intent(in) :: dzt(lx,lx)
558 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
559 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
560 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
561 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
562 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
563 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
564 integer :: i, j, k, l, e
572 d(i,j,k,e) = d(i,j,k,e) + &
573 g11(l,j,k,e) * dxt(i,l)**2
575 d(i,j,k,e) = d(i,j,k,e) + &
576 g22(i,l,k,e) * dyt(j,l)**2
578 d(i,j,k,e) = d(i,j,k,e) + &
579 g33(i,j,l,e) * dzt(k,l)**2
590 d(1,j,k,e) = d(1,j,k,e) &
591 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
592 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
593 d(lx,j,k,e) = d(lx,j,k,e) &
594 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
595 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
603 d(i,1,k,e) = d(i,1,k,e) &
604 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
605 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
606 d(i,ly,k,e) = d(i,ly,k,e) &
607 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
608 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
616 d(i,j,1,e) = d(i,j,1,e) &
617 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
618 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
619 d(i,j,lz,e) = d(i,j,lz,e) &
620 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
621 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
628 subroutine sx_update_lx9(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
629 integer,
parameter :: lx = 9
630 integer,
parameter :: ly = 9
631 integer,
parameter :: lz = 9
632 integer,
intent(in) :: n
633 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
634 real(kind=rp),
intent(in) :: dxt(lx,lx)
635 real(kind=rp),
intent(in) :: dyt(lx,lx)
636 real(kind=rp),
intent(in) :: dzt(lx,lx)
637 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
638 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
639 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
640 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
641 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
642 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
643 integer :: i, j, k, l, e
651 d(i,j,k,e) = d(i,j,k,e) + &
652 g11(l,j,k,e) * dxt(i,l)**2
654 d(i,j,k,e) = d(i,j,k,e) + &
655 g22(i,l,k,e) * dyt(j,l)**2
657 d(i,j,k,e) = d(i,j,k,e) + &
658 g33(i,j,l,e) * dzt(k,l)**2
669 d(1,j,k,e) = d(1,j,k,e) &
670 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
671 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
672 d(lx,j,k,e) = d(lx,j,k,e) &
673 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
674 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
682 d(i,1,k,e) = d(i,1,k,e) &
683 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
684 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
685 d(i,ly,k,e) = d(i,ly,k,e) &
686 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
687 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
695 d(i,j,1,e) = d(i,j,1,e) &
696 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
697 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
698 d(i,j,lz,e) = d(i,j,lz,e) &
699 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
700 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
707 subroutine sx_update_lx8(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
708 integer,
parameter :: lx = 8
709 integer,
parameter :: ly = 8
710 integer,
parameter :: lz = 8
711 integer,
intent(in) :: n
712 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
713 real(kind=rp),
intent(in) :: dxt(lx,lx)
714 real(kind=rp),
intent(in) :: dyt(lx,lx)
715 real(kind=rp),
intent(in) :: dzt(lx,lx)
716 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
717 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
718 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
719 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
720 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
721 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
722 integer :: i, j, k, l, e
730 d(i,j,k,e) = d(i,j,k,e) + &
731 g11(l,j,k,e) * dxt(i,l)**2
733 d(i,j,k,e) = d(i,j,k,e) + &
734 g22(i,l,k,e) * dyt(j,l)**2
736 d(i,j,k,e) = d(i,j,k,e) + &
737 g33(i,j,l,e) * dzt(k,l)**2
748 d(1,j,k,e) = d(1,j,k,e) &
749 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
750 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
751 d(lx,j,k,e) = d(lx,j,k,e) &
752 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
753 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
761 d(i,1,k,e) = d(i,1,k,e) &
762 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
763 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
764 d(i,ly,k,e) = d(i,ly,k,e) &
765 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
766 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
774 d(i,j,1,e) = d(i,j,1,e) &
775 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
776 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
777 d(i,j,lz,e) = d(i,j,lz,e) &
778 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
779 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
786 subroutine sx_update_lx7(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
787 integer,
parameter :: lx = 7
788 integer,
parameter :: ly = 7
789 integer,
parameter :: lz = 7
790 integer,
intent(in) :: n
791 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
792 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
793 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
794 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
795 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
796 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
797 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
798 real(kind=rp),
intent(in) :: dxt(lx,lx)
799 real(kind=rp),
intent(in) :: dyt(lx,lx)
800 real(kind=rp),
intent(in) :: dzt(lx,lx)
801 integer :: i, j, k, l, e
808 d(i,j,k,e) = d(i,j,k,e) + &
809 g11(l,j,k,e) * dxt(i,l)**2
811 d(i,j,k,e) = d(i,j,k,e) + &
812 g22(i,l,k,e) * dyt(j,l)**2
814 d(i,j,k,e) = d(i,j,k,e) + &
815 g33(i,j,l,e) * dzt(k,l)**2
826 d(1,j,k,e) = d(1,j,k,e) &
827 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
828 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
829 d(lx,j,k,e) = d(lx,j,k,e) &
830 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
831 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
839 d(i,1,k,e) = d(i,1,k,e) &
840 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
841 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
842 d(i,ly,k,e) = d(i,ly,k,e) &
843 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
844 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
852 d(i,j,1,e) = d(i,j,1,e) &
853 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
854 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
855 d(i,j,lz,e) = d(i,j,lz,e) &
856 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
857 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
865 subroutine sx_update_lx6(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
866 integer,
parameter :: lx = 6
867 integer,
parameter :: ly = 6
868 integer,
parameter :: lz = 6
869 integer,
intent(in) :: n
870 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
871 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
872 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
873 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
874 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
875 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
876 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
877 real(kind=rp),
intent(in) :: dxt(lx,lx)
878 real(kind=rp),
intent(in) :: dyt(lx,lx)
879 real(kind=rp),
intent(in) :: dzt(lx,lx)
880 integer :: i, j, k, l, e
887 d(i,j,k,e) = d(i,j,k,e) + &
888 g11(l,j,k,e) * dxt(i,l)**2
890 d(i,j,k,e) = d(i,j,k,e) + &
891 g22(i,l,k,e) * dyt(j,l)**2
893 d(i,j,k,e) = d(i,j,k,e) + &
894 g33(i,j,l,e) * dzt(k,l)**2
905 d(1,j,k,e) = d(1,j,k,e) &
906 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
907 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
908 d(lx,j,k,e) = d(lx,j,k,e) &
909 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
910 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
918 d(i,1,k,e) = d(i,1,k,e) &
919 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
920 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
921 d(i,ly,k,e) = d(i,ly,k,e) &
922 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
923 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
931 d(i,j,1,e) = d(i,j,1,e) &
932 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
933 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
934 d(i,j,lz,e) = d(i,j,lz,e) &
935 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
936 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
944 subroutine sx_update_lx5(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
945 integer,
parameter :: lx = 5
946 integer,
parameter :: ly = 5
947 integer,
parameter :: lz = 5
948 integer,
intent(in) :: n
949 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
950 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
951 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
952 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
953 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
954 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
955 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
956 real(kind=rp),
intent(in) :: dxt(lx,lx)
957 real(kind=rp),
intent(in) :: dyt(lx,lx)
958 real(kind=rp),
intent(in) :: dzt(lx,lx)
959 integer :: i, j, k, l, e
966 d(i,j,k,e) = d(i,j,k,e) + &
967 g11(l,j,k,e) * dxt(i,l)**2
969 d(i,j,k,e) = d(i,j,k,e) + &
970 g22(i,l,k,e) * dyt(j,l)**2
972 d(i,j,k,e) = d(i,j,k,e) + &
973 g33(i,j,l,e) * dzt(k,l)**2
984 d(1,j,k,e) = d(1,j,k,e) &
985 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
986 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
987 d(lx,j,k,e) = d(lx,j,k,e) &
988 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
989 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
997 d(i,1,k,e) = d(i,1,k,e) &
998 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
999 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
1000 d(i,ly,k,e) = d(i,ly,k,e) &
1001 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
1002 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
1010 d(i,j,1,e) = d(i,j,1,e) &
1011 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
1012 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
1013 d(i,j,lz,e) = d(i,j,lz,e) &
1014 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
1015 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
1023 subroutine sx_update_lx4(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
1024 integer,
parameter :: lx = 4
1025 integer,
parameter :: ly = 4
1026 integer,
parameter :: lz = 4
1027 integer,
intent(in) :: n
1028 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
1029 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
1030 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
1031 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
1032 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
1033 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
1034 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
1035 real(kind=rp),
intent(in) :: dxt(lx,lx)
1036 real(kind=rp),
intent(in) :: dyt(lx,lx)
1037 real(kind=rp),
intent(in) :: dzt(lx,lx)
1038 integer :: i, j, k, l, e
1045 d(i,j,k,e) = d(i,j,k,e) + &
1046 g11(l,j,k,e) * dxt(i,l)**2
1048 d(i,j,k,e) = d(i,j,k,e) + &
1049 g22(i,l,k,e) * dyt(j,l)**2
1051 d(i,j,k,e) = d(i,j,k,e) + &
1052 g33(i,j,l,e) * dzt(k,l)**2
1063 d(1,j,k,e) = d(1,j,k,e) &
1064 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
1065 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
1066 d(lx,j,k,e) = d(lx,j,k,e) &
1067 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
1068 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
1076 d(i,1,k,e) = d(i,1,k,e) &
1077 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
1078 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
1079 d(i,ly,k,e) = d(i,ly,k,e) &
1080 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
1081 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
1089 d(i,j,1,e) = d(i,j,1,e) &
1090 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
1091 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
1092 d(i,j,lz,e) = d(i,j,lz,e) &
1093 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
1094 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
1102 subroutine sx_update_lx3(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
1103 integer,
parameter :: lx = 3
1104 integer,
parameter :: ly = 3
1105 integer,
parameter :: lz = 3
1106 integer,
intent(in) :: n
1107 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
1108 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
1109 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
1110 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
1111 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
1112 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
1113 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
1114 real(kind=rp),
intent(in) :: dxt(lx,lx)
1115 real(kind=rp),
intent(in) :: dyt(lx,lx)
1116 real(kind=rp),
intent(in) :: dzt(lx,lx)
1117 integer :: i, j, k, l, e
1125 d(i,j,k,e) = d(i,j,k,e) + &
1126 g11(l,j,k,e) * dxt(i,l)**2
1128 d(i,j,k,e) = d(i,j,k,e) + &
1129 g22(i,l,k,e) * dyt(j,l)**2
1131 d(i,j,k,e) = d(i,j,k,e) + &
1132 g33(i,j,l,e) * dzt(k,l)**2
1143 d(1,j,k,e) = d(1,j,k,e) &
1144 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
1145 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
1146 d(lx,j,k,e) = d(lx,j,k,e) &
1147 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
1148 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
1156 d(i,1,k,e) = d(i,1,k,e) &
1157 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
1158 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
1159 d(i,ly,k,e) = d(i,ly,k,e) &
1160 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
1161 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
1169 d(i,j,1,e) = d(i,j,1,e) &
1170 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
1171 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
1172 d(i,j,lz,e) = d(i,j,lz,e) &
1173 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
1174 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
1181 subroutine sx_update_lx2(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
1182 integer,
parameter :: lx = 2
1183 integer,
parameter :: ly = 2
1184 integer,
parameter :: lz = 2
1185 integer,
intent(in) :: n
1186 real(kind=rp),
intent(inout) :: d(lx, lx, lx, n)
1187 real(kind=rp),
intent(in) :: g11(lx, lx, lx, n)
1188 real(kind=rp),
intent(in) :: g22(lx, lx, lx, n)
1189 real(kind=rp),
intent(in) :: g33(lx, lx, lx, n)
1190 real(kind=rp),
intent(in) :: g12(lx, lx, lx, n)
1191 real(kind=rp),
intent(in) :: g13(lx, lx, lx, n)
1192 real(kind=rp),
intent(in) :: g23(lx, lx, lx, n)
1193 real(kind=rp),
intent(in) :: dxt(lx,lx)
1194 real(kind=rp),
intent(in) :: dyt(lx,lx)
1195 real(kind=rp),
intent(in) :: dzt(lx,lx)
1196 integer :: i, j, k, l, e
1204 d(i,j,k,e) = d(i,j,k,e) + &
1205 g11(l,j,k,e) * dxt(i,l)**2
1207 d(i,j,k,e) = d(i,j,k,e) + &
1208 g22(i,l,k,e) * dyt(j,l)**2
1210 d(i,j,k,e) = d(i,j,k,e) + &
1211 g33(i,j,l,e) * dzt(k,l)**2
1222 d(1,j,k,e) = d(1,j,k,e) &
1223 + g12(1,j,k,e) * dxt(1,1)*dyt(j,j) &
1224 + g13(1,j,k,e) * dxt(1,1)*dzt(k,k)
1225 d(lx,j,k,e) = d(lx,j,k,e) &
1226 + g12(lx,j,k,e) * dxt(lx,lx)*dyt(j,j) &
1227 + g13(lx,j,k,e) * dxt(lx,lx)*dzt(k,k)
1235 d(i,1,k,e) = d(i,1,k,e) &
1236 + g12(i,1,k,e) * dyt(1,1)*dxt(i,i) &
1237 + g23(i,1,k,e) * dyt(1,1)*dzt(k,k)
1238 d(i,ly,k,e) = d(i,ly,k,e) &
1239 + g12(i,ly,k,e) * dyt(ly,ly)*dxt(i,i) &
1240 + g23(i,ly,k,e) * dyt(ly,ly)*dzt(k,k)
1248 d(i,j,1,e) = d(i,j,1,e) &
1249 + g13(i,j,1,e) * dzt(1,1)*dxt(i,i) &
1250 + g23(i,j,1,e) * dzt(1,1)*dyt(j,j)
1251 d(i,j,lz,e) = d(i,j,lz,e) &
1252 + g13(i,j,lz,e) * dzt(lz,lz)*dxt(i,i) &
1253 + g23(i,j,lz,e) * dzt(lz,lz)*dyt(j,j)
Defines a mapping of the degrees of freedom.
subroutine, public addcol3(a, b, c, n)
Returns .
subroutine, public invcol1(a, n)
Invert a vector .
subroutine, public col2(a, b, n)
Vector multiplication .
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
integer, parameter, public rp
Global precision used in computations.
Jacobi preconditioner SX-Aurora backend.
subroutine sx_update_lx7(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_jacobi_free(this)
subroutine sx_update_lx14(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx8(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_jacobi_solve(this, z, r, n)
The jacobi preconditioner where .
subroutine sx_update_lx(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n, lx)
subroutine sx_update_lx11(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx9(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx5(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx2(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx12(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_jacobi_init(this, coef, dof, gs_h)
subroutine sx_update_lx3(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx4(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx13(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_update_lx6(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
subroutine sx_jacobi_update(this)
subroutine sx_update_lx10(d, dxt, dyt, dzt, G11, G22, G33, G12, G13, G23, n)
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Defines a canonical Krylov preconditioner.
Defines a jacobi preconditioner for SX-Aurora.