10#include "scaleFElib.h"
20 use scale_const,
only: &
23 cpdry => const_cpdry, &
24 cvdry => const_cvdry, &
59 integer,
allocatable:: velbc_ids(:)
60 integer,
allocatable :: thermalbc_ids(:)
61 real(rp),
allocatable :: thermal_fixval(:)
63 procedure :: init => atmos_dyn_bnd_setup
64 procedure :: final => atmos_dyn_bnd_finalize
65 procedure :: setbcinfo => atmos_dyn_bnd_setbcinfo
66 procedure :: applybc_progvars_lc => atmos_dyn_bnd_applybc_prgvars_lc
67 procedure :: applybc_numdiff_odd_lc => atmos_dyn_bnd_applybc_numdiff_odd_lc
68 procedure :: applybc_numdiff_even_lc => atmos_dyn_bnd_applybc_numdiff_even_lc
69 procedure :: applybc_grad_tbvars_lc => atmos_dyn_bnd_applybc_tbvars_lc
70 procedure :: applybc_grad_tbstress_lc => atmos_dyn_bnd_applybc_tbstress_lc
71 procedure :: inquire_bound_flag => atmos_dyn_bnd_inquire_bound_flag
82 integer,
parameter :: dombnd_east_id = 2
83 integer,
parameter :: dombnd_north_id = 3
84 integer,
parameter :: dombnd_west_id = 4
85 integer,
parameter :: dombnd_btm_id = 5
86 integer,
parameter :: dombnd_top_id = 6
87 integer,
parameter :: dom_bnd_num = 6
92 subroutine atmos_dyn_bnd_setup( this )
93 use scale_const,
only: &
94 undef8 => const_undef8
103 character(len=H_SHORT) :: btm_vel_bc, top_vel_bc
104 character(len=H_SHORT) :: north_vel_bc, south_vel_bc
105 character(len=H_SHORT) :: east_vel_bc, west_vel_bc
106 character(len=H_SHORT) :: btm_thermal_bc, top_thermal_bc
107 character(len=H_SHORT) :: north_thermal_bc, south_thermal_bc
108 character(len=H_SHORT) :: east_thermal_bc, west_thermal_bc
110 real(rp) :: btm_thermal_fixval, top_thermal_fixval
111 real(rp) :: north_thermal_fixval, south_thermal_fixval
112 real(rp) :: east_thermal_fixval, west_thermal_fixval
114 namelist /param_atmos_dyn_bnd/ &
115 btm_vel_bc, top_vel_bc, north_vel_bc, south_vel_bc, east_vel_bc, west_vel_bc, &
116 btm_thermal_bc, top_thermal_bc, north_thermal_bc, south_thermal_bc, east_thermal_bc, west_thermal_bc, &
117 btm_thermal_fixval, top_thermal_fixval, north_thermal_fixval, south_thermal_fixval, east_thermal_fixval, west_thermal_fixval
136 btm_thermal_fixval = undef8
137 top_thermal_fixval = undef8
138 north_thermal_fixval = undef8
139 south_thermal_fixval = undef8
140 east_thermal_fixval = undef8
141 west_thermal_fixval = undef8
144 read(io_fid_conf,nml=param_atmos_dyn_bnd,iostat=ierr)
146 log_info(
"ATMOS_dyn_bnd_setup",*)
'Not found namelist. Default used.'
147 elseif( ierr > 0 )
then
148 log_error(
"ATMOS_dyn_bnd_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_DYN_BND. Check!'
151 log_nml(param_atmos_dyn_bnd)
154 allocate( this%velBC_ids(dom_bnd_num) )
162 allocate( this%thermalBC_ids(dom_bnd_num) )
170 allocate( this%thermal_fixval(dom_bnd_num) )
171 this%thermal_fixval(dombnd_btm_id) = btm_thermal_fixval
172 this%thermal_fixval(dombnd_top_id) = top_thermal_fixval
173 this%thermal_fixval(dombnd_north_id) = north_thermal_fixval
175 this%thermal_fixval(dombnd_east_id) = east_thermal_fixval
176 this%thermal_fixval(dombnd_west_id) = west_thermal_fixval
181 end subroutine atmos_dyn_bnd_setup
184 subroutine atmos_dyn_bnd_finalize( this )
191 if (
allocated(this%VelBC_list) )
then
192 do n=1,
size(this%VelBC_list)
193 call this%VelBC_list(n)%Final()
194 call this%ThermalBC_list(n)%Final()
196 deallocate( this%VelBC_list, this%ThermalBC_list )
198 deallocate( this%velBC_ids, this%thermalBC_ids )
202 end subroutine atmos_dyn_bnd_finalize
205 subroutine atmos_dyn_bnd_setbcinfo( this, mesh )
210 class(
meshbase),
target,
intent(in) :: mesh
219 allocate( this%VelBC_list(mesh%LOCAL_MESH_NUM) )
220 allocate( this%ThermalBC_list(mesh%LOCAL_MESH_NUM) )
224 do n=1, mesh%LOCAL_MESH_NUM
225 call mesh%GetLocalMesh( n, ptr_lcmesh )
226 select type (ptr_lcmesh)
228 lcmesh3d => ptr_lcmesh
232 this%VelBC_list(n), this%ThermalBC_list(n), &
233 this%velBC_ids(:), this%thermalBC_ids(:), &
234 this%thermal_fixval(:), &
235 lcmesh3d%VMapB, mesh, lcmesh3d, lcmesh3d%refElem3D )
239 end subroutine atmos_dyn_bnd_setbcinfo
244 subroutine atmos_dyn_bnd_applybc_prgvars_lc( this, &
246 ddens, momx, momy, momz, therm, &
247 dens_hyd, pres_hyd, &
248 gsqrt, gsqrth, g11, g12, g22, g13, g23, nx, ny, nz, &
249 vmapm, vmapp, vmapb, lmesh, elem, lmesh2d, elem2d )
258 integer,
intent(in) :: domid
263 real(rp),
intent(inout) :: ddens(elem%np*lmesh%nea)
264 real(rp),
intent(inout) :: momx(elem%np*lmesh%nea)
265 real(rp),
intent(inout) :: momy(elem%np*lmesh%nea)
266 real(rp),
intent(inout) :: momz(elem%np*lmesh%nea)
267 real(rp),
intent(inout) :: therm(elem%np*lmesh%nea)
268 real(rp),
intent(in) :: dens_hyd(elem%np*lmesh%nea)
269 real(rp),
intent(in) :: pres_hyd(elem%np*lmesh%nea)
270 real(rp),
intent(in) :: gsqrt(elem%np*lmesh%nea)
271 real(rp),
intent(in) :: gsqrth(elem2d%np,lmesh2d%ne)
272 real(rp),
intent(in) :: g11(elem2d%np,lmesh2d%ne)
273 real(rp),
intent(in) :: g12(elem2d%np,lmesh2d%ne)
274 real(rp),
intent(in) :: g22(elem2d%np,lmesh2d%ne)
275 real(rp),
intent(in) :: g13(elem%np*lmesh%nea)
276 real(rp),
intent(in) :: g23(elem%np*lmesh%nea)
277 real(rp),
intent(in) :: nx(elem%nfptot*lmesh%ne)
278 real(rp),
intent(in) :: ny(elem%nfptot*lmesh%ne)
279 real(rp),
intent(in) :: nz(elem%nfptot*lmesh%ne)
280 integer,
intent(in) :: vmapm(elem%nfptot*lmesh%ne)
281 integer,
intent(in) :: vmapp(elem%nfptot*lmesh%ne)
282 integer,
intent(in) :: vmapb(:)
284 integer :: p, ke, ke2d
285 integer :: i, i_, im, ip
286 real(rp) :: mom_normal
289 real(rp) :: gsqrtv, g11_, g12_, g22_
296 do ke=lmesh%NeS, lmesh%NeE
298 i = p + (ke-1)*elem%NfpTot
300 i_ = ip - elem%Np*lmesh%NeE
305 select case( this%VelBC_list(domid)%list(i_) )
307 ke2d = lmesh%EMap3Dto2D(ke)
309 gsqrtv = gsqrt(im) / gsqrth(elem%IndexH2Dto3D_bnd(p),ke2d)
310 g11_ = g11(elem%IndexH2Dto3D_bnd(p),ke2d)
311 g12_ = g12(elem%IndexH2Dto3D_bnd(p),ke2d)
312 g22_ = g22(elem%IndexH2Dto3D_bnd(p),ke2d)
314 momw = momz(im) / gsqrtv &
315 + g13(im) * momx(im) + g23(im) * momy(im)
316 fac = nz(i) * gsqrtv**2 / ( 1.0_rp + g11_ * ( gsqrtv * g13(im) )**2 + 2.0_rp * g12_ * ( gsqrtv**2 * g13(im) * g23(im) ) + g22_ * ( gsqrtv * g23(im) )**2 )
318 mom_normal = momx(im) * nx(i) + momy(im) * ny(i) + momw * nz(i)
319 momx(ip) = momx(im) - 2.0_rp * mom_normal * ( nx(i) + fac * ( g11_ * g13(im) + g12_ * g23(im) ) )
320 momy(ip) = momy(im) - 2.0_rp * mom_normal * ( ny(i) + fac * ( g12_ * g13(im) + g22_ * g23(im) ) )
321 momz(ip) = momz(im) - 2.0_rp * mom_normal * fac / gsqrtv
324 momx(ip) = - momx(im)
325 momy(ip) = - momy(im)
326 momz(ip) = - momz(im)
334 end subroutine atmos_dyn_bnd_applybc_prgvars_lc
337 subroutine atmos_dyn_bnd_applybc_numdiff_odd_lc( this, & ! (in)
338 gxvar, gyvar, gzvar, &
341 nx, ny, nz, vmapm, vmapp, vmapb, lmesh, elem )
352 real(rp),
intent(inout) :: gxvar(elem%np*lmesh%nea)
353 real(rp),
intent(inout) :: gyvar(elem%np*lmesh%nea)
354 real(rp),
intent(inout) :: gzvar(elem%np*lmesh%nea)
355 logical,
intent(out) :: is_bound(elem%nfptot*lmesh%ne)
356 integer,
intent(in) :: varid
357 integer,
intent(in) :: domid
358 real(rp),
intent(in) :: nx(elem%nfptot*lmesh%ne)
359 real(rp),
intent(in) :: ny(elem%nfptot*lmesh%ne)
360 real(rp),
intent(in) :: nz(elem%nfptot*lmesh%ne)
361 integer,
intent(in) :: vmapm(elem%nfptot*lmesh%ne)
362 integer,
intent(in) :: vmapp(elem%nfptot*lmesh%ne)
363 integer,
intent(in) :: vmapb(:)
365 integer :: i, i_, im, ip
366 real(rp) :: grad_normal
369 do i=1, elem%NfpTot*lmesh%Ne
371 i_ = ip - elem%Np*lmesh%NeE
372 is_bound(i) = .false.
376 grad_normal = gxvar(im) * nx(i) + gyvar(im) * ny(i) + gzvar(im) * nz(i)
381 gyvar(ip) = gyvar(im) - 2.0_rp * grad_normal * ny(i)
382 gzvar(ip) = gzvar(im) - 2.0_rp * grad_normal * nz(i)
384 gxvar(ip) = gxvar(im) - 2.0_rp * grad_normal * nx(i)
385 gzvar(ip) = gzvar(im) - 2.0_rp * grad_normal * nz(i)
387 gxvar(ip) = gxvar(im) - 2.0_rp * grad_normal * nx(i)
388 gyvar(ip) = gyvar(im) - 2.0_rp * grad_normal * ny(i)
395 case(dens_vid, rhot_vid)
396 gxvar(ip) = gxvar(im) - 2.0_rp * grad_normal * nx(i)
397 gyvar(ip) = gyvar(im) - 2.0_rp * grad_normal * ny(i)
398 gzvar(ip) = gzvar(im) - 2.0_rp * grad_normal * nz(i)
409 end subroutine atmos_dyn_bnd_applybc_numdiff_odd_lc
412 subroutine atmos_dyn_bnd_applybc_numdiff_even_lc( this, & ! (in)
416 nx, ny, nz, vmapm, vmapp, vmapb, lmesh, elem )
426 real(rp),
intent(inout) :: var(elem%np*lmesh%nea)
427 logical,
intent(out) :: is_bound(elem%nfptot*lmesh%ne)
428 integer,
intent(in) :: varid
429 integer,
intent(in) :: domid
430 real(rp),
intent(in) :: nx(elem%nfptot*lmesh%ne)
431 real(rp),
intent(in) :: ny(elem%nfptot*lmesh%ne)
432 real(rp),
intent(in) :: nz(elem%nfptot*lmesh%ne)
433 integer,
intent(in) :: vmapm(elem%nfptot*lmesh%ne)
434 integer,
intent(in) :: vmapp(elem%nfptot*lmesh%ne)
435 integer,
intent(in) :: vmapb(:)
437 integer :: i, i_, im, ip
438 real(rp) :: grad_normal
441 do i=1, elem%NfpTot*lmesh%Ne
443 i_ = ip - elem%Np*lmesh%NeE
444 is_bound(i) = .false.
452 grad_normal = var(im) * nx(i)
453 var(ip) = var(im) - 2.0_rp * grad_normal * nx(i)
455 grad_normal = var(im) * ny(i)
456 var(ip) = var(im) - 2.0_rp * grad_normal * ny(i)
458 grad_normal = var(im) * nz(i)
459 var(ip) = var(im) - 2.0_rp * grad_normal * nz(i)
465 case( momx_vid, momy_vid, momz_vid )
475 end subroutine atmos_dyn_bnd_applybc_numdiff_even_lc
481 subroutine atmos_dyn_bnd_applybc_tbvars_lc( this, &
483 ddens, momx, momy, momz, pt, pres, &
484 dens_hyd, pres_hyd, rtot, cptot, &
485 gsqrt, gsqrth, g11, g12, g22, g13, g23, nx, ny, nz, &
486 vmapm, vmapp, vmapb, lmesh, elem, lmesh2d, elem2d )
488 use scale_const,
only: &
489 pres00 => const_pre00
497 integer,
intent(in) :: domid
502 real(rp),
intent(inout) :: ddens(elem%np*lmesh%nea)
503 real(rp),
intent(inout) :: momx(elem%np*lmesh%nea)
504 real(rp),
intent(inout) :: momy(elem%np*lmesh%nea)
505 real(rp),
intent(inout) :: momz(elem%np*lmesh%nea)
506 real(rp),
intent(inout) :: pt(elem%np*lmesh%nea)
507 real(rp),
intent(inout) :: pres(elem%np*lmesh%nea)
508 real(rp),
intent(in) :: dens_hyd(elem%np*lmesh%nea)
509 real(rp),
intent(in) :: pres_hyd(elem%np*lmesh%nea)
510 real(rp),
intent(in) :: rtot(elem%np*lmesh%nea)
511 real(rp),
intent(in) :: cptot(elem%np*lmesh%nea)
512 real(rp),
intent(in) :: gsqrt(elem%np*lmesh%nea)
513 real(rp),
intent(in) :: gsqrth(elem2d%np,lmesh2d%ne)
514 real(rp),
intent(in) :: g11(elem2d%np,lmesh2d%ne)
515 real(rp),
intent(in) :: g12(elem2d%np,lmesh2d%ne)
516 real(rp),
intent(in) :: g22(elem2d%np,lmesh2d%ne)
517 real(rp),
intent(in) :: g13(elem%np*lmesh%nea)
518 real(rp),
intent(in) :: g23(elem%np*lmesh%nea)
519 real(rp),
intent(in) :: nx(elem%nfptot*lmesh%ne)
520 real(rp),
intent(in) :: ny(elem%nfptot*lmesh%ne)
521 real(rp),
intent(in) :: nz(elem%nfptot*lmesh%ne)
522 integer,
intent(in) :: vmapm(elem%nfptot*lmesh%ne)
523 integer,
intent(in) :: vmapp(elem%nfptot*lmesh%ne)
524 integer,
intent(in) :: vmapb(:)
526 integer :: p, ke, ke2d
527 integer :: i, i_, im, ip
528 real(rp) :: mom_normal
531 real(rp) :: temp_p, temp_b
532 real(rp) :: gsqrtv, g11_, g12_, g22_
540 do ke=lmesh%NeS, lmesh%NeE
542 i = p + (ke-1)*elem%NfpTot
544 i_ = ip - elem%Np*lmesh%NeE
549 select case( this%VelBC_list(domid)%list(i_) )
551 ke2d = lmesh%EMap3Dto2D(ke)
553 gsqrtv = gsqrt(im) / gsqrth(elem%IndexH2Dto3D_bnd(p),ke2d)
554 g11_ = g11(elem%IndexH2Dto3D_bnd(p),ke2d)
555 g12_ = g12(elem%IndexH2Dto3D_bnd(p),ke2d)
556 g22_ = g22(elem%IndexH2Dto3D_bnd(p),ke2d)
558 momw = momz(im) / gsqrtv &
559 + g13(im) * momx(im) + g23(im) * momy(im)
560 fac = nz(i) * gsqrtv**2 / ( 1.0_rp + g11_ * ( gsqrtv * g13(im) )**2 + 2.0_rp * g12_ * ( gsqrtv**2 * g13(im) * g23(im) ) + g22_ * ( gsqrtv * g23(im) )**2 )
562 mom_normal = momx(im) * nx(i) + momy(im) * ny(i) + momw * nz(i)
563 momx(ip) = momx(im) - 2.0_rp * mom_normal * ( nx(i) + fac * ( g11_ * g13(im) + g12_ * g23(im) ) )
564 momy(ip) = momy(im) - 2.0_rp * mom_normal * ( ny(i) + fac * ( g12_ * g13(im) + g22_ * g23(im) ) )
565 momz(ip) = momz(im) - 2.0_rp * mom_normal * fac / gsqrtv
568 momx(ip) = - momx(im)
569 momy(ip) = - momy(im)
570 momz(ip) = - momz(im)
573 select case( this%ThermalBC_list(domid)%list(i_) )
575 temp_b = this%ThermalBC_list(domid)%val(i_)
576 temp_p = 2.0_rp * temp_b - pres(im) / ( ( dens_hyd(im) + ddens(im) ) * rtot(im) )
577 pt(ip) = temp_p * ( pres00 / pres(im) )**(rtot(im)/cptot(im))
578 ddens(ip) = pres(im) / ( rtot(im) * temp_p ) - dens_hyd(im)
586 end subroutine atmos_dyn_bnd_applybc_tbvars_lc
593 subroutine atmos_dyn_bnd_applybc_tbstress_lc( this, &
595 t11, t12, t13, t21, t22, t23, t31, t32, t33, &
597 gsqrt, gsqrth, g11, g12, g22, g13, g23, nx, ny, nz, &
598 vmapm, vmapp, vmapb, lmesh, elem, lmesh2d, elem2d )
607 integer,
intent(in) :: domid
612 real(rp),
intent(inout) :: t11(elem%np*lmesh%nea), t12(elem%np*lmesh%nea), t13(elem%np*lmesh%nea)
613 real(rp),
intent(inout) :: t21(elem%np*lmesh%nea), t22(elem%np*lmesh%nea), t23(elem%np*lmesh%nea)
614 real(rp),
intent(inout) :: t31(elem%np*lmesh%nea), t32(elem%np*lmesh%nea), t33(elem%np*lmesh%nea)
615 real(rp),
intent(inout) :: df1(elem%np*lmesh%nea), df2(elem%np*lmesh%nea), df3(elem%np*lmesh%nea)
616 real(rp),
intent(in) :: gsqrt(elem%np*lmesh%nea)
617 real(rp),
intent(in) :: gsqrth(elem2d%np,lmesh2d%ne)
618 real(rp),
intent(in) :: g11(elem2d%np,lmesh2d%ne)
619 real(rp),
intent(in) :: g12(elem2d%np,lmesh2d%ne)
620 real(rp),
intent(in) :: g22(elem2d%np,lmesh2d%ne)
621 real(rp),
intent(in) :: g13(elem%np*lmesh%nea)
622 real(rp),
intent(in) :: g23(elem%np*lmesh%nea)
623 real(rp),
intent(in) :: nx(elem%nfptot*lmesh%ne)
624 real(rp),
intent(in) :: ny(elem%nfptot*lmesh%ne)
625 real(rp),
intent(in) :: nz(elem%nfptot*lmesh%ne)
626 integer,
intent(in) :: vmapm(elem%nfptot*lmesh%ne)
627 integer,
intent(in) :: vmapp(elem%nfptot*lmesh%ne)
628 integer,
intent(in) :: vmapb(:)
630 integer :: p, ke, ke2d
631 integer :: i, i_, im, ip
633 real(rp) :: gsqrtv, g11_, g12_, g22_
634 real(rp) :: fac, normal_vec(3)
636 real(rp) :: stress_t_tmp, stress_t_tmpvec(3)
638 real(rp) :: normal_flux
645 do ke=lmesh%NeS, lmesh%NeE
647 i = p + (ke-1)*elem%NfpTot
649 i_ = ip - elem%Np*lmesh%NeE
652 ke2d = lmesh%EMap3Dto2D(ke)
655 gsqrtv = gsqrt(im) / gsqrth(elem%IndexH2Dto3D_bnd(p),ke2d)
656 g11_ = g11(elem%IndexH2Dto3D_bnd(p),ke2d)
657 g12_ = g12(elem%IndexH2Dto3D_bnd(p),ke2d)
658 g22_ = g22(elem%IndexH2Dto3D_bnd(p),ke2d)
659 fac = nz(i) * gsqrtv**2 / ( 1.0_rp + g11_ * ( gsqrtv * g13(im) )**2 + 2.0_rp * g12_ * ( gsqrtv**2 * g13(im) * g23(im) ) + g22_ * ( gsqrtv * g23(im) )**2 )
660 normal_vec(1) = nx(i) + fac * ( g11_ * g13(im) + g12_ * g23(im) )
661 normal_vec(2) = ny(i) + fac * ( g12_ * g13(im) + g22_ * g23(im) )
662 normal_vec(3) = fac / gsqrtv
664 select case( this%VelBC_list(domid)%list(i_) )
666 vecw = t13(im) / gsqrtv + g13(im) * t11(im) + g23(im) * t12(im)
667 stress_t_tmpvec(1) = t11(im) * nx(i) + t12(im) * ny(i) + vecw * nz(i)
669 vecw = t23(im) / gsqrtv + g13(im) * t21(im) + g23(im) * t22(im)
670 stress_t_tmpvec(2) = t21(im) * nx(i) + t22(im) * ny(i) + vecw * nz(i)
672 vecw = t33(im) / gsqrtv
673 stress_t_tmpvec(3) = t31(im) * nx(i) + t32(im) * ny(i) + vecw * nz(i)
675 stress_t_tmp = sum( stress_t_tmpvec(:) * normal_vec(:) )
676 stress_t_tmpvec(:) = stress_t_tmpvec(:) - stress_t_tmp * normal_vec(:)
679 t11(ip) = t11(im) - 2.0_rp * stress_t_tmpvec(1) * normal_vec(1)
680 t12(ip) = t12(im) - 2.0_rp * stress_t_tmpvec(1) * normal_vec(2)
681 t13(ip) = t13(im) - 2.0_rp * stress_t_tmpvec(1) * normal_vec(3)
684 t21(ip) = t21(im) - 2.0_rp * stress_t_tmpvec(2) * normal_vec(1)
685 t22(ip) = t22(im) - 2.0_rp * stress_t_tmpvec(2) * normal_vec(2)
686 t23(ip) = t23(im) - 2.0_rp * stress_t_tmpvec(2) * normal_vec(3)
689 t31(ip) = t31(im) - 2.0_rp * stress_t_tmpvec(3) * normal_vec(1)
690 t32(ip) = t32(im) - 2.0_rp * stress_t_tmpvec(3) * normal_vec(2)
691 t33(ip) = t33(im) - 2.0_rp * stress_t_tmpvec(3) * normal_vec(3)
696 select case( this%ThermalBC_list(domid)%list(i_) )
698 normal_flux = df1(im) * nx(i) + df2(im) * ny(i) &
699 + ( df3(im) / gsqrtv + g13(im) * df1(im) + g23(im) * df2(im) ) * nz(i)
700 df1(ip) = df1(im) - 2.0_rp * normal_flux * normal_vec(1)
701 df2(ip) = df2(im) - 2.0_rp * normal_flux * normal_vec(2)
702 df3(ip) = df3(im) - 2.0_rp * normal_flux * normal_vec(3)
709 end subroutine atmos_dyn_bnd_applybc_tbstress_lc
712 subroutine atmos_dyn_bnd_inquire_bound_flag( this, & ! (in)
714 domid, vmapm, vmapp, vmapb, lmesh, elem )
724 logical,
intent(out) :: is_bound(elem%nfptot*lmesh%ne)
725 integer,
intent(in) :: domid
726 integer,
intent(in) :: vmapm(elem%nfptot*lmesh%ne)
727 integer,
intent(in) :: vmapp(elem%nfptot*lmesh%ne)
728 integer,
intent(in) :: vmapb(:)
730 integer :: i, i_, im, ip
733 do i=1, elem%NfpTot*lmesh%Ne
735 i_ = ip - elem%Np*lmesh%NeE
736 is_bound(i) = .false.
750 end subroutine atmos_dyn_bnd_inquire_bound_flag
755 subroutine bnd_init_lc( &
756 velBCInfo, thermalBCInfo, & ! (inout)
757 velbc_ids, thermalbc_ids, &
759 vmapb, mesh, lmesh, elem )
766 integer,
intent(in) :: velbc_ids(dom_bnd_num)
767 integer,
intent(in) :: thermalbc_ids(dom_bnd_num)
768 real(rp),
intent(in) :: thermal_fixval(dom_bnd_num)
772 integer,
intent(in) :: vmapb(:)
775 integer :: dom_bnd_sizes(dom_bnd_num)
776 integer :: bnd_buf_size
777 integer :: b, is_, ie_
782 elem%Nfp_h*lmesh%NeZ*(/ lmesh%NeX, lmesh%NeY, lmesh%NeX, lmesh%NeY, 0, 0 /) &
783 + elem%Nfp_v*lmesh%NeX*lmesh%NeY*(/ 0, 0, 0, 0, 1, 1 /)
784 bnd_buf_size = sum(dom_bnd_sizes)
786 call velbcinfo%Init( bnd_buf_size )
789 call thermalbcinfo%Init( bnd_buf_size )
792 tileid = lmesh%tileID
795 ie_ = is_ + dom_bnd_sizes(b) - 1
796 if ( mesh%tileID_globalMap(b,tileid) == tileid &
797 .and. mesh%tileFaceID_globalMap(b,tileid) == b )
then
798 call velbcinfo%Set( is_, ie_, velbc_ids(b) )
799 call thermalbcinfo%Set( is_, ie_, thermalbc_ids(b), thermal_fixval(b) )
805 end subroutine bnd_init_lc
807end module scale_atm_dyn_dgm_bnd
module FElib / Fluid dyn solver / Atmosphere / Boundary
integer, parameter dombnd_south_id
module FElib / Fluid dyn solver / Atmosphere / Nonhydrostatic model / Common
integer, parameter, public prgvar_momy_id
integer, parameter, public prgvar_ddens_id
integer, parameter, public prgvar_momz_id
integer, parameter, public prgvar_momx_id
integer, parameter, public prgvar_drhot_id
integer, parameter, public prgvar_num
module FElib / Element / Base
module FElib / Mesh / Local 2D
module FElib / Mesh / Local 3D
module FElib / Mesh / Local, Base
module FElib / Data / base
module FElib / Mesh / Base 2D
module FElib / Mesh / Base 3D
module FElib / Mesh / Base
module FElib / Mesh / Boundary information
integer, parameter, public bnd_type_slip_id
character(len= *), parameter, public bnd_type_nospec_name
integer, parameter, public bnd_type_fixval_id
integer function, public bndtype_nametoid(bnd_type_name)
integer, parameter, public bnd_type_periodic_id
integer, parameter, public bnd_type_nospec_id
integer, parameter, public bnd_type_adiabat_id
integer, parameter, public bnd_type_noslip_id
module FElib / Data / base