40 module subroutine opr_sx_dudxyz(du, u, dr, ds, dt, coef)
41 type(coef_t),
intent(in),
target :: coef
42 real(kind=rp),
intent(inout), &
43 dimension(coef%Xh%lx, coef%Xh%ly, coef%Xh%lz, coef%msh%nelv) :: du
44 real(kind=rp),
intent(in), &
45 dimension(coef%Xh%lx, coef%Xh%ly, coef%Xh%lz, coef%msh%nelv) :: &
48 associate(xh => coef%Xh, msh => coef%msh, dof => coef%dof)
49 select case (coef%Xh%lx)
51 call sx_dudxyz_lx14(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
52 coef%jacinv, msh%nelv, dof%size())
54 call sx_dudxyz_lx13(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
55 coef%jacinv, msh%nelv, dof%size())
57 call sx_dudxyz_lx12(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
58 coef%jacinv, msh%nelv, dof%size())
60 call sx_dudxyz_lx11(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
61 coef%jacinv, msh%nelv, dof%size())
63 call sx_dudxyz_lx10(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
64 coef%jacinv, msh%nelv, dof%size())
66 call sx_dudxyz_lx9(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
67 coef%jacinv, msh%nelv, dof%size())
69 call sx_dudxyz_lx8(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
70 coef%jacinv, msh%nelv, dof%size())
72 call sx_dudxyz_lx7(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
73 coef%jacinv, msh%nelv, dof%size())
75 call sx_dudxyz_lx6(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
76 coef%jacinv, msh%nelv, dof%size())
78 call sx_dudxyz_lx5(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
79 coef%jacinv, msh%nelv, dof%size())
81 call sx_dudxyz_lx4(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
82 coef%jacinv, msh%nelv, dof%size())
84 call sx_dudxyz_lx3(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
85 coef%jacinv, msh%nelv, dof%size())
87 call sx_dudxyz_lx2(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
88 coef%jacinv, msh%nelv, dof%size())
90 call sx_dudxyz_lx(du, u, dr, ds, dt, xh%dx, xh%dy, xh%dz, &
91 coef%jacinv, msh%nelv, dof%size(), xh%lx)
95 end subroutine opr_sx_dudxyz
97 subroutine sx_dudxyz_lx(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd, lx)
98 integer,
intent(in) :: nel, nd, lx
99 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
100 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
101 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
102 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
103 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
105 integer :: i, j, jj, kk
106 real(kind=rp) :: wr, ws, wt
112 wr = wr + dx(i, kk) * u(kk, jj,1,1)
118 call col2 (du, dr, nd)
127 ws = ws + dy(j, kk) * u(i, kk,k,e)
144 wt = wt + dz(k, kk) * u(i,j, kk,e)
153 call col2 (du, jacinv, nd)
154 end subroutine sx_dudxyz_lx
156 subroutine sx_dudxyz_lx14(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
157 integer,
parameter :: lx = 14
158 integer,
intent(in) :: nel, nd
159 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
160 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
161 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
162 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
163 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
165 integer :: i, j, jj, kk
166 real(kind=rp) :: wr, ws, wt
172 wr = wr + dx(i, kk) * u(kk, jj,1,1)
178 call col2 (du, dr, nd)
187 ws = ws + dy(j, kk) * u(i, kk,k,e)
204 wt = wt + dz(k, kk) * u(i,j, kk,e)
213 call col2 (du, jacinv, nd)
214 end subroutine sx_dudxyz_lx14
216 subroutine sx_dudxyz_lx13(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
217 integer,
parameter :: lx = 13
218 integer,
intent(in) :: nel, nd
219 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
220 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
221 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
222 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
223 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
225 integer :: i, j, jj, kk
226 real(kind=rp) :: wr, ws, wt
232 wr = wr + dx(i, kk) * u(kk, jj,1,1)
238 call col2 (du, dr, nd)
247 ws = ws + dy(j, kk) * u(i, kk,k,e)
264 wt = wt + dz(k, kk) * u(i,j, kk,e)
273 call col2 (du, jacinv, nd)
274 end subroutine sx_dudxyz_lx13
276 subroutine sx_dudxyz_lx12(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
277 integer,
parameter :: lx = 12
278 integer,
intent(in) :: nel, nd
279 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
280 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
281 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
282 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
283 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
285 integer :: i, j, jj, kk
286 real(kind=rp) :: wr, ws, wt
292 wr = wr + dx(i, kk) * u(kk, jj,1,1)
298 call col2 (du, dr, nd)
307 ws = ws + dy(j, kk) * u(i, kk,k,e)
324 wt = wt + dz(k, kk) * u(i,j, kk,e)
333 call col2 (du, jacinv, nd)
334 end subroutine sx_dudxyz_lx12
336 subroutine sx_dudxyz_lx11(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
337 integer,
parameter :: lx = 11
338 integer,
intent(in) :: nel, nd
339 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
340 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
341 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
342 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
343 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
345 integer :: i, j, jj, kk
346 real(kind=rp) :: wr, ws, wt
352 wr = wr + dx(i, kk) * u(kk, jj,1,1)
358 call col2 (du, dr, nd)
367 ws = ws + dy(j, kk) * u(i, kk,k,e)
384 wt = wt + dz(k, kk) * u(i,j, kk,e)
393 call col2 (du, jacinv, nd)
394 end subroutine sx_dudxyz_lx11
396 subroutine sx_dudxyz_lx10(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
397 integer,
parameter :: lx = 10
398 integer,
intent(in) :: nel, nd
399 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
400 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
401 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
402 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
403 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
405 integer :: i, j, jj, kk
406 real(kind=rp) :: wr, ws, wt
412 wr = wr + dx(i, kk) * u(kk, jj,1,1)
418 call col2 (du, dr, nd)
427 ws = ws + dy(j, kk) * u(i, kk,k,e)
444 wt = wt + dz(k, kk) * u(i,j, kk,e)
453 call col2 (du, jacinv, nd)
454 end subroutine sx_dudxyz_lx10
456 subroutine sx_dudxyz_lx9(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
457 integer,
parameter :: lx = 9
458 integer,
intent(in) :: nel, nd
459 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
460 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
461 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
462 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
463 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
465 integer :: i, j, jj, kk
466 real(kind=rp) :: wr, ws, wt
472 wr = wr + dx(i, kk) * u(kk, jj,1,1)
478 call col2 (du, dr, nd)
487 ws = ws + dy(j, kk) * u(i, kk,k,e)
504 wt = wt + dz(k, kk) * u(i,j, kk,e)
513 call col2 (du, jacinv, nd)
514 end subroutine sx_dudxyz_lx9
516 subroutine sx_dudxyz_lx8(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
517 integer,
parameter :: lx = 8
518 integer,
intent(in) :: nel, nd
519 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
520 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
521 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
522 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
523 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
525 integer :: i, j, jj, kk
526 real(kind=rp) :: wr, ws, wt
532 wr = wr + dx(i, kk) * u(kk, jj,1,1)
538 call col2 (du, dr, nd)
547 ws = ws + dy(j, kk) * u(i, kk,k,e)
564 wt = wt + dz(k, kk) * u(i,j, kk,e)
573 call col2 (du, jacinv, nd)
574 end subroutine sx_dudxyz_lx8
576 subroutine sx_dudxyz_lx7(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
577 integer,
parameter :: lx = 7
578 integer,
intent(in) :: nel, nd
579 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
580 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
581 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
582 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
583 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
585 integer :: i, j, jj, kk
586 real(kind=rp) :: wr, ws, wt
592 wr = wr + dx(i, kk) * u(kk, jj,1,1)
598 call col2 (du, dr, nd)
607 ws = ws + dy(j, kk) * u(i, kk,k,e)
624 wt = wt + dz(k, kk) * u(i,j, kk,e)
633 call col2 (du, jacinv, nd)
634 end subroutine sx_dudxyz_lx7
636 subroutine sx_dudxyz_lx6(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
637 integer,
parameter :: lx = 6
638 integer,
intent(in) :: nel, nd
639 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
640 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
641 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
642 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
643 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
645 integer :: i, j, jj, kk
646 real(kind=rp) :: wr, ws, wt
652 wr = wr + dx(i, kk) * u(kk, jj,1,1)
658 call col2 (du, dr, nd)
667 ws = ws + dy(j, kk) * u(i, kk,k,e)
684 wt = wt + dz(k, kk) * u(i,j, kk,e)
693 call col2 (du, jacinv, nd)
694 end subroutine sx_dudxyz_lx6
696 subroutine sx_dudxyz_lx5(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
697 integer,
parameter :: lx = 5
698 integer,
intent(in) :: nel, nd
699 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
700 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
701 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
702 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
703 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
705 integer :: i, j, jj, kk
706 real(kind=rp) :: wr, ws, wt
712 wr = wr + dx(i, kk) * u(kk, jj,1,1)
718 call col2 (du, dr, nd)
727 ws = ws + dy(j, kk) * u(i, kk,k,e)
744 wt = wt + dz(k, kk) * u(i,j, kk,e)
753 call col2 (du, jacinv, nd)
754 end subroutine sx_dudxyz_lx5
756 subroutine sx_dudxyz_lx4(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
757 integer,
parameter :: lx = 4
758 integer,
intent(in) :: nel, nd
759 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
760 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
761 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
762 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
763 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
765 integer :: i, j, jj, kk
766 real(kind=rp) :: wr, ws, wt
772 wr = wr + dx(i, kk) * u(kk, jj,1,1)
778 call col2 (du, dr, nd)
787 ws = ws + dy(j, kk) * u(i, kk,k,e)
804 wt = wt + dz(k, kk) * u(i,j, kk,e)
813 call col2 (du, jacinv, nd)
814 end subroutine sx_dudxyz_lx4
816 subroutine sx_dudxyz_lx3(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
817 integer,
parameter :: lx = 3
818 integer,
intent(in) :: nel, nd
819 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
820 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
821 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
822 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
823 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
825 integer :: i, j, jj, kk
826 real(kind=rp) :: wr, ws, wt
832 wr = wr + dx(i, kk) * u(kk, jj,1,1)
838 call col2 (du, dr, nd)
847 ws = ws + dy(j, kk) * u(i, kk,k,e)
864 wt = wt + dz(k, kk) * u(i,j, kk,e)
873 call col2 (du, jacinv, nd)
874 end subroutine sx_dudxyz_lx3
876 subroutine sx_dudxyz_lx2(du, u, dr, ds, dt, dx, dy, dz, jacinv, nel, nd)
877 integer,
parameter :: lx = 2
878 integer,
intent(in) :: nel, nd
879 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: du
880 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: u, dr, ds, dt
881 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: jacinv
882 real(kind=rp),
dimension(lx, lx),
intent(in) :: dx, dy, dz
883 real(kind=rp),
dimension(lx, lx, lx, nel) :: drst
885 integer :: i, j, jj, kk
886 real(kind=rp) :: wr, ws, wt
892 wr = wr + dx(i, kk) * u(kk, jj,1,1)
898 call col2 (du, dr, nd)
907 ws = ws + dy(j, kk) * u(i, kk,k,e)
924 wt = wt + dz(k, kk) * u(i,j, kk,e)
933 call col2 (du, jacinv, nd)
934 end subroutine sx_dudxyz_lx2
936end submodule sx_dudxyz
subroutine, public addcol3(a, b, c, n)
Returns .
subroutine, public col2(a, b, n)
Vector multiplication .
Operators SX-Aurora backend.