13 public :: opr_sx_dudxyz, opr_sx_opgrad, opr_sx_cdtp, opr_sx_conv1, &
14 opr_sx_curl, opr_sx_cfl, opr_sx_lambda2, opr_sx_convect_scalar, &
15 opr_sx_set_convect_rst
19 module subroutine opr_sx_dudxyz(du, u, dr, ds, dt, coef)
20 type(coef_t),
intent(in),
target :: coef
21 real(kind=
rp),
intent(inout), &
22 dimension(coef%Xh%lx, coef%Xh%ly, coef%Xh%lz, coef%msh%nelv) :: du
23 real(kind=
rp),
intent(in), &
24 dimension(coef%Xh%lx, coef%Xh%ly, coef%Xh%lz, coef%msh%nelv) :: &
26 end subroutine opr_sx_dudxyz
28 module subroutine opr_sx_opgrad(ux, uy, uz, u, coef)
29 type(coef_t),
intent(in) :: coef
30 real(kind=
rp),
intent(inout) :: ux(coef%Xh%lxyz, coef%msh%nelv)
31 real(kind=
rp),
intent(inout) :: uy(coef%Xh%lxyz, coef%msh%nelv)
32 real(kind=
rp),
intent(inout) :: uz(coef%Xh%lxyz, coef%msh%nelv)
33 real(kind=
rp),
intent(in) :: u(coef%Xh%lxyz, coef%msh%nelv)
34 end subroutine opr_sx_opgrad
36 module subroutine opr_sx_cdtp(dtx, x, dr, ds, dt, coef)
37 type(coef_t),
intent(in) :: coef
38 real(kind=
rp),
intent(inout) :: dtx(coef%Xh%lxyz, coef%msh%nelv)
39 real(kind=
rp),
intent(inout) :: x(coef%Xh%lxyz, coef%msh%nelv)
40 real(kind=
rp),
intent(in) :: dr(coef%Xh%lxyz, coef%msh%nelv)
41 real(kind=
rp),
intent(in) :: ds(coef%Xh%lxyz, coef%msh%nelv)
42 real(kind=
rp),
intent(in) :: dt(coef%Xh%lxyz, coef%msh%nelv)
43 end subroutine opr_sx_cdtp
45 module subroutine opr_sx_conv1(du, u, vx, vy, vz, xh, coef, nelv)
46 type(space_t),
intent(in) :: Xh
47 type(coef_t),
intent(in) :: coef
48 integer,
intent(in) :: nelv
49 real(kind=
rp),
intent(inout) :: du(xh%lxyz, nelv)
50 real(kind=
rp),
intent(in) :: u(xh%lx, xh%ly, xh%lz, nelv)
51 real(kind=
rp),
intent(in) :: vx(xh%lx, xh%ly, xh%lz, nelv)
52 real(kind=
rp),
intent(in) :: vy(xh%lx, xh%ly, xh%lz, nelv)
53 real(kind=
rp),
intent(in) :: vz(xh%lx, xh%ly, xh%lz, nelv)
54 end subroutine opr_sx_conv1
56 module subroutine opr_sx_convect_scalar(du, u, cr, cs, ct, xh_gll, xh_gl, &
57 coef_gll, coef_gl, gll_to_gl)
58 type(space_t),
intent(in) :: Xh_GL
59 type(space_t),
intent(in) :: Xh_GLL
60 type(coef_t),
intent(in) :: coef_GLL
61 type(coef_t),
intent(in) :: coef_GL
62 type(interpolator_t),
intent(inout) :: GLL_to_GL
63 real(kind=
rp),
intent(inout) :: &
64 du(xh_gll%lx, xh_gll%ly, xh_gll%lz, coef_gl%msh%nelv)
65 real(kind=
rp),
intent(inout) :: &
66 u(xh_gl%lx, xh_gl%lx, xh_gl%lx, coef_gl%msh%nelv)
67 real(kind=
rp),
intent(inout) :: cr(xh_gl%lxyz, coef_gl%msh%nelv)
68 real(kind=
rp),
intent(inout) :: cs(xh_gl%lxyz, coef_gl%msh%nelv)
69 real(kind=
rp),
intent(inout) :: ct(xh_gl%lxyz, coef_gl%msh%nelv)
71 end subroutine opr_sx_convect_scalar
73 module function opr_sx_cfl(dt, u, v, w, xh, coef, nelv) result(cfl)
74 type(space_t),
intent(in) :: Xh
75 type(coef_t),
intent(in) :: coef
76 integer,
intent(in) :: nelv
77 real(kind=
dp),
intent(in) :: dt
78 real(kind=
rp),
dimension(Xh%lx, Xh%ly, Xh%lz, nelv) :: u, v, w
80 end function opr_sx_cfl
82 module subroutine opr_sx_lambda2(
lambda2, u, v, w, coef)
83 type(coef_t),
intent(in) :: coef
84 real(kind=
rp),
intent(inout), &
85 dimension(coef%Xh%lx, coef%Xh%ly, coef%Xh%lz, coef%msh%nelv) ::
lambda2
86 real(kind=
rp),
intent(in), &
87 dimension(coef%Xh%lx, coef%Xh%ly, coef%Xh%lz, coef%msh%nelv) :: u, v, w
88 end subroutine opr_sx_lambda2
90 module subroutine opr_sx_set_convect_rst(cr, cs, ct, cx, cy, cz, xh, coef)
91 type(space_t),
intent(inout) :: Xh
92 type(coef_t),
intent(inout) :: coef
93 real(kind=
rp),
dimension(Xh%lxyz, coef%msh%nelv), &
94 intent(inout) :: cr, cs, ct
95 real(kind=
rp),
dimension(Xh%lxyz, coef%msh%nelv), &
96 intent(in) :: cx, cy, cz
97 end subroutine opr_sx_set_convect_rst
102 subroutine opr_sx_curl(w1, w2, w3, u1, u2, u3, work1, work2, c_Xh)
103 type(
coef_t),
intent(in) :: c_xh
104 real(kind=
rp),
intent(inout), &
105 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: w1
106 real(kind=
rp),
intent(inout), &
107 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: w2
108 real(kind=
rp),
intent(inout), &
109 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: w3
110 real(kind=
rp),
intent(in), &
111 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: u1
112 real(kind=
rp),
intent(in), &
113 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: u2
114 real(kind=
rp),
intent(in), &
115 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: u3
116 real(kind=
rp),
intent(inout), &
117 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: work1
118 real(kind=
rp),
intent(inout), &
119 dimension(c_Xh%Xh%lx, c_Xh%Xh%ly, c_Xh%Xh%lz, c_Xh%msh%nelv) :: work2
126 call opr_sx_dudxyz(work1, u3, c_xh%drdy, c_xh%dsdy, c_xh%dtdy, c_xh)
127 if (gdim .eq. 3)
then
128 call opr_sx_dudxyz(work2, u2, c_xh%drdz, c_xh%dsdz, c_xh%dtdz, c_xh)
129 call sub3(w1, work1, work2, n)
131 call copy(w1, work1, n)
134 if (gdim .eq. 3)
then
135 call opr_sx_dudxyz(work1, u1, c_xh%drdz, c_xh%dsdz, c_xh%dtdz, c_xh)
136 call opr_sx_dudxyz(work2, u3, c_xh%drdx, c_xh%dsdx, c_xh%dtdx, c_xh)
137 call sub3(w2, work1, work2, n)
139 call rzero (work1, n)
140 call opr_sx_dudxyz(work2, u3, c_xh%drdx, c_xh%dsdx, c_xh%dtdx, c_xh)
141 call sub3(w2, work1, work2, n)
144 call opr_sx_dudxyz(work1, u2, c_xh%drdx, c_xh%dsdx, c_xh%dtdx, c_xh)
145 call opr_sx_dudxyz(work2, u1, c_xh%drdy, c_xh%dsdy, c_xh%dtdy, c_xh)
146 call sub3(w3, work1, work2, n)
149 call opcolv(w1, w2, w3, c_xh%B, gdim, n)
150 call c_xh%gs_h%op(w1, w2, w3, n, gs_op_add)
151 call opcolv(w1, w2, w3, c_xh%Binv, gdim, n)
153 end subroutine opr_sx_curl
Routines to interpolate between different spaces.
A simulation component that computes lambda2 The values are stored in the field registry under the na...
subroutine, public sub3(a, b, c, n)
Vector subtraction .
subroutine, public copy(a, b, n)
Copy a vector .
subroutine, public rzero(a, n)
Zero a real vector.
Collection of vector field operations operating on and . Note that in general the indices and ....
subroutine, public opcolv(a1, a2, a3, c, gdim, n)
integer, parameter, public dp
integer, parameter, public rp
Global precision used in computations.
Operators SX-Aurora backend.
subroutine, public opr_sx_curl(w1, w2, w3, u1, u2, u3, work1, work2, c_xh)
Defines a function space.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Interpolation between two space::space_t.
The function space for the SEM solution fields.