40 module subroutine opr_sx_cdtp(dtx, x, dr, ds, dt, coef)
41 type(coef_t),
intent(in) :: coef
42 real(kind=rp),
intent(inout) :: dtx(coef%Xh%lxyz, coef%msh%nelv)
43 real(kind=rp),
intent(inout) :: x(coef%Xh%lxyz, coef%msh%nelv)
44 real(kind=rp),
intent(in) :: dr(coef%Xh%lxyz, coef%msh%nelv)
45 real(kind=rp),
intent(in) :: ds(coef%Xh%lxyz, coef%msh%nelv)
46 real(kind=rp),
intent(in) :: dt(coef%Xh%lxyz, coef%msh%nelv)
48 associate(xh => coef%Xh, msh => coef%msh, dof => coef%dof)
51 call sx_cdtp_lx14(dtx, x, dr, ds, dt, &
52 xh%dxt, xh%dyt, xh%dzt, &
53 coef%B, coef%jac, msh%nelv, dof%size())
55 call sx_cdtp_lx13(dtx, x, dr, ds, dt, &
56 xh%dxt, xh%dyt, xh%dzt, &
57 coef%B, coef%jac, msh%nelv, dof%size())
59 call sx_cdtp_lx12(dtx, x, dr, ds, dt, &
60 xh%dxt, xh%dyt, xh%dzt, &
61 coef%B, coef%jac, msh%nelv, dof%size())
63 call sx_cdtp_lx11(dtx, x, dr, ds, dt, &
64 xh%dxt, xh%dyt, xh%dzt, &
65 coef%B, coef%jac, msh%nelv, dof%size())
67 call sx_cdtp_lx10(dtx, x, dr, ds, dt, &
68 xh%dxt, xh%dyt, xh%dzt, &
69 coef%B, coef%jac, msh%nelv, dof%size())
71 call sx_cdtp_lx9(dtx, x, dr, ds, dt, &
72 xh%dxt, xh%dyt, xh%dzt, &
73 coef%B, coef%jac, msh%nelv, dof%size())
75 call sx_cdtp_lx8(dtx, x, dr, ds, dt, &
76 xh%dxt, xh%dyt, xh%dzt, &
77 coef%B, coef%jac, msh%nelv, dof%size())
79 call sx_cdtp_lx7(dtx, x, dr, ds, dt, &
80 xh%dxt, xh%dyt, xh%dzt, &
81 coef%B, coef%jac, msh%nelv, dof%size())
83 call sx_cdtp_lx6(dtx, x, dr, ds, dt, &
84 xh%dxt, xh%dyt, xh%dzt, &
85 coef%B, coef%jac, msh%nelv, dof%size())
87 call sx_cdtp_lx5(dtx, x, dr, ds, dt, &
88 xh%dxt, xh%dyt, xh%dzt, &
89 coef%B, coef%jac, msh%nelv, dof%size())
91 call sx_cdtp_lx4(dtx, x, dr, ds, dt, &
92 xh%dxt, xh%dyt, xh%dzt, &
93 coef%B, coef%jac, msh%nelv, dof%size())
95 call sx_cdtp_lx3(dtx, x, dr, ds, dt, &
96 xh%dxt, xh%dyt, xh%dzt, &
97 coef%B, coef%jac, msh%nelv, dof%size())
99 call sx_cdtp_lx2(dtx, x, dr, ds, dt, &
100 xh%dxt, xh%dyt, xh%dzt, &
101 coef%B, coef%jac, msh%nelv, dof%size())
103 call sx_cdtp_lx(dtx, x, dr, ds, dt, &
104 xh%dxt, xh%dyt, xh%dzt, &
105 coef%B, coef%jac, msh%nelv, dof%size(), xh%lx)
109 end subroutine opr_sx_cdtp
111 subroutine sx_cdtp_lx(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd, lx)
112 integer,
intent(in) :: nel, nd, lx
113 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
114 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
116 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
117 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
119 integer :: e, i, j, k, kk, jj
121 call col3(wx, b, x, nd)
123 call col3(ta1, wx, dr, nd)
126 do jj = 1, lx * lx * nel
129 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
135 call col3(ta1, wx, ds, nd)
144 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
146 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
152 call col3(ta1, wx, dt, nd)
161 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
163 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
169 end subroutine sx_cdtp_lx
171 subroutine sx_cdtp_lx14(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
172 integer,
parameter :: lx = 14
173 integer,
intent(in) :: nel, nd
174 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
175 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
177 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
178 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
180 integer :: e, i, j, k, kk, jj
182 call col3(wx, b, x, nd)
184 call col3(ta1, wx, dr, nd)
187 do jj = 1, lx * lx * nel
190 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
196 call col3(ta1, wx, ds, nd)
205 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
207 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
213 call col3(ta1, wx, dt, nd)
222 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
224 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
230 end subroutine sx_cdtp_lx14
232 subroutine sx_cdtp_lx13(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
233 integer,
parameter :: lx = 13
234 integer,
intent(in) :: nel, nd
235 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
236 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
238 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
239 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
241 integer :: e, i, j, k, kk, jj
243 call col3(wx, b, x, nd)
245 call col3(ta1, wx, dr, nd)
248 do jj = 1, lx * lx * nel
251 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
257 call col3(ta1, wx, ds, nd)
266 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
268 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
274 call col3(ta1, wx, dt, nd)
283 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
285 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
291 end subroutine sx_cdtp_lx13
293 subroutine sx_cdtp_lx12(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
294 integer,
parameter :: lx = 12
295 integer,
intent(in) :: nel, nd
296 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
297 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
299 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
300 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
302 integer :: e, i, j, k, kk, jj
304 call col3(wx, b, x, nd)
306 call col3(ta1, wx, dr, nd)
309 do jj = 1, lx * lx * nel
312 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
318 call col3(ta1, wx, ds, nd)
327 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
329 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
335 call col3(ta1, wx, dt, nd)
344 tmp = tmp + dzt(k, kk)*ta1(i,j, kk,e)
346 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
352 end subroutine sx_cdtp_lx12
354 subroutine sx_cdtp_lx11(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
355 integer,
parameter :: lx = 11
356 integer,
intent(in) :: nel, nd
357 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
358 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
360 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
361 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
363 integer :: e, i, j, k, kk, jj
365 call col3(wx, b, x, nd)
367 call col3(ta1, wx, dr, nd)
370 do jj = 1, lx * lx * nel
373 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
379 call col3(ta1, wx, ds, nd)
388 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
390 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
396 call col3(ta1, wx, dt, nd)
405 tmp = tmp + dzt(k, kk)*ta1(i,j, kk,e)
407 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
413 end subroutine sx_cdtp_lx11
415 subroutine sx_cdtp_lx10(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
416 integer,
parameter :: lx = 10
417 integer,
intent(in) :: nel, nd
418 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
419 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
421 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
422 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
424 integer :: e, i, j, k, kk, jj
426 call col3(wx, b, x, nd)
428 call col3(ta1, wx, dr, nd)
431 do jj = 1, lx * lx * nel
434 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
440 call col3(ta1, wx, ds, nd)
449 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
451 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
457 call col3(ta1, wx, dt, nd)
466 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
468 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
474 end subroutine sx_cdtp_lx10
476 subroutine sx_cdtp_lx9(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
477 integer,
parameter :: lx = 9
478 integer,
intent(in) :: nel, nd
479 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
480 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
482 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
483 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
485 integer :: e, i, j, k, kk, jj
487 call col3(wx, b, x, nd)
489 call col3(ta1, wx, dr, nd)
492 do jj = 1, lx * lx * nel
495 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
501 call col3(ta1, wx, ds, nd)
510 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
512 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
518 call col3(ta1, wx, dt, nd)
527 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
529 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
535 end subroutine sx_cdtp_lx9
537 subroutine sx_cdtp_lx8(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
538 integer,
parameter :: lx = 8
539 integer,
intent(in) :: nel, nd
540 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
541 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
543 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
544 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
546 integer :: e, i, j, k, kk, jj
548 call col3(wx, b, x, nd)
550 call col3(ta1, wx, dr, nd)
553 do jj = 1, lx * lx * nel
556 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
562 call col3(ta1, wx, ds, nd)
571 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
573 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
579 call col3(ta1, wx, dt, nd)
588 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
590 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
596 end subroutine sx_cdtp_lx8
598 subroutine sx_cdtp_lx7(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
599 integer,
parameter :: lx = 7
600 integer,
intent(in) :: nel, nd
601 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
602 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
604 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
605 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
607 integer :: e, i, j, k, kk, jj
609 call col3(wx, b, x, nd)
611 call col3(ta1, wx, dr, nd)
614 do jj = 1, lx * lx * nel
617 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
623 call col3(ta1, wx, ds, nd)
632 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
634 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
640 call col3(ta1, wx, dt, nd)
649 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
651 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
657 end subroutine sx_cdtp_lx7
659 subroutine sx_cdtp_lx6(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
660 integer,
parameter :: lx = 6
661 integer,
intent(in) :: nel, nd
662 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
663 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
665 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
666 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
668 integer :: e, i, j, k, kk, jj
670 call col3(wx, b, x, nd)
672 call col3(ta1, wx, dr, nd)
675 do jj = 1, lx * lx * nel
678 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
684 call col3(ta1, wx, ds, nd)
693 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
695 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
701 call col3(ta1, wx, dt, nd)
710 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
712 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
718 end subroutine sx_cdtp_lx6
720 subroutine sx_cdtp_lx5(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
721 integer,
parameter :: lx = 5
722 integer,
intent(in) :: nel, nd
723 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
724 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
726 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
727 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
729 integer :: e, i, j, k, kk, jj
731 call col3(wx, b, x, nd)
733 call col3(ta1, wx, dr, nd)
736 do jj = 1, lx * lx * nel
739 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
745 call col3(ta1, wx, ds, nd)
754 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
756 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
762 call col3(ta1, wx, dt, nd)
771 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
773 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
779 end subroutine sx_cdtp_lx5
781 subroutine sx_cdtp_lx4(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
782 integer,
parameter :: lx = 4
783 integer,
intent(in) :: nel, nd
784 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
785 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
787 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
788 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
790 integer :: e, i, j, k, kk, jj
792 call col3(wx, b, x, nd)
794 call col3(ta1, wx, dr, nd)
797 do jj = 1, lx * lx * nel
800 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
806 call col3(ta1, wx, ds, nd)
815 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
817 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
823 call col3(ta1, wx, dt, nd)
832 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
834 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
840 end subroutine sx_cdtp_lx4
842 subroutine sx_cdtp_lx3(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
843 integer,
parameter :: lx = 3
844 integer,
intent(in) :: nel, nd
845 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
846 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
848 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
849 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
851 integer :: e, i, j, k, kk, jj
853 call col3(wx, b, x, nd)
855 call col3(ta1, wx, dr, nd)
858 do jj = 1, lx * lx * nel
861 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
867 call col3(ta1, wx, ds, nd)
876 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
878 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
884 call col3(ta1, wx, dt, nd)
893 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
895 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
901 end subroutine sx_cdtp_lx3
903 subroutine sx_cdtp_lx2(dtx, x, dr, ds, dt, dxt, dyt, dzt, B, jac, nel, nd)
904 integer,
parameter :: lx = 2
905 integer,
intent(in) :: nel, nd
906 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(inout) :: dtx
907 real(kind=rp),
dimension(lx, lx, lx, nel),
intent(in) :: x, dr, ds, dt, &
909 real(kind=rp),
intent(in) :: dxt(lx, lx), dyt(lx, lx), dzt(lx, lx)
910 real(kind=rp),
dimension(lx, lx, lx, nel) :: wx, ta1
912 integer :: e, i, j, k, kk, jj
914 call col3(wx, b, x, nd)
916 call col3(ta1, wx, dr, nd)
919 do jj = 1, lx * lx * nel
922 tmp = tmp + dxt(i, kk) * ta1(kk, jj,1,1)
928 call col3(ta1, wx, ds, nd)
937 tmp = tmp + dyt(j, kk) * ta1(i, kk,k,e)
939 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
945 call col3(ta1, wx, dt, nd)
954 tmp = tmp + dzt(k, kk) * ta1(i,j, kk,e)
956 dtx(i,j,k,e) = dtx(i,j,k,e) + tmp
962 end subroutine sx_cdtp_lx2
965 end submodule sx_cdtp
subroutine, public invcol2(a, b, n)
Vector division .
subroutine, public col3(a, b, c, n)
Vector multiplication with 3 vectors .
Operators SX-Aurora backend.