Neko 1.99.11
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!
33!> Gradient kernels
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 !$omp parallel
52 select case (lx)
53 case (18)
54 call cpu_set_convect_rst_lx18(cr, cs, ct, cx, cy, cz, &
55 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
56 case (17)
57 call cpu_set_convect_rst_lx17(cr, cs, ct, cx, cy, cz, &
58 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
59 case (16)
60 call cpu_set_convect_rst_lx16(cr, cs, ct, cx, cy, cz, &
61 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
62 case (15)
63 call cpu_set_convect_rst_lx15(cr, cs, ct, cx, cy, cz, drdx, &
64 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
65 case (14)
66 call cpu_set_convect_rst_lx14(cr, cs, ct, cx, cy, cz, drdx, &
67 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
68 case (13)
69 call cpu_set_convect_rst_lx13(cr, cs, ct, cx, cy, cz, drdx, &
70 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
71 case (12)
72 call cpu_set_convect_rst_lx12(cr, cs, ct, cx, cy, cz, drdx, &
73 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
74 case (11)
75 call cpu_set_convect_rst_lx11(cr, cs, ct, cx, cy, cz, drdx, &
76 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
77 case (10)
78 call cpu_set_convect_rst_lx10(cr, cs, ct, cx, cy, cz, drdx, &
79 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
80 case (9)
81 call cpu_set_convect_rst_lx9(cr, cs, ct, cx, cy, cz, drdx, &
82 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
83 case (8)
84 call cpu_set_convect_rst_lx8(cr, cs, ct, cx, cy, cz, drdx, &
85 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
86 case (7)
87 call cpu_set_convect_rst_lx7(cr, cs, ct, cx, cy, cz, drdx, &
88 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
89 case (6)
90 call cpu_set_convect_rst_lx6(cr, cs, ct, cx, cy, cz, drdx, &
91 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
92 case (5)
93 call cpu_set_convect_rst_lx5(cr, cs, ct, cx, cy, cz, drdx, &
94 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
95 case (4)
96 call cpu_set_convect_rst_lx4(cr, cs, ct, cx, cy, cz, drdx, &
97 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
98 case (3)
99 call cpu_set_convect_rst_lx3(cr, cs, ct, cx, cy, cz, drdx, &
100 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
101 case (2)
102 call cpu_set_convect_rst_lx2(cr, cs, ct, cx, cy, cz, drdx, &
103 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv)
104 case default
105 call cpu_set_convect_rst_lx(cr, cs, ct, cx, cy, cz, drdx, &
106 dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, nelv, lx)
107 end select
108 !$omp end parallel
109 end associate
110
111 end subroutine opr_cpu_set_convect_rst
112
113 subroutine cpu_set_convect_rst_lx(cr, cs, ct, cx, cy, cz, &
114 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n, lx)
115 integer, intent(in) :: n, lx
116 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
117 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
118 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
119 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
120 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
121 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
122 integer :: e, i
123
124 !$omp do
125 do e = 1, n
126 do i = 1, lx * lx * lx
127 cr(i,1,1,e) = w3(i,1,1) &
128 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
129 + cy(i,1,1,e) * drdy(i,1,1,e) &
130 + cz(i,1,1,e) * drdz(i,1,1,e) )
131 cs(i,1,1,e) = w3(i,1,1) &
132 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
133 + cy(i,1,1,e) * dsdy(i,1,1,e) &
134 + cz(i,1,1,e) * dsdz(i,1,1,e))
135 ct(i,1,1,e) = w3(i,1,1) &
136 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
137 + cy(i,1,1,e) * dtdy(i,1,1,e) &
138 + cz(i,1,1,e) * dtdz(i,1,1,e))
139 end do
140 end do
141 !$omp end do
142
143 end subroutine cpu_set_convect_rst_lx
144
145 subroutine cpu_set_convect_rst_lx18(cr, cs, ct, cx, cy, cz, &
146 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
147 integer, parameter :: lx = 18
148 integer, intent(in) :: n
149 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
150 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
151 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
152 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
153 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
154 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
155 integer :: e, i
156
157 !$omp do
158 do e = 1, n
159 do i = 1, lx * lx * lx
160 cr(i,1,1,e) = w3(i,1,1) &
161 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
162 + cy(i,1,1,e) * drdy(i,1,1,e) &
163 + cz(i,1,1,e) * drdz(i,1,1,e) )
164 cs(i,1,1,e) = w3(i,1,1) &
165 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
166 + cy(i,1,1,e) * dsdy(i,1,1,e) &
167 + cz(i,1,1,e) * dsdz(i,1,1,e))
168 ct(i,1,1,e) = w3(i,1,1) &
169 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
170 + cy(i,1,1,e) * dtdy(i,1,1,e) &
171 + cz(i,1,1,e) * dtdz(i,1,1,e))
172 end do
173 end do
174 !$omp end do
175
176 end subroutine cpu_set_convect_rst_lx18
177
178 subroutine cpu_set_convect_rst_lx17(cr, cs, ct, cx, cy, cz, &
179 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
180 integer, parameter :: lx = 17
181 integer, intent(in) :: n
182 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
183 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
184 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
185 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
186 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
187 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
188 integer :: e, i
189
190 !$omp do
191 do e = 1, n
192 do i = 1, lx * lx * lx
193 cr(i,1,1,e) = w3(i,1,1) &
194 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
195 + cy(i,1,1,e) * drdy(i,1,1,e) &
196 + cz(i,1,1,e) * drdz(i,1,1,e) )
197 cs(i,1,1,e) = w3(i,1,1) &
198 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
199 + cy(i,1,1,e) * dsdy(i,1,1,e) &
200 + cz(i,1,1,e) * dsdz(i,1,1,e))
201 ct(i,1,1,e) = w3(i,1,1) &
202 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
203 + cy(i,1,1,e) * dtdy(i,1,1,e) &
204 + cz(i,1,1,e) * dtdz(i,1,1,e))
205 end do
206 end do
207 !$omp end do
208
209 end subroutine cpu_set_convect_rst_lx17
210
211 subroutine cpu_set_convect_rst_lx16(cr, cs, ct, cx, cy, cz, &
212 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
213 integer, parameter :: lx = 16
214 integer, intent(in) :: n
215 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
216 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
217 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
218 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
219 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
220 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
221 integer :: e, i
222
223 !$omp do
224 do e = 1, n
225 do i = 1, lx * lx * lx
226 cr(i,1,1,e) = w3(i,1,1) &
227 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
228 + cy(i,1,1,e) * drdy(i,1,1,e) &
229 + cz(i,1,1,e) * drdz(i,1,1,e) )
230 cs(i,1,1,e) = w3(i,1,1) &
231 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
232 + cy(i,1,1,e) * dsdy(i,1,1,e) &
233 + cz(i,1,1,e) * dsdz(i,1,1,e))
234 ct(i,1,1,e) = w3(i,1,1) &
235 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
236 + cy(i,1,1,e) * dtdy(i,1,1,e) &
237 + cz(i,1,1,e) * dtdz(i,1,1,e))
238 end do
239 end do
240 !$omp end do
241
242 end subroutine cpu_set_convect_rst_lx16
243
244 subroutine cpu_set_convect_rst_lx15(cr, cs, ct, cx, cy, cz, &
245 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
246 integer, parameter :: lx = 15
247 integer, intent(in) :: n
248 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
249 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
250 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
251 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
252 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
253 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
254 integer :: e, i
255
256 !$omp do
257 do e = 1, n
258 do i = 1, lx * lx * lx
259 cr(i,1,1,e) = w3(i,1,1) &
260 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
261 + cy(i,1,1,e) * drdy(i,1,1,e) &
262 + cz(i,1,1,e) * drdz(i,1,1,e) )
263 cs(i,1,1,e) = w3(i,1,1) &
264 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
265 + cy(i,1,1,e) * dsdy(i,1,1,e) &
266 + cz(i,1,1,e) * dsdz(i,1,1,e))
267 ct(i,1,1,e) = w3(i,1,1) &
268 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
269 + cy(i,1,1,e) * dtdy(i,1,1,e) &
270 + cz(i,1,1,e) * dtdz(i,1,1,e))
271 end do
272 end do
273 !$omp end do
274
275 end subroutine cpu_set_convect_rst_lx15
276
277 subroutine cpu_set_convect_rst_lx14(cr, cs, ct, cx, cy, cz, &
278 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
279 integer, parameter :: lx = 14
280 integer, intent(in) :: n
281 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
282 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
283 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
284 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
285 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
286 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
287 integer :: e, i
288
289 !$omp do
290 do e = 1, n
291 do i = 1, lx * lx * lx
292 cr(i,1,1,e) = w3(i,1,1) &
293 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
294 + cy(i,1,1,e) * drdy(i,1,1,e) &
295 + cz(i,1,1,e) * drdz(i,1,1,e) )
296 cs(i,1,1,e) = w3(i,1,1) &
297 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
298 + cy(i,1,1,e) * dsdy(i,1,1,e) &
299 + cz(i,1,1,e) * dsdz(i,1,1,e))
300 ct(i,1,1,e) = w3(i,1,1) &
301 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
302 + cy(i,1,1,e) * dtdy(i,1,1,e) &
303 + cz(i,1,1,e) * dtdz(i,1,1,e))
304 end do
305 end do
306 !$omp end do
307
308 end subroutine cpu_set_convect_rst_lx14
309
310 subroutine cpu_set_convect_rst_lx13(cr, cs, ct, cx, cy, cz, &
311 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
312 integer, parameter :: lx = 13
313 integer, intent(in) :: n
314 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
315 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
316 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
317 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
318 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
319 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
320 integer :: e, i
321
322 !$omp do
323 do e = 1, n
324 do i = 1, lx * lx * lx
325 cr(i,1,1,e) = w3(i,1,1) &
326 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
327 + cy(i,1,1,e) * drdy(i,1,1,e) &
328 + cz(i,1,1,e) * drdz(i,1,1,e) )
329 cs(i,1,1,e) = w3(i,1,1) &
330 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
331 + cy(i,1,1,e) * dsdy(i,1,1,e) &
332 + cz(i,1,1,e) * dsdz(i,1,1,e))
333 ct(i,1,1,e) = w3(i,1,1) &
334 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
335 + cy(i,1,1,e) * dtdy(i,1,1,e) &
336 + cz(i,1,1,e) * dtdz(i,1,1,e))
337 end do
338 end do
339 !$omp end do
340
341 end subroutine cpu_set_convect_rst_lx13
342
343 subroutine cpu_set_convect_rst_lx12(cr, cs, ct, cx, cy, cz, &
344 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
345 integer, parameter :: lx = 12
346 integer, intent(in) :: n
347 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
348 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
349 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
350 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
351 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
352 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
353 integer :: e, i
354
355 !$omp do
356 do e = 1, n
357 do i = 1, lx * lx * lx
358 cr(i,1,1,e) = w3(i,1,1) &
359 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
360 + cy(i,1,1,e) * drdy(i,1,1,e) &
361 + cz(i,1,1,e) * drdz(i,1,1,e) )
362 cs(i,1,1,e) = w3(i,1,1) &
363 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
364 + cy(i,1,1,e) * dsdy(i,1,1,e) &
365 + cz(i,1,1,e) * dsdz(i,1,1,e))
366 ct(i,1,1,e) = w3(i,1,1) &
367 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
368 + cy(i,1,1,e) * dtdy(i,1,1,e) &
369 + cz(i,1,1,e) * dtdz(i,1,1,e))
370 end do
371 end do
372 !$omp end do
373
374 end subroutine cpu_set_convect_rst_lx12
375
376 subroutine cpu_set_convect_rst_lx11(cr, cs, ct, cx, cy, cz, &
377 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
378 integer, parameter :: lx = 11
379 integer, intent(in) :: n
380 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
381 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
382 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
383 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
384 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
385 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
386 integer :: e, i
387
388 !$omp do
389 do e = 1, n
390 do i = 1, lx * lx * lx
391 cr(i,1,1,e) = w3(i,1,1) &
392 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
393 + cy(i,1,1,e) * drdy(i,1,1,e) &
394 + cz(i,1,1,e) * drdz(i,1,1,e) )
395 cs(i,1,1,e) = w3(i,1,1) &
396 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
397 + cy(i,1,1,e) * dsdy(i,1,1,e) &
398 + cz(i,1,1,e) * dsdz(i,1,1,e))
399 ct(i,1,1,e) = w3(i,1,1) &
400 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
401 + cy(i,1,1,e) * dtdy(i,1,1,e) &
402 + cz(i,1,1,e) * dtdz(i,1,1,e))
403 end do
404 end do
405 !$omp end do
406
407 end subroutine cpu_set_convect_rst_lx11
408
409 subroutine cpu_set_convect_rst_lx10(cr, cs, ct, cx, cy, cz, &
410 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
411 integer, parameter :: lx = 10
412 integer, intent(in) :: n
413 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
414 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
415 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
416 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
417 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
418 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
419 integer :: e, i
420
421 !$omp do
422 do e = 1, n
423 do i = 1, lx * lx * lx
424 cr(i,1,1,e) = w3(i,1,1) &
425 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
426 + cy(i,1,1,e) * drdy(i,1,1,e) &
427 + cz(i,1,1,e) * drdz(i,1,1,e) )
428 cs(i,1,1,e) = w3(i,1,1) &
429 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
430 + cy(i,1,1,e) * dsdy(i,1,1,e) &
431 + cz(i,1,1,e) * dsdz(i,1,1,e))
432 ct(i,1,1,e) = w3(i,1,1) &
433 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
434 + cy(i,1,1,e) * dtdy(i,1,1,e) &
435 + cz(i,1,1,e) * dtdz(i,1,1,e))
436 end do
437 end do
438 !$omp end do
439
440 end subroutine cpu_set_convect_rst_lx10
441
442 subroutine cpu_set_convect_rst_lx9(cr, cs, ct, cx, cy, cz, &
443 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
444 integer, parameter :: lx = 9
445 integer, intent(in) :: n
446 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
447 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
448 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
449 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
450 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
451 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
452 integer :: e, i
453
454 !$omp do
455 do e = 1, n
456 do i = 1, lx * lx * lx
457 cr(i,1,1,e) = w3(i,1,1) &
458 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
459 + cy(i,1,1,e) * drdy(i,1,1,e) &
460 + cz(i,1,1,e) * drdz(i,1,1,e) )
461 cs(i,1,1,e) = w3(i,1,1) &
462 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
463 + cy(i,1,1,e) * dsdy(i,1,1,e) &
464 + cz(i,1,1,e) * dsdz(i,1,1,e))
465 ct(i,1,1,e) = w3(i,1,1) &
466 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
467 + cy(i,1,1,e) * dtdy(i,1,1,e) &
468 + cz(i,1,1,e) * dtdz(i,1,1,e))
469 end do
470 end do
471 !$omp end do
472
473 end subroutine cpu_set_convect_rst_lx9
474
475 subroutine cpu_set_convect_rst_lx8(cr, cs, ct, cx, cy, cz, &
476 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
477 integer, parameter :: lx = 8
478 integer, intent(in) :: n
479 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
480 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
481 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
482 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
483 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
484 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
485 integer :: e, i
486
487 !$omp do
488 do e = 1, n
489 do i = 1, lx * lx * lx
490 cr(i,1,1,e) = w3(i,1,1) &
491 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
492 + cy(i,1,1,e) * drdy(i,1,1,e) &
493 + cz(i,1,1,e) * drdz(i,1,1,e) )
494 cs(i,1,1,e) = w3(i,1,1) &
495 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
496 + cy(i,1,1,e) * dsdy(i,1,1,e) &
497 + cz(i,1,1,e) * dsdz(i,1,1,e))
498 ct(i,1,1,e) = w3(i,1,1) &
499 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
500 + cy(i,1,1,e) * dtdy(i,1,1,e) &
501 + cz(i,1,1,e) * dtdz(i,1,1,e))
502 end do
503 end do
504 !$omp end do
505
506 end subroutine cpu_set_convect_rst_lx8
507
508 subroutine cpu_set_convect_rst_lx7(cr, cs, ct, cx, cy, cz, &
509 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
510 integer, parameter :: lx = 7
511 integer, intent(in) :: n
512 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
513 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
514 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
515 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
516 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
517 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
518 integer :: e, i
519
520 !$omp do
521 do e = 1, n
522 do i = 1, lx * lx * lx
523 cr(i,1,1,e) = w3(i,1,1) &
524 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
525 + cy(i,1,1,e) * drdy(i,1,1,e) &
526 + cz(i,1,1,e) * drdz(i,1,1,e) )
527 cs(i,1,1,e) = w3(i,1,1) &
528 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
529 + cy(i,1,1,e) * dsdy(i,1,1,e) &
530 + cz(i,1,1,e) * dsdz(i,1,1,e))
531 ct(i,1,1,e) = w3(i,1,1) &
532 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
533 + cy(i,1,1,e) * dtdy(i,1,1,e) &
534 + cz(i,1,1,e) * dtdz(i,1,1,e))
535 end do
536 end do
537 !$omp end do
538
539 end subroutine cpu_set_convect_rst_lx7
540
541 subroutine cpu_set_convect_rst_lx6(cr, cs, ct, cx, cy, cz, &
542 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
543 integer, parameter :: lx = 6
544 integer, intent(in) :: n
545 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
546 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
547 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
548 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
549 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
550 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
551 integer :: e, i
552
553 !$omp do
554 do e = 1, n
555 do i = 1, lx * lx * lx
556 cr(i,1,1,e) = w3(i,1,1) &
557 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
558 + cy(i,1,1,e) * drdy(i,1,1,e) &
559 + cz(i,1,1,e) * drdz(i,1,1,e) )
560 cs(i,1,1,e) = w3(i,1,1) &
561 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
562 + cy(i,1,1,e) * dsdy(i,1,1,e) &
563 + cz(i,1,1,e) * dsdz(i,1,1,e))
564 ct(i,1,1,e) = w3(i,1,1) &
565 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
566 + cy(i,1,1,e) * dtdy(i,1,1,e) &
567 + cz(i,1,1,e) * dtdz(i,1,1,e))
568 end do
569 end do
570 !$omp end do
571
572 end subroutine cpu_set_convect_rst_lx6
573
574 subroutine cpu_set_convect_rst_lx5(cr, cs, ct, cx, cy, cz, &
575 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
576 integer, parameter :: lx = 5
577 integer, intent(in) :: n
578 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
579 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
580 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
581 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
582 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
583 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
584 integer :: e, i
585
586 !$omp do
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 !$omp end do
604
605 end subroutine cpu_set_convect_rst_lx5
606
607 subroutine cpu_set_convect_rst_lx4(cr, cs, ct, cx, cy, cz, &
608 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
609 integer, parameter :: lx = 4
610 integer, intent(in) :: n
611 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
612 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
613 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
614 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
615 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
616 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
617 integer :: e, i
618
619 !$omp do
620 do e = 1, n
621 do i = 1, lx * lx * lx
622 cr(i,1,1,e) = w3(i,1,1) &
623 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
624 + cy(i,1,1,e) * drdy(i,1,1,e) &
625 + cz(i,1,1,e) * drdz(i,1,1,e) )
626 cs(i,1,1,e) = w3(i,1,1) &
627 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
628 + cy(i,1,1,e) * dsdy(i,1,1,e) &
629 + cz(i,1,1,e) * dsdz(i,1,1,e))
630 ct(i,1,1,e) = w3(i,1,1) &
631 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
632 + cy(i,1,1,e) * dtdy(i,1,1,e) &
633 + cz(i,1,1,e) * dtdz(i,1,1,e))
634 end do
635 end do
636 !$omp end do
637
638 end subroutine cpu_set_convect_rst_lx4
639
640 subroutine cpu_set_convect_rst_lx3(cr, cs, ct, cx, cy, cz, &
641 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
642 integer, parameter :: lx = 3
643 integer, intent(in) :: n
644 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
645 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
646 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
647 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
648 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
649 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
650 integer :: e, i
651
652 !$omp do
653 do e = 1, n
654 do i = 1, lx * lx * lx
655 cr(i,1,1,e) = w3(i,1,1) &
656 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
657 + cy(i,1,1,e) * drdy(i,1,1,e) &
658 + cz(i,1,1,e) * drdz(i,1,1,e) )
659 cs(i,1,1,e) = w3(i,1,1) &
660 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
661 + cy(i,1,1,e) * dsdy(i,1,1,e) &
662 + cz(i,1,1,e) * dsdz(i,1,1,e))
663 ct(i,1,1,e) = w3(i,1,1) &
664 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
665 + cy(i,1,1,e) * dtdy(i,1,1,e) &
666 + cz(i,1,1,e) * dtdz(i,1,1,e))
667 end do
668 end do
669 !$omp end do
670
671 end subroutine cpu_set_convect_rst_lx3
672
673 subroutine cpu_set_convect_rst_lx2(cr, cs, ct, cx, cy, cz, &
674 drdx, dsdx, dtdx, drdy, dsdy, dtdy, drdz, dsdz, dtdz, w3, n)
675 integer, parameter :: lx = 2
676 integer, intent(in) :: n
677 real(kind=rp), dimension(lx, lx, lx, n), intent(inout) :: cr, cs, ct
678 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: cx, cy, cz
679 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdx, dsdx, dtdx
680 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdy, dsdy, dtdy
681 real(kind=rp), dimension(lx, lx, lx, n), intent(in) :: drdz, dsdz, dtdz
682 real(kind=rp), dimension(lx, lx, lx), intent(in) :: w3
683 integer :: e, i
684
685 !$omp do
686 do e = 1, n
687 do i = 1, lx * lx * lx
688 cr(i,1,1,e) = w3(i,1,1) &
689 * ( cx(i,1,1,e) * drdx(i,1,1,e) &
690 + cy(i,1,1,e) * drdy(i,1,1,e) &
691 + cz(i,1,1,e) * drdz(i,1,1,e) )
692 cs(i,1,1,e) = w3(i,1,1) &
693 * ( cx(i,1,1,e) * dsdx(i,1,1,e) &
694 + cy(i,1,1,e) * dsdy(i,1,1,e) &
695 + cz(i,1,1,e) * dsdz(i,1,1,e))
696 ct(i,1,1,e) = w3(i,1,1) &
697 * ( cx(i,1,1,e) * dtdx(i,1,1,e) &
698 + cy(i,1,1,e) * dtdy(i,1,1,e) &
699 + cz(i,1,1,e) * dtdz(i,1,1,e))
700 end do
701 end do
702 !$omp end do
703
704 end subroutine cpu_set_convect_rst_lx2
705
706end submodule cpu_set_convect_rst
Operators CPU backend.
Definition opr_cpu.f90:34