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

module FElib / Mesh / Cubed-sphere 3D domain More...

Data Types

type  meshcubedspheredom3d
 Derived type to manage a cubed-sphere 3D computational domain. More...

Functions/Subroutines

subroutine meshcubedspheredom3d_init (this, negx, negy, negz, rplanet, dom_zmin, dom_zmax, refelem, nlocalmeshperprc, nproc, myrank, fz, shallow_approx)
 Initialize an object to manage a cubed-sphere 3D computational domain.

Detailed Description

module FElib / Mesh / Cubed-sphere 3D domain

Description
Manage mesh data of cubed-sphere 3D domain for element-based methods
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ meshcubedspheredom3d_init()

subroutine scale_mesh_cubedspheredom3d::meshcubedspheredom3d_init ( class(meshcubedspheredom3d), intent(inout) this,
integer, intent(in) negx,
integer, intent(in) negy,
integer, intent(in) negz,
real(rp), intent(in) rplanet,
real(rp), intent(in) dom_zmin,
real(rp), intent(in) dom_zmax,
type(hexahedralelement), intent(in), target refelem,
integer, intent(in) nlocalmeshperprc,
integer, intent(in), optional nproc,
integer, intent(in), optional myrank,
real(rp), dimension(negz+1), intent(in), optional fz,
logical, intent(in), optional shallow_approx )

Initialize an object to manage a cubed-sphere 3D computational domain.

Definition at line 102 of file scale_mesh_cubedspheredom3d.F90.

108
109 use scale_const, only: &
110 pi => const_pi
111 implicit none
112
113 class(MeshCubedSphereDom3D), intent(inout) :: this
114 integer, intent(in) :: NeGX
115 integer, intent(in) :: NeGY
116 integer, intent(in) :: NeGZ
117 real(RP), intent(in) :: RPlanet
118 real(RP), intent(in) :: dom_Zmin
119 real(RP), intent(in) :: dom_zmax
120 type(HexahedralElement), intent(in), target :: refElem
121 integer, intent(in) :: NLocalMeshPerPrc
122 integer, intent(in), optional :: nproc
123 integer, intent(in), optional :: myrank
124 real(RP), intent(in), optional :: FZ(NeGZ+1)
125 logical, intent(in), optional :: shallow_approx
126
127 integer :: k
128 real(RP) :: dz
129 !-----------------------------------------------------------------------------
130
131 this%NeGX = negx
132 this%NeGY = negy
133 this%NeGZ = negz
134
135 this%xmin_gl = - 0.25_rp * pi
136 this%xmax_gl = + 0.25_rp * pi
137 this%ymin_gl = - 0.25_rp * pi
138 this%ymax_gl = + 0.25_rp * pi
139 this%zmin_gl = dom_zmin
140 this%zmax_gl = dom_zmax
141 this%RPlanet = rplanet
142 this%dom_vol = 4.0_rp / 3.0_rp * pi * ( ( dom_zmax + rplanet )**3 - ( dom_zmin + rplanet )**3 )
143
144
145 !- Fz
146 allocate( this%FZ(this%NeGZ+1) )
147 if ( present(fz) ) then
148 this%FZ(:) = fz(:)
149 else
150 this%FZ(1 ) = dom_zmin
151 this%FZ(this%NeGZ+1) = dom_zmax
152 dz = (dom_zmax - dom_zmin) / dble(this%NeGZ)
153 do k=2, this%NeGZ
154 this%FZ(k) = this%FZ(k-1) + dz
155 end do
156 end if
157
158 !-
159 if ( present(shallow_approx) ) then
160 this%shallow_approx = shallow_approx
161 else
162 this%shallow_approx = .true.
163 end if
164
165 !--
166 call meshbase3d_init( this, refelem, nlocalmeshperprc, 6, &
167 nproc, myrank )
168
169 !---
170 call this%refElem2D%Init( this%refElem3D%PolyOrder_h, refelem%IsLumpedMatrix() )
171 call this%mesh2D%Init( negx, negy, rplanet, this%refElem2D, nlocalmeshperprc, &
172 nproc, myrank )
173
174 !-- Modify the information of dimension for the cubed sphere mesh
175 call this%SetDimInfo( meshbase3d_dimtypeid_x, "x", "1", "X-coordinate" )
176 call this%SetDimInfo( meshbase3d_dimtypeid_y, "y", "1", "Y-coordinate" )
177 call this%SetDimInfo( meshbase3d_dimtypeid_z, "z", "m", "Z-coordinate" )
178 call this%SetDimInfo( meshbase3d_dimtypeid_xyz, "xyz", "1", "XYZ-coordinate" )
179 call this%SetDimInfo( meshbase3d_dimtypeid_zt, "zt", "1", "XYZ-coordinate" )
180 call this%SetDimInfo( meshbase3d_dimtypeid_xyzt, "xyzt", "1", "XYZ-coordinate" )
181
182 return

References scale_localmesh_base::bctype_interior, scale_cubedsphere_coord_cnv::cubedspherecoordcnv_cs2lonlatpos(), scale_cubedsphere_coord_cnv::cubedspherecoordcnv_getmetric(), scale_mesh_base3d::meshbase3d_dimtypeid_x, scale_mesh_base3d::meshbase3d_dimtypeid_xyz, scale_mesh_base3d::meshbase3d_dimtypeid_xyzt, scale_mesh_base3d::meshbase3d_dimtypeid_y, scale_mesh_base3d::meshbase3d_dimtypeid_z, scale_mesh_base3d::meshbase3d_dimtypeid_zt, scale_mesh_base3d::meshbase3d_final(), scale_mesh_base3d::meshbase3d_init(), scale_mesh_base3d::meshbase3d_setgeometricinfo(), scale_mesh_cubedspheredom2d::meshcubedspheredom2d_check_division_params(), scale_mesh_cubedspheredom2d::meshcubedspheredom2d_setuplocaldom(), and scale_meshutil_cubedsphere3d::meshutilcubedsphere3d_buildglobalmap().