Neko 1.99.1
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
set_convect_rst.f90
Go to the documentation of this file.
1! Copyright (c) 2024, The Neko Authors
2! All rights reserved.
3!
4! Redistribution and use in source and binary forms, with or without
5! modification, are permitted provided that the following conditions
6! are met:
7!
8! * Redistributions of source code must retain the above copyright
9! notice, this list of conditions and the following disclaimer.
10!
11! * Redistributions in binary form must reproduce the above
12! copyright notice, this list of conditions and the following
13! disclaimer in the documentation and/or other materials provided
14! with the distribution.
15!
16! * Neither the name of the authors nor the names of its
17! contributors may be used to endorse or promote products derived
18! from this software without specific prior written permission.
19!
20! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31! POSSIBILITY OF SUCH DAMAGE.
32!
34submodule(opr_cpu) cpu_set_convect_rst
35 implicit none
36
37contains
38
39 module subroutine opr_cpu_set_convect_rst(cr, cs, ct, cx, cy, cz, xh, coef)
40 type(space_t), intent(inout) :: Xh
41 type(coef_t), intent(inout) :: coef
42 real(kind=rp), dimension(Xh%lxyz, coef%msh%nelv), &
43 intent(inout) :: cr, cs, ct
44 real(kind=rp), dimension(Xh%lxyz, coef%msh%nelv), &
45 intent(in) :: cx, cy, cz
46 associate(drdx => coef%drdx, drdy => coef%drdy, drdz => coef%drdz, &
47 dsdx => coef%dsdx, dsdy => coef%dsdy, dsdz => coef%dsdz, &
48 dtdx => coef%dtdx, dtdy => coef%dtdy, dtdz => coef%dtdz, &
49 nelv => coef%msh%nelv, lx => xh%lx, w3 => xh%w3)
50
51 select case (lx)
52 case (18)
53 call cpu_set_convect_rst_lx18(cr, cs, ct, cx, cy, cz, &
54 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
55 case (17)
56 call cpu_set_convect_rst_lx17(cr, cs, ct, cx, cy, cz, &
57 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
58 case (16)
59 call cpu_set_convect_rst_lx16(cr, cs, ct, cx, cy, cz, &
60 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
61 case (15)
62 call cpu_set_convect_rst_lx15(cr, cs, ct, cx, cy, cz, drdx, &
63 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
64 case (14)
65 call cpu_set_convect_rst_lx14(cr, cs, ct, cx, cy, cz, drdx, &
66 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
67 case (13)
68 call cpu_set_convect_rst_lx13(cr, cs, ct, cx, cy, cz, drdx, &
69 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
70 case (12)
71 call cpu_set_convect_rst_lx12(cr, cs, ct, cx, cy, cz, drdx, &
72 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
73 case (11)
74 call cpu_set_convect_rst_lx11(cr, cs, ct, cx, cy, cz, drdx, &
75 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
76 case (10)
77 call cpu_set_convect_rst_lx10(cr, cs, ct, cx, cy, cz, drdx, &
78 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
79 case (9)
80 call cpu_set_convect_rst_lx9(cr, cs, ct, cx, cy, cz, drdx, &
81 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
82 case (8)
83 call cpu_set_convect_rst_lx8(cr, cs, ct, cx, cy, cz, drdx, &
84 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
85 case (7)
86 call cpu_set_convect_rst_lx7(cr, cs, ct, cx, cy, cz, drdx, &
87 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
88 case (6)
89 call cpu_set_convect_rst_lx6(cr, cs, ct, cx, cy, cz, drdx, &
90 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
91 case (5)
92 call cpu_set_convect_rst_lx5(cr, cs, ct, cx, cy, cz, drdx, &
93 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
94 case (4)
95 call cpu_set_convect_rst_lx4(cr, cs, ct, cx, cy, cz, drdx, &
96 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
97 case (3)
98 call cpu_set_convect_rst_lx3(cr, cs, ct, cx, cy, cz, drdx, &
99 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
100 case (2)
101 call cpu_set_convect_rst_lx2(cr, cs, ct, cx, cy, cz, drdx, &
102 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
103 case default
104 call cpu_set_convect_rst_lx(cr, cs, ct, cx, cy, cz, drdx, &
105 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv, lx)
106 end select
107 end associate
108
109 end subroutine opr_cpu_set_convect_rst
110
111 subroutine cpu_set_convect_rst_lx(cr, cs, ct, cx, cy, cz, &
112 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n, lx)
113 integer, intent(in) :: n, lx
114 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
115 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
116 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
117 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
118 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
119 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
120 integer :: e, i
121
122 do e = 1, n
123 do i = 1, lx * lx * lx
124 cr(i,1,1,e) = w3(i,1,1) &
125 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
126 + cy(i,1,1,e) * drdy(i,1,1,e) &
127 + cz(i,1,1,e) * drdz(i,1,1,e) )
128 cs(i,1,1,e) = w3(i,1,1) &
129 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
130 + cy(i,1,1,e) * dsdy(i,1,1,e) &
131 + cz(i,1,1,e) * dsdz(i,1,1,e))
132 ct(i,1,1,e) = w3(i,1,1) &
133 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
134 + cy(i,1,1,e) * dtdy(i,1,1,e) &
135 + cz(i,1,1,e) * dtdz(i,1,1,e))
136 end do
137 end do
138
139 end subroutine cpu_set_convect_rst_lx
140
141 subroutine cpu_set_convect_rst_lx18(cr, cs, ct, cx, cy, cz, &
142 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
143 integer, parameter :: lx = 18
144 integer, intent(in) :: n
145 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
146 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
147 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
148 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
149 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
150 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
151 integer :: e, i
152
153 do e = 1, n
154 do i = 1, lx * lx * lx
155 cr(i,1,1,e) = w3(i,1,1) &
156 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
157 + cy(i,1,1,e) * drdy(i,1,1,e) &
158 + cz(i,1,1,e) * drdz(i,1,1,e) )
159 cs(i,1,1,e) = w3(i,1,1) &
160 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
161 + cy(i,1,1,e) * dsdy(i,1,1,e) &
162 + cz(i,1,1,e) * dsdz(i,1,1,e))
163 ct(i,1,1,e) = w3(i,1,1) &
164 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
165 + cy(i,1,1,e) * dtdy(i,1,1,e) &
166 + cz(i,1,1,e) * dtdz(i,1,1,e))
167 end do
168 end do
169
170 end subroutine cpu_set_convect_rst_lx18
171
172 subroutine cpu_set_convect_rst_lx17(cr, cs, ct, cx, cy, cz, &
173 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
174 integer, parameter :: lx = 17
175 integer, intent(in) :: n
176 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
177 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
178 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
179 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
180 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
181 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
182 integer :: e, i
183
184 do e = 1, n
185 do i = 1, lx * lx * lx
186 cr(i,1,1,e) = w3(i,1,1) &
187 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
188 + cy(i,1,1,e) * drdy(i,1,1,e) &
189 + cz(i,1,1,e) * drdz(i,1,1,e) )
190 cs(i,1,1,e) = w3(i,1,1) &
191 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
192 + cy(i,1,1,e) * dsdy(i,1,1,e) &
193 + cz(i,1,1,e) * dsdz(i,1,1,e))
194 ct(i,1,1,e) = w3(i,1,1) &
195 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
196 + cy(i,1,1,e) * dtdy(i,1,1,e) &
197 + cz(i,1,1,e) * dtdz(i,1,1,e))
198 end do
199 end do
200
201 end subroutine cpu_set_convect_rst_lx17
202
203 subroutine cpu_set_convect_rst_lx16(cr, cs, ct, cx, cy, cz, &
204 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
205 integer, parameter :: lx = 16
206 integer, intent(in) :: n
207 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
208 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
209 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
210 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
211 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
212 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
213 integer :: e, i
214
215 do e = 1, n
216 do i = 1, lx * lx * lx
217 cr(i,1,1,e) = w3(i,1,1) &
218 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
219 + cy(i,1,1,e) * drdy(i,1,1,e) &
220 + cz(i,1,1,e) * drdz(i,1,1,e) )
221 cs(i,1,1,e) = w3(i,1,1) &
222 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
223 + cy(i,1,1,e) * dsdy(i,1,1,e) &
224 + cz(i,1,1,e) * dsdz(i,1,1,e))
225 ct(i,1,1,e) = w3(i,1,1) &
226 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
227 + cy(i,1,1,e) * dtdy(i,1,1,e) &
228 + cz(i,1,1,e) * dtdz(i,1,1,e))
229 end do
230 end do
231
232 end subroutine cpu_set_convect_rst_lx16
233
234 subroutine cpu_set_convect_rst_lx15(cr, cs, ct, cx, cy, cz, &
235 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
236 integer, parameter :: lx = 15
237 integer, intent(in) :: n
238 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
239 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
240 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
241 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
242 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
243 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
244 integer :: e, i
245
246 do e = 1, n
247 do i = 1, lx * lx * lx
248 cr(i,1,1,e) = w3(i,1,1) &
249 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
250 + cy(i,1,1,e) * drdy(i,1,1,e) &
251 + cz(i,1,1,e) * drdz(i,1,1,e) )
252 cs(i,1,1,e) = w3(i,1,1) &
253 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
254 + cy(i,1,1,e) * dsdy(i,1,1,e) &
255 + cz(i,1,1,e) * dsdz(i,1,1,e))
256 ct(i,1,1,e) = w3(i,1,1) &
257 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
258 + cy(i,1,1,e) * dtdy(i,1,1,e) &
259 + cz(i,1,1,e) * dtdz(i,1,1,e))
260 end do
261 end do
262
263 end subroutine cpu_set_convect_rst_lx15
264
265 subroutine cpu_set_convect_rst_lx14(cr, cs, ct, cx, cy, cz, &
266 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
267 integer, parameter :: lx = 14
268 integer, intent(in) :: n
269 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
270 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
271 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
272 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
273 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
274 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
275 integer :: e, i
276
277 do e = 1, n
278 do i = 1, lx * lx * lx
279 cr(i,1,1,e) = w3(i,1,1) &
280 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
281 + cy(i,1,1,e) * drdy(i,1,1,e) &
282 + cz(i,1,1,e) * drdz(i,1,1,e) )
283 cs(i,1,1,e) = w3(i,1,1) &
284 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
285 + cy(i,1,1,e) * dsdy(i,1,1,e) &
286 + cz(i,1,1,e) * dsdz(i,1,1,e))
287 ct(i,1,1,e) = w3(i,1,1) &
288 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
289 + cy(i,1,1,e) * dtdy(i,1,1,e) &
290 + cz(i,1,1,e) * dtdz(i,1,1,e))
291 end do
292 end do
293
294 end subroutine cpu_set_convect_rst_lx14
295
296 subroutine cpu_set_convect_rst_lx13(cr, cs, ct, cx, cy, cz, &
297 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
298 integer, parameter :: lx = 13
299 integer, intent(in) :: n
300 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
301 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
302 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
303 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
304 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
305 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
306 integer :: e, i
307
308 do e = 1, n
309 do i = 1, lx * lx * lx
310 cr(i,1,1,e) = w3(i,1,1) &
311 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
312 + cy(i,1,1,e) * drdy(i,1,1,e) &
313 + cz(i,1,1,e) * drdz(i,1,1,e) )
314 cs(i,1,1,e) = w3(i,1,1) &
315 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
316 + cy(i,1,1,e) * dsdy(i,1,1,e) &
317 + cz(i,1,1,e) * dsdz(i,1,1,e))
318 ct(i,1,1,e) = w3(i,1,1) &
319 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
320 + cy(i,1,1,e) * dtdy(i,1,1,e) &
321 + cz(i,1,1,e) * dtdz(i,1,1,e))
322 end do
323 end do
324
325 end subroutine cpu_set_convect_rst_lx13
326
327 subroutine cpu_set_convect_rst_lx12(cr, cs, ct, cx, cy, cz, &
328 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
329 integer, parameter :: lx = 12
330 integer, intent(in) :: n
331 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
332 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
333 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
334 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
335 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
336 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
337 integer :: e, i
338
339 do e = 1, n
340 do i = 1, lx * lx * lx
341 cr(i,1,1,e) = w3(i,1,1) &
342 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
343 + cy(i,1,1,e) * drdy(i,1,1,e) &
344 + cz(i,1,1,e) * drdz(i,1,1,e) )
345 cs(i,1,1,e) = w3(i,1,1) &
346 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
347 + cy(i,1,1,e) * dsdy(i,1,1,e) &
348 + cz(i,1,1,e) * dsdz(i,1,1,e))
349 ct(i,1,1,e) = w3(i,1,1) &
350 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
351 + cy(i,1,1,e) * dtdy(i,1,1,e) &
352 + cz(i,1,1,e) * dtdz(i,1,1,e))
353 end do
354 end do
355
356 end subroutine cpu_set_convect_rst_lx12
357
358 subroutine cpu_set_convect_rst_lx11(cr, cs, ct, cx, cy, cz, &
359 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
360 integer, parameter :: lx = 11
361 integer, intent(in) :: n
362 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
363 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
364 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
365 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
366 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
367 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
368 integer :: e, i
369
370 do e = 1, n
371 do i = 1, lx * lx * lx
372 cr(i,1,1,e) = w3(i,1,1) &
373 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
374 + cy(i,1,1,e) * drdy(i,1,1,e) &
375 + cz(i,1,1,e) * drdz(i,1,1,e) )
376 cs(i,1,1,e) = w3(i,1,1) &
377 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
378 + cy(i,1,1,e) * dsdy(i,1,1,e) &
379 + cz(i,1,1,e) * dsdz(i,1,1,e))
380 ct(i,1,1,e) = w3(i,1,1) &
381 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
382 + cy(i,1,1,e) * dtdy(i,1,1,e) &
383 + cz(i,1,1,e) * dtdz(i,1,1,e))
384 end do
385 end do
386
387 end subroutine cpu_set_convect_rst_lx11
388
389 subroutine cpu_set_convect_rst_lx10(cr, cs, ct, cx, cy, cz, &
390 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
391 integer, parameter :: lx = 10
392 integer, intent(in) :: n
393 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
394 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
395 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
396 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
397 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
398 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
399 integer :: e, i
400
401 do e = 1, n
402 do i = 1, lx * lx * lx
403 cr(i,1,1,e) = w3(i,1,1) &
404 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
405 + cy(i,1,1,e) * drdy(i,1,1,e) &
406 + cz(i,1,1,e) * drdz(i,1,1,e) )
407 cs(i,1,1,e) = w3(i,1,1) &
408 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
409 + cy(i,1,1,e) * dsdy(i,1,1,e) &
410 + cz(i,1,1,e) * dsdz(i,1,1,e))
411 ct(i,1,1,e) = w3(i,1,1) &
412 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
413 + cy(i,1,1,e) * dtdy(i,1,1,e) &
414 + cz(i,1,1,e) * dtdz(i,1,1,e))
415 end do
416 end do
417
418 end subroutine cpu_set_convect_rst_lx10
419
420 subroutine cpu_set_convect_rst_lx9(cr, cs, ct, cx, cy, cz, &
421 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
422 integer, parameter :: lx = 9
423 integer, intent(in) :: n
424 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
425 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
426 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
427 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
428 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
429 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
430 integer :: e, i
431
432 do e = 1, n
433 do i = 1, lx * lx * lx
434 cr(i,1,1,e) = w3(i,1,1) &
435 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
436 + cy(i,1,1,e) * drdy(i,1,1,e) &
437 + cz(i,1,1,e) * drdz(i,1,1,e) )
438 cs(i,1,1,e) = w3(i,1,1) &
439 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
440 + cy(i,1,1,e) * dsdy(i,1,1,e) &
441 + cz(i,1,1,e) * dsdz(i,1,1,e))
442 ct(i,1,1,e) = w3(i,1,1) &
443 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
444 + cy(i,1,1,e) * dtdy(i,1,1,e) &
445 + cz(i,1,1,e) * dtdz(i,1,1,e))
446 end do
447 end do
448
449 end subroutine cpu_set_convect_rst_lx9
450
451 subroutine cpu_set_convect_rst_lx8(cr, cs, ct, cx, cy, cz, &
452 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
453 integer, parameter :: lx = 8
454 integer, intent(in) :: n
455 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
456 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
457 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
458 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
459 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
460 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
461 integer :: e, i
462
463 do e = 1, n
464 do i = 1, lx * lx * lx
465 cr(i,1,1,e) = w3(i,1,1) &
466 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
467 + cy(i,1,1,e) * drdy(i,1,1,e) &
468 + cz(i,1,1,e) * drdz(i,1,1,e) )
469 cs(i,1,1,e) = w3(i,1,1) &
470 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
471 + cy(i,1,1,e) * dsdy(i,1,1,e) &
472 + cz(i,1,1,e) * dsdz(i,1,1,e))
473 ct(i,1,1,e) = w3(i,1,1) &
474 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
475 + cy(i,1,1,e) * dtdy(i,1,1,e) &
476 + cz(i,1,1,e) * dtdz(i,1,1,e))
477 end do
478 end do
479
480 end subroutine cpu_set_convect_rst_lx8
481
482 subroutine cpu_set_convect_rst_lx7(cr, cs, ct, cx, cy, cz, &
483 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
484 integer, parameter :: lx = 7
485 integer, intent(in) :: n
486 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
487 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
488 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
489 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
490 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
491 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
492 integer :: e, i
493
494 do e = 1, n
495 do i = 1, lx * lx * lx
496 cr(i,1,1,e) = w3(i,1,1) &
497 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
498 + cy(i,1,1,e) * drdy(i,1,1,e) &
499 + cz(i,1,1,e) * drdz(i,1,1,e) )
500 cs(i,1,1,e) = w3(i,1,1) &
501 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
502 + cy(i,1,1,e) * dsdy(i,1,1,e) &
503 + cz(i,1,1,e) * dsdz(i,1,1,e))
504 ct(i,1,1,e) = w3(i,1,1) &
505 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
506 + cy(i,1,1,e) * dtdy(i,1,1,e) &
507 + cz(i,1,1,e) * dtdz(i,1,1,e))
508 end do
509 end do
510
511 end subroutine cpu_set_convect_rst_lx7
512
513 subroutine cpu_set_convect_rst_lx6(cr, cs, ct, cx, cy, cz, &
514 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
515 integer, parameter :: lx = 6
516 integer, intent(in) :: n
517 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
518 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
519 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
520 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
521 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
522 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
523 integer :: e, i
524
525 do e = 1, n
526 do i = 1, lx * lx * lx
527 cr(i,1,1,e) = w3(i,1,1) &
528 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
529 + cy(i,1,1,e) * drdy(i,1,1,e) &
530 + cz(i,1,1,e) * drdz(i,1,1,e) )
531 cs(i,1,1,e) = w3(i,1,1) &
532 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
533 + cy(i,1,1,e) * dsdy(i,1,1,e) &
534 + cz(i,1,1,e) * dsdz(i,1,1,e))
535 ct(i,1,1,e) = w3(i,1,1) &
536 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
537 + cy(i,1,1,e) * dtdy(i,1,1,e) &
538 + cz(i,1,1,e) * dtdz(i,1,1,e))
539 end do
540 end do
541
542 end subroutine cpu_set_convect_rst_lx6
543
544 subroutine cpu_set_convect_rst_lx5(cr, cs, ct, cx, cy, cz, &
545 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
546 integer, parameter :: lx = 5
547 integer, intent(in) :: n
548 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
549 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
550 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
551 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
552 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
553 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
554 integer :: e, i
555
556 do e = 1, n
557 do i = 1, lx * lx * lx
558 cr(i,1,1,e) = w3(i,1,1) &
559 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
560 + cy(i,1,1,e) * drdy(i,1,1,e) &
561 + cz(i,1,1,e) * drdz(i,1,1,e) )
562 cs(i,1,1,e) = w3(i,1,1) &
563 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
564 + cy(i,1,1,e) * dsdy(i,1,1,e) &
565 + cz(i,1,1,e) * dsdz(i,1,1,e))
566 ct(i,1,1,e) = w3(i,1,1) &
567 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
568 + cy(i,1,1,e) * dtdy(i,1,1,e) &
569 + cz(i,1,1,e) * dtdz(i,1,1,e))
570 end do
571 end do
572
573 end subroutine cpu_set_convect_rst_lx5
574
575 subroutine cpu_set_convect_rst_lx4(cr, cs, ct, cx, cy, cz, &
576 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
577 integer, parameter :: lx = 4
578 integer, intent(in) :: n
579 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
580 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
581 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
582 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
583 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
584 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
585 integer :: e, i
586
587 do e = 1, n
588 do i = 1, lx * lx * lx
589 cr(i,1,1,e) = w3(i,1,1) &
590 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
591 + cy(i,1,1,e) * drdy(i,1,1,e) &
592 + cz(i,1,1,e) * drdz(i,1,1,e) )
593 cs(i,1,1,e) = w3(i,1,1) &
594 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
595 + cy(i,1,1,e) * dsdy(i,1,1,e) &
596 + cz(i,1,1,e) * dsdz(i,1,1,e))
597 ct(i,1,1,e) = w3(i,1,1) &
598 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
599 + cy(i,1,1,e) * dtdy(i,1,1,e) &
600 + cz(i,1,1,e) * dtdz(i,1,1,e))
601 end do
602 end do
603
604 end subroutine cpu_set_convect_rst_lx4
605
606 subroutine cpu_set_convect_rst_lx3(cr, cs, ct, cx, cy, cz, &
607 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
608 integer, parameter :: lx = 3
609 integer, intent(in) :: n
610 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
611 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
612 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
613 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
614 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
615 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
616 integer :: e, i
617
618 do e = 1, n
619 do i = 1, lx * lx * lx
620 cr(i,1,1,e) = w3(i,1,1) &
621 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
622 + cy(i,1,1,e) * drdy(i,1,1,e) &
623 + cz(i,1,1,e) * drdz(i,1,1,e) )
624 cs(i,1,1,e) = w3(i,1,1) &
625 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
626 + cy(i,1,1,e) * dsdy(i,1,1,e) &
627 + cz(i,1,1,e) * dsdz(i,1,1,e))
628 ct(i,1,1,e) = w3(i,1,1) &
629 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
630 + cy(i,1,1,e) * dtdy(i,1,1,e) &
631 + cz(i,1,1,e) * dtdz(i,1,1,e))
632 end do
633 end do
634
635 end subroutine cpu_set_convect_rst_lx3
636
637 subroutine cpu_set_convect_rst_lx2(cr, cs, ct, cx, cy, cz, &
638 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
639 integer, parameter :: lx = 2
640 integer, intent(in) :: n
641 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
642 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
643 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
644 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
645 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
646 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
647 integer :: e, i
648
649 do e = 1, n
650 do i = 1, lx * lx * lx
651 cr(i,1,1,e) = w3(i,1,1) &
652 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
653 + cy(i,1,1,e) * drdy(i,1,1,e) &
654 + cz(i,1,1,e) * drdz(i,1,1,e) )
655 cs(i,1,1,e) = w3(i,1,1) &
656 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
657 + cy(i,1,1,e) * dsdy(i,1,1,e) &
658 + cz(i,1,1,e) * dsdz(i,1,1,e))
659 ct(i,1,1,e) = w3(i,1,1) &
660 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
661 + cy(i,1,1,e) * dtdy(i,1,1,e) &
662 + cz(i,1,1,e) * dtdz(i,1,1,e))
663 end do
664 end do
665
666 end subroutine cpu_set_convect_rst_lx2
667
668end submodule cpu_set_convect_rst
Operators CPU backend.
Definition opr_cpu.f90:34