FE-Project
Loading...
Searching...
No Matches
scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu Module Reference

module FElib / Fluid dyn solver / Atmosphere / Regional nonhydrostatic model / HEVE More...

Functions/Subroutines

subroutine, public atm_dyn_dgm_nonhydro3d_rhot_heve_gpu_init (mesh)
 Initialize the module for HEVE scheme on GPU.
subroutine, public atm_dyn_dgm_nonhydro3d_rhot_heve_gpu_final ()
 Finalize the module for HEVE scheme on GPU.
subroutine, public atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_gpu (dens_dt, momx_dt, momy_dt, momz_dt, rhot_dt, ddens_, momx_, momy_, momz_, drhot_, dpres_, dens_hyd, pres_hyd, pres_hyd_ref, therm_hyd, coriolis, rtot, cvtot, cptot, dphyddx, dphyddy, element3d_operation, dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d)
subroutine, public atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_gpu2 (dens_dt, momx_dt, momy_dt, momz_dt, rhot_dt, ddens_, momx_, momy_, momz_, drhot_, dpres_, dens_hyd, pres_hyd, pres_hyd_ref, therm_hyd, coriolis, rtot, cvtot, cptot, dphyddx, dphyddy, element3d_operation, dx, dy, dz, sx, sy, sz, lift, lmesh, elem, lmesh2d, elem2d)

Detailed Description

module FElib / Fluid dyn solver / Atmosphere / Regional nonhydrostatic model / HEVE

Description
HEVE DGM scheme for Atmospheric dynamical process which runs on GPU. The governing equations is a fully compressible nonhydrostatic equations, which consist of mass, momentum, and thermodynamics (density * potential temperature conservation) equations.
Author
Yuta Kawai, Xuanzhengbo Ren, and Team SCALE

Function/Subroutine Documentation

◆ atm_dyn_dgm_nonhydro3d_rhot_heve_gpu_init()

subroutine, public scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu::atm_dyn_dgm_nonhydro3d_rhot_heve_gpu_init ( class(meshbase3d), intent(in) mesh)

Initialize the module for HEVE scheme on GPU.

Definition at line 74 of file scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu.F90.

75 implicit none
76 class(MeshBase3D), intent(in) :: mesh
77 !--------------------------------------------
78
79 call atm_dyn_dgm_nonhydro3d_common_init( mesh )
80 return

References scale_atm_dyn_dgm_nonhydro3d_common::atm_dyn_dgm_nonhydro3d_common_init().

◆ atm_dyn_dgm_nonhydro3d_rhot_heve_gpu_final()

subroutine, public scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu::atm_dyn_dgm_nonhydro3d_rhot_heve_gpu_final

Finalize the module for HEVE scheme on GPU.

Definition at line 84 of file scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu.F90.

85 implicit none
86 !--------------------------------------------
87
88 call atm_dyn_dgm_nonhydro3d_common_final()
89 return

References scale_atm_dyn_dgm_nonhydro3d_common::atm_dyn_dgm_nonhydro3d_common_final().

◆ atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_gpu()

subroutine, public scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu::atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_gpu ( real(rp), dimension(elem%np,lmesh%nea), intent(out) dens_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) momx_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) momy_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) momz_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) rhot_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(in) ddens_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) momx_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) momy_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) momz_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) drhot_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dpres_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dens_hyd,
real(rp), dimension(elem%np,lmesh%nea), intent(in) pres_hyd,
real(rp), dimension(elem%np,lmesh%nea), intent(in) pres_hyd_ref,
real(rp), dimension(elem%np,lmesh%nea), intent(in) therm_hyd,
real(rp), dimension(elem2d%np,lmesh2d%nea), intent(in) coriolis,
real(rp), dimension(elem%np,lmesh%nea), intent(in) rtot,
real(rp), dimension(elem%np,lmesh%nea), intent(in) cvtot,
real(rp), dimension(elem%np,lmesh%nea), intent(in) cptot,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dphyddx,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dphyddy,
class(elementoperationbase3d), intent(in) element3d_operation,
type(sparsemat), intent(in) dx,
type(sparsemat), intent(in) dy,
type(sparsemat), intent(in) dz,
type(sparsemat), intent(in) sx,
type(sparsemat), intent(in) sy,
type(sparsemat), intent(in) sz,
type(sparsemat), intent(in) lift,
class(localmesh3d), intent(in) lmesh,
class(elementbase3d), intent(in) elem,
class(localmesh2d), intent(in) lmesh2d,
class(elementbase2d), intent(in) elem2d )

Definition at line 95 of file scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu.F90.

102
107 div_kplane => elementoperationgpu_div_kplane, &
108 divvar5_kplane => elementoperationgpu_divvar5_kplane, &
109 divvar5_z_lift => elementoperationgpu_divvar5_z_lift, &
111 implicit none
112
113 class(LocalMesh3D), intent(in) :: lmesh
114 class(ElementBase3D), intent(in) :: elem
115 class(LocalMesh2D), intent(in) :: lmesh2D
116 class(ElementBase2D), intent(in) :: elem2D
117 class(ElementOperationBase3D), intent(in) :: element3D_operation
118 type(SparseMat), intent(in) :: Dx, Dy, Dz, Sx, Sy, Sz, Lift
119 real(RP), intent(out) :: DENS_dt(elem%Np,lmesh%NeA)
120 real(RP), intent(out) :: MOMX_dt(elem%Np,lmesh%NeA)
121 real(RP), intent(out) :: MOMY_dt(elem%Np,lmesh%NeA)
122 real(RP), intent(out) :: MOMZ_dt(elem%Np,lmesh%NeA)
123 real(RP), intent(out) :: RHOT_dt(elem%Np,lmesh%NeA)
124 real(RP), intent(in) :: DDENS_(elem%Np,lmesh%NeA)
125 real(RP), intent(in) :: MOMX_(elem%Np,lmesh%NeA)
126 real(RP), intent(in) :: MOMY_(elem%Np,lmesh%NeA)
127 real(RP), intent(in) :: MOMZ_(elem%Np,lmesh%NeA)
128 real(RP), intent(in) :: DRHOT_(elem%Np,lmesh%NeA)
129 real(RP), intent(in) :: DPRES_(elem%Np,lmesh%NeA)
130 real(RP), intent(in) :: DENS_hyd(elem%Np,lmesh%NeA)
131 real(RP), intent(in) :: PRES_hyd(elem%Np,lmesh%NeA)
132 real(RP), intent(in) :: PRES_hyd_ref(elem%Np,lmesh%NeA)
133 real(RP), intent(in) :: THERM_hyd(elem%Np,lmesh%NeA)
134 real(RP), intent(in) :: CORIOLIS(elem2D%Np,lmesh2D%NeA)
135 real(RP), intent(in) :: Rtot(elem%Np,lmesh%NeA)
136 real(RP), intent(in) :: CVtot(elem%Np,lmesh%NeA)
137 real(RP), intent(in) :: CPtot(elem%Np,lmesh%NeA)
138 real(RP), intent(in) :: DPhydDx(elem%Np,lmesh%NeA)
139 real(RP), intent(in) :: DPhydDy(elem%Np,lmesh%NeA)
140
141 real(RP) :: Flux2D(elem%Nnode_h1D**2,5,2,lmesh%Ne)
142 real(RP) :: Flux2D_(elem%Nnode_h1D**2,2,elem%Nnode_v,lmesh%Ne)
143 real(RP) :: mflxX, mflxY, mflxZ
144 real(RP) :: FluxZ_store(elem%Nnode_h1D**2,5,elem%Nnode_v,lmesh%Ne)
145 real(RP) :: del_flux(elem%NfpTot,PRGVAR_NUM,lmesh%Ne)
146 real(RP) :: u_, v_, w_, pt_
147 real(RP) :: cor
148 real(RP) :: drho(elem%Np,lmesh%Ne)
149 real(RP) :: RDENS_, GsqrtH, GsqrtV, RGsqrtV, RGsqrt
150 real(RP) :: Gsqrt_, GsqrtDPRES_, E11, E22, E33
151
152 integer :: ke, ke2d
153 integer :: p, ph, pz
154 integer :: iv
155
156 integer :: IndexH2Dto3D(elem%Np)
157 integer :: EMap3Dto2D(lmesh%Ne)
158
159 type(ElementOperationGPUDriver) :: element3D_operation_driver
160 real(RP) :: tend_tmp(elem%Nnode_h1D**2,5,elem%Nnode_v,lmesh%Ne)
161
162 integer :: NeS, NeE, Nnode_h1D, Nnode_v
163 !------------------------------------------------------------------------
164
165 indexh2dto3d(:) = elem%IndexH2Dto3D(:)
166 call element3d_operation_driver%Init( element3d_operation )
167 nes = lmesh%NeS
168 nee = lmesh%NeE
169 nnode_h1d = elem%Nnode_h1D
170 nnode_v = elem%Nnode_v
171
172 !$acc data present(DDENS_,MOMX_,MOMY_,MOMZ_,DRHOT_,DPRES_, &
173 !$acc DENS_hyd,PRES_hyd,THERM_hyd, &
174 !$acc CORIOLIS,Rtot,CVtot,CPtot,DPhydDx,DPhydDy, &
175 !$acc DENS_dt,MOMX_dt,MOMY_dt,MOMZ_dt,RHOT_dt, lmesh,elem) &
176 !$acc create(del_flux,Flux2D,Flux2D_,FluxZ_store,tend_tmp,drho) copyin(IndexH2Dto3D)
177
178 call prof_rapstart('cal_dyn_tend_bndflux', 3)
179 call get_ebnd_flux( &
180 del_flux, & ! (out)
181 ddens_, momx_, momy_, momz_, drhot_, dpres_, dens_hyd, pres_hyd, therm_hyd, & ! (in)
182 rtot, cvtot, cptot, & ! (in)
183 lmesh%Gsqrt, lmesh%GI3(:,:,1), lmesh%GI3(:,:,2), & ! (in)
184 lmesh%normal_fn(:,:,1), lmesh%normal_fn(:,:,2), lmesh%normal_fn(:,:,3), & ! (in)
185 lmesh%vmapM, lmesh%vmapP, & ! (in)
186 lmesh, elem, lmesh2d, elem2d ) ! (in)
187 call prof_rapend('cal_dyn_tend_bndflux', 3)
188
189 call prof_rapstart('cal_dyn_tend_interior', 3)
190 !$acc parallel loop gang collapse(2) present(DDENS_,MOMX_,MOMY_,MOMZ_,DRHOT_,DPRES_,DENS_hyd,THERM_hyd,lmesh%Gsqrt,lmesh%GsqrtH,lmesh%Escale)
191 do ke = nes, nee
192 do pz=1, nnode_v
193 ke2d = lmesh%EMap3Dto2D(ke)
194
195 !$acc loop vector
196 do ph=1, nnode_h1d**2
197 p = ph + (pz-1) * nnode_h1d**2
198
199 gsqrt_ = lmesh%Gsqrt(p,ke)
200 gsqrtv = gsqrt_ / lmesh%GsqrtH(indexh2dto3d(p),ke2d)
201 rgsqrtv = 1.0_rp / gsqrtv
202 rgsqrt = 1.0_rp / gsqrt_
203
204 flux2d_(ph,1,pz,ke) = gsqrt_ * momx_(p,ke)
205 flux2d_(ph,2,pz,ke) = gsqrt_ * momy_(p,ke)
206 fluxz_store(ph,dens_vid,pz,ke) = gsqrt_ * ( &
207 momz_(p,ke) * rgsqrtv &
208 + lmesh%GI3(p,ke,1) * momx_(p,ke) &
209 + lmesh%GI3(p,ke,2) * momy_(p,ke) )
210 end do
211 call div_kplane( element3d_operation_driver, flux2d_(:,:,pz,ke), lmesh%Escale(:,ke,1,1), lmesh%Escale(:,ke,2,2), pz, &
212 tend_tmp(:,dens_vid,pz,ke) )
213
214 !$acc loop vector
215 do ph=1, nnode_h1d**2
216 p = ph + (pz-1) * nnode_h1d**2
217
218 gsqrt_ = lmesh%Gsqrt(p,ke)
219 rdens_ = 1.0_rp / (ddens_(p,ke) + dens_hyd(p,ke))
220 pt_ = ( therm_hyd(p,ke) + drhot_(p,ke) ) * rdens_
221
222 flux2d_(ph,1,pz,ke) = gsqrt_ * momx_(p,ke) * pt_
223 flux2d_(ph,2,pz,ke) = gsqrt_ * momy_(p,ke) * pt_
224 fluxz_store(ph,rhot_vid,pz,ke) = fluxz_store(ph,dens_vid,pz,ke) * pt_
225 end do
226 call div_kplane( element3d_operation_driver, flux2d_(:,:,pz,ke), lmesh%Escale(:,ke,1,1), lmesh%Escale(:,ke,2,2), pz, &
227 tend_tmp(:,rhot_vid,pz,ke) )
228
229 !$acc loop vector
230 do ph=1, nnode_h1d**2
231 p = ph + (pz-1) * nnode_h1d**2
232
233 gsqrt_ = lmesh%Gsqrt(p,ke)
234 gsqrth = lmesh%GsqrtH(indexh2dto3d(p),ke2d)
235 rdens_ = 1.0_rp / (ddens_(p,ke) + dens_hyd(p,ke))
236 w_ = momz_(p,ke) * rdens_
237
238 flux2d_(ph,1,pz,ke) = gsqrt_ * momx_(p,ke) * w_
239 flux2d_(ph,2,pz,ke) = gsqrt_ * momy_(p,ke) * w_
240 fluxz_store(ph,momz_vid,pz,ke) = fluxz_store(ph,dens_vid,pz,ke) * w_ + gsqrth * dpres_(p,ke)
241 end do
242 call div_kplane( element3d_operation_driver, flux2d_(:,:,pz,ke), lmesh%Escale(:,ke,1,1), lmesh%Escale(:,ke,2,2), pz, &
243 tend_tmp(:,momz_vid,pz,ke) )
244
245 !$acc loop vector
246 do ph=1, nnode_h1d**2
247 p = ph + (pz-1) * nnode_h1d**2
248
249 gsqrt_ = lmesh%Gsqrt(p,ke)
250 gsqrth = lmesh%GsqrtH(indexh2dto3d(p),ke2d)
251 rdens_ = 1.0_rp / (ddens_(p,ke) + dens_hyd(p,ke))
252
253 u_ = momx_(p,ke) * rdens_
254 gsqrtdpres_ = gsqrt_ * dpres_(p,ke)
255
256 flux2d_(ph,1,pz,ke) = gsqrt_ * momx_(p,ke) * u_ + gsqrtdpres_
257 flux2d_(ph,2,pz,ke) = gsqrt_ * momy_(p,ke) * u_
258 fluxz_store(ph,momx_vid,pz,ke) = fluxz_store(ph,dens_vid,pz,ke) * u_ + gsqrtdpres_ * lmesh%GI3(p,ke,1)
259 end do
260 call div_kplane( element3d_operation_driver, flux2d_(:,:,pz,ke), lmesh%Escale(:,ke,1,1), lmesh%Escale(:,ke,2,2), pz, &
261 tend_tmp(:,momx_vid,pz,ke) )
262
263
264 !$acc loop vector
265 do ph=1, nnode_h1d**2
266 p = ph + (pz-1) * nnode_h1d**2
267
268 gsqrt_ = lmesh%Gsqrt(p,ke)
269 gsqrth = lmesh%GsqrtH(indexh2dto3d(p),ke2d)
270 rdens_ = 1.0_rp / (ddens_(p,ke) + dens_hyd(p,ke))
271
272 v_ = momy_(p,ke) * rdens_
273 gsqrtdpres_ = gsqrt_ * dpres_(p,ke)
274
275 flux2d_(ph,1,pz,ke) = gsqrt_ * momx_(p,ke) * v_ + gsqrtdpres_
276 flux2d_(ph,2,pz,ke) = gsqrt_ * momy_(p,ke) * v_
277 fluxz_store(ph,momy_vid,pz,ke) = fluxz_store(ph,dens_vid,pz,ke) * v_ + gsqrtdpres_ * lmesh%GI3(p,ke,2)
278 end do
279 call div_kplane( element3d_operation_driver, flux2d_(:,:,pz,ke), lmesh%Escale(:,ke,1,1), lmesh%Escale(:,ke,2,2), pz, &
280 tend_tmp(:,momy_vid,pz,ke) )
281
282 ! !$acc loop vector
283 ! do ph=1, Nnode_h1D**2
284 ! p = ph + (pz-1) * Nnode_h1D**2
285
286 ! Gsqrt_ = lmesh%Gsqrt(p,ke)
287 ! GsqrtV = Gsqrt_ / lmesh%GsqrtH(IndexH2Dto3D(p),ke2d)
288 ! RGsqrtV = 1.0_RP / GsqrtV
289 ! RGsqrt = 1.0_RP / Gsqrt_
290 ! RDENS_ = 1.0_RP / (DDENS_(p,ke) + DENS_hyd(p,ke))
291
292 ! !-
293 ! mflxX = Gsqrt_ * MOMX_(p,ke)
294 ! mflxY = Gsqrt_ * MOMY_(p,ke)
295 ! mflxZ = Gsqrt_ * ( &
296 ! MOMZ_(p,ke) * RGsqrtV &
297 ! + lmesh%GI3(p,ke,1) * MOMX_(p,ke) &
298 ! + lmesh%GI3(p,ke,2) * MOMY_(p,ke) )
299
300 ! Flux2D(ph,DENS_VID,1,ke) = mflxX
301 ! Flux2D(ph,DENS_VID,2,ke) = mflxY
302 ! FluxZ_store(ph,DENS_VID,pz,ke) = mflxZ
303
304 ! !-
305 ! pt_ = ( THERM_hyd(p,ke) + DRHOT_(p,ke) ) * RDENS_
306
307 ! Flux2D(ph,RHOT_VID,1,ke) = mflxX * pt_
308 ! Flux2D(ph,RHOT_VID,2,ke) = mflxY * pt_
309 ! FluxZ_store(ph,RHOT_VID,pz,ke) = mflxZ * pt_
310
311 ! !-
312 ! GsqrtDPRES_ = Gsqrt_ * DPRES_(p,ke)
313 ! w_ = MOMZ_(p,ke) * RDENS_
314 ! Flux2D(ph,MOMZ_VID,1,ke) = mflxX * w_
315 ! Flux2D(ph,MOMZ_VID,2,ke) = mflxY * w_
316 ! FluxZ_store(ph,MOMZ_VID,pz,ke) = mflxZ * w_ + GsqrtDPRES_ * RGsqrtV
317
318 ! !-
319 ! u_ = MOMX_(p,ke) * RDENS_
320
321 ! Flux2D(ph,MOMX_VID,1,ke) = mflxX * u_ + GsqrtDPRES_
322 ! Flux2D(ph,MOMX_VID,2,ke) = mflxY * u_
323 ! FluxZ_store(ph,MOMX_VID,pz,ke) = mflxZ * u_ + GsqrtDPRES_ * lmesh%GI3(p,ke,1)
324
325 ! v_ = MOMY_(p,ke) * RDENS_
326 ! Flux2D(ph,MOMY_VID,1,ke) = mflxX * v_
327 ! Flux2D(ph,MOMY_VID,2,ke) = mflxY * v_ + GsqrtDPRES_
328 ! FluxZ_store(ph,MOMY_VID,pz,ke) = mflxZ * v_ + GsqrtDPRES_ * lmesh%GI3(p,ke,2)
329 ! end do
330 ! call DivVar5_kplane( element3D_operation_driver, &
331 ! Flux2D(:,:,:,ke), lmesh%Escale(:,ke,1,1), lmesh%Escale(:,ke,2,2), pz, &
332 ! tend_tmp(:,:,pz,ke) )
333 end do
334 end do
335 !$acc parallel loop gang
336 do ke = nes, nee
337 call divvar5_z_lift( element3d_operation_driver, &
338 fluxz_store(:,:,:,ke), del_flux(:,:,ke), lmesh%Escale(:,ke,3,3), lmesh%Gsqrt(:,ke), &
339 tend_tmp(:,:,:,ke) )
340 end do
341
342 call vfilterpm1( element3d_operation_driver, ddens_, lmesh%NeA, lmesh%Ne, &
343 drho )
344
345 !$acc parallel loop gang collapse(2)
346 do ke = nes, nee
347 !--
348 do pz=1, nnode_v
349 ke2d = lmesh%EMap3Dto2D(ke)
350
351 !$acc loop vector
352 do ph=1, nnode_h1d**2
353 p = ph + (pz-1) * nnode_h1d**2
354
355 dens_dt(p,ke) = - tend_tmp(ph,dens_vid,pz,ke)
356 rhot_dt(p,ke) = - tend_tmp(ph,rhot_vid,pz,ke)
357
358
359 momz_dt(p,ke) = - tend_tmp(ph,momz_vid,pz,ke) &
360 - grav * drho(p,ke)
361
362 cor = coriolis(ph,ke2d)
363 momx_dt(p,ke) = - tend_tmp(ph,momx_vid,pz,ke) &
364 - dphyddx(p,ke) &
365 + cor * momy_(p,ke)
366 momy_dt(p,ke) = - tend_tmp(ph,momy_vid,pz,ke) &
367 - dphyddy(p,ke) &
368 - cor * momx_(p,ke)
369 end do
370 end do
371 end do
372 call prof_rapend('cal_dyn_tend_interior', 3)
373 !$acc end data
374
375 call element3d_operation_driver%Final()
376 return
module FElib / Fluid dyn solver / Atmosphere / Nonhydrostatic model / HEVE / Numflux
subroutine, public atm_dyn_dgm_nonhydro3d_rhot_heve_numflux_get_generalvc_gpu(del_flux, ddens_, momx_, momy_, momz_, drhot_, dpres, dens_hyd, pres_hyd, therm_hyd, rtot, cvtot, cptot, gsqrt, g13, g23, nx, ny, nz, vmapm, vmapp, lmesh, elem, lmesh2d, elem2d)
module FElib / Element / Driver for operation with 3D tensor product elements using GPU
subroutine, public elementoperationgpu_divvar5_z_lift(this, fluxz, ebnd_flux, e33, gsqrt, div3d)
subroutine, public elementoperationgpu_div_kplane(this, flux2d_kplane, e11, e22, k, div_xy)
subroutine, public elementoperationgpu_divvar5_kplane(this, flux2d_kplane, e11, e22, k, div_xy)
subroutine, public elementoperationgpu_vfilterpm1(this, vec_in, ne_in, ne_out, vec_out)
Driver for element operation with 3D tensor product elements using GPU.

References scale_atm_dyn_dgm_nonhydro3d_rhot_heve_numflux_gpu::atm_dyn_dgm_nonhydro3d_rhot_heve_numflux_get_generalvc_gpu(), scale_element_operation_gpu_driver::elementoperationgpu_div_kplane(), scale_element_operation_gpu_driver::elementoperationgpu_divvar5_kplane(), scale_element_operation_gpu_driver::elementoperationgpu_divvar5_z_lift(), and scale_element_operation_gpu_driver::elementoperationgpu_vfilterpm1().

◆ atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_gpu2()

subroutine, public scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu::atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_gpu2 ( real(rp), dimension(elem%np,lmesh%nea), intent(out) dens_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) momx_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) momy_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) momz_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(out) rhot_dt,
real(rp), dimension(elem%np,lmesh%nea), intent(in) ddens_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) momx_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) momy_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) momz_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) drhot_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dpres_,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dens_hyd,
real(rp), dimension(elem%np,lmesh%nea), intent(in) pres_hyd,
real(rp), dimension(elem%np,lmesh%nea), intent(in) pres_hyd_ref,
real(rp), dimension(elem%np,lmesh%nea), intent(in) therm_hyd,
real(rp), dimension(elem2d%np,lmesh2d%nea), intent(in) coriolis,
real(rp), dimension(elem%np,lmesh%nea), intent(in) rtot,
real(rp), dimension(elem%np,lmesh%nea), intent(in) cvtot,
real(rp), dimension(elem%np,lmesh%nea), intent(in) cptot,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dphyddx,
real(rp), dimension(elem%np,lmesh%nea), intent(in) dphyddy,
class(elementoperationbase3d), intent(in) element3d_operation,
type(sparsemat), intent(in) dx,
type(sparsemat), intent(in) dy,
type(sparsemat), intent(in) dz,
type(sparsemat), intent(in) sx,
type(sparsemat), intent(in) sy,
type(sparsemat), intent(in) sz,
type(sparsemat), intent(in) lift,
class(localmesh3d), intent(in) lmesh,
class(elementbase3d), intent(in) elem,
class(localmesh2d), intent(in) lmesh2d,
class(elementbase2d), intent(in) elem2d )

Definition at line 380 of file scale_atm_dyn_dgm_nonhydro3d_rhot_heve_gpu.F90.

387
392 implicit none
393
394 class(LocalMesh3D), intent(in) :: lmesh
395 class(ElementBase3D), intent(in) :: elem
396 class(LocalMesh2D), intent(in) :: lmesh2D
397 class(ElementBase2D), intent(in) :: elem2D
398 class(ElementOperationBase3D), intent(in) :: element3D_operation
399 type(SparseMat), intent(in) :: Dx, Dy, Dz, Sx, Sy, Sz, Lift
400 real(RP), intent(out) :: DENS_dt(elem%Np,lmesh%NeA)
401 real(RP), intent(out) :: MOMX_dt(elem%Np,lmesh%NeA)
402 real(RP), intent(out) :: MOMY_dt(elem%Np,lmesh%NeA)
403 real(RP), intent(out) :: MOMZ_dt(elem%Np,lmesh%NeA)
404 real(RP), intent(out) :: RHOT_dt(elem%Np,lmesh%NeA)
405 real(RP), intent(in) :: DDENS_(elem%Np,lmesh%NeA)
406 real(RP), intent(in) :: MOMX_(elem%Np,lmesh%NeA)
407 real(RP), intent(in) :: MOMY_(elem%Np,lmesh%NeA)
408 real(RP), intent(in) :: MOMZ_(elem%Np,lmesh%NeA)
409 real(RP), intent(in) :: DRHOT_(elem%Np,lmesh%NeA)
410 real(RP), intent(in) :: DPRES_(elem%Np,lmesh%NeA)
411 real(RP), intent(in) :: DENS_hyd(elem%Np,lmesh%NeA)
412 real(RP), intent(in) :: PRES_hyd(elem%Np,lmesh%NeA)
413 real(RP), intent(in) :: PRES_hyd_ref(elem%Np,lmesh%NeA)
414 real(RP), intent(in) :: THERM_hyd(elem%Np,lmesh%NeA)
415 real(RP), intent(in) :: CORIOLIS(elem2D%Np,lmesh2D%NeA)
416 real(RP), intent(in) :: Rtot(elem%Np,lmesh%NeA)
417 real(RP), intent(in) :: CVtot(elem%Np,lmesh%NeA)
418 real(RP), intent(in) :: CPtot(elem%Np,lmesh%NeA)
419 real(RP), intent(in) :: DPhydDx(elem%Np,lmesh%NeA)
420 real(RP), intent(in) :: DPhydDy(elem%Np,lmesh%NeA)
421
422 type(ElementOperationGPUDriver) :: element3D_operation_driver
423 real(RP) :: tend_tmp(elem%Nnode_h1D**2,5,elem%Nnode_v,lmesh%Ne)
424 real(RP) :: Flux2D(elem%Nnode_h1D**2,5,elem%Nnode_v,lmesh%Ne,2)
425 real(RP) :: FluxZ_store(elem%Nnode_h1D**2,5,elem%Nnode_v,lmesh%Ne)
426 real(RP) :: del_flux(elem%NfpTot,PRGVAR_NUM,lmesh%Ne)
427 real(RP) :: drho(elem%Np,lmesh%Ne)
428
429 integer :: IndexH2Dto3D(elem%Np)
430
431 integer :: NeS, NeE, Nnode_h1D, Nnode_v
432 !------------------------------------------------------------------------
433
434 indexh2dto3d(:) = elem%IndexH2Dto3D(:)
435 call element3d_operation_driver%Init( element3d_operation )
436 nes = lmesh%NeS
437 nee = lmesh%NeE
438 nnode_h1d = elem%Nnode_h1D
439 nnode_v = elem%Nnode_v
440
441 !$acc data present(DDENS_,MOMX_,MOMY_,MOMZ_,DRHOT_,DPRES_, &
442 !$acc DENS_hyd,PRES_hyd,THERM_hyd, &
443 !$acc CORIOLIS,Rtot,CVtot,CPtot,DPhydDx,DPhydDy, &
444 !$acc DENS_dt,MOMX_dt,MOMY_dt,MOMZ_dt,RHOT_dt, lmesh,elem) &
445 !$acc create(del_flux,Flux2D,FluxZ_store,tend_tmp,drho) copyin(IndexH2Dto3D)
446
447 call prof_rapstart('cal_dyn_tend_bndflux', 3)
448 call get_ebnd_flux( &
449 del_flux, & ! (out)
450 ddens_, momx_, momy_, momz_, drhot_, dpres_, dens_hyd, pres_hyd, therm_hyd, & ! (in)
451 rtot, cvtot, cptot, & ! (in)
452 lmesh%Gsqrt, lmesh%GI3(:,:,1), lmesh%GI3(:,:,2), & ! (in)
453 lmesh%normal_fn(:,:,1), lmesh%normal_fn(:,:,2), lmesh%normal_fn(:,:,3), & ! (in)
454 lmesh%vmapM, lmesh%vmapP, & ! (in)
455 lmesh, elem, lmesh2d, elem2d )
456 !$acc wait(1) ! (in)
457 call prof_rapend('cal_dyn_tend_bndflux', 3)
458
459 call prof_rapstart('cal_dyn_tend_interior', 3)
460 call atm_dyn_dgm_nonhydro3d_rhot_heve_cal_tend_interior_gpu( &
461 dens_dt, momx_dt, momy_dt, momz_dt, rhot_dt, & ! (out)
462 ddens_, momx_, momy_, momz_, drhot_, dpres_, del_flux, & ! (in)
463 dens_hyd, therm_hyd, coriolis, dphyddx, dphyddy, & ! (in)
464 lmesh%Gsqrt,lmesh%GsqrtH,lmesh%GI3(:,:,1),lmesh%GI3(:,:,2), &
465 lmesh%Escale(:,:,1,1), lmesh%Escale(:,:,2,2), lmesh%Escale(:,:,3,3), & ! (in)
466 flux2d, fluxz_store, tend_tmp, drho, & ! (in)
467 element3d_operation_driver, & ! (in)
468 lmesh%EMap3Dto2D, lmesh,elem, lmesh%NeS, lmesh%NeE, lmesh%NeA, lmesh%Ne2DA, elem%Nnode_h1D, elem%Nnode_v ) ! (in)
469 !$acc wait(1)
470 call prof_rapend('cal_dyn_tend_interior', 3)
471 !$acc end data
472
473 call element3d_operation_driver%Final()
474 return

References scale_atm_dyn_dgm_nonhydro3d_rhot_heve_numflux_gpu::atm_dyn_dgm_nonhydro3d_rhot_heve_numflux_get_generalvc_gpu(), scale_element_operation_gpu_driver::elementoperationgpu_div_kplane(), scale_element_operation_gpu_driver::elementoperationgpu_divvar5(), scale_element_operation_gpu_driver::elementoperationgpu_divvar5_kplane2(), scale_element_operation_gpu_driver::elementoperationgpu_divvar5_z_lift(), and scale_element_operation_gpu_driver::elementoperationgpu_vfilterpm1().