FE-Project
Loading...
Searching...
No Matches
Data Types | Functions/Subroutines
scale_mesh_cubedom3d Module Reference

module FElib / Mesh / Cubic 3D domain More...

Data Types

type  meshcubedom3d
 

Functions/Subroutines

subroutine meshcubedom3d_init (this, negx, negy, negz, dom_xmin, dom_xmax, dom_ymin, dom_ymax, dom_zmin, dom_zmax, isperiodicx, isperiodicy, isperiodicz, refelem, nlocalmeshperprc, nprcx, nprcy, nproc, myrank, fz)
 
subroutine, public meshcubedom3d_coord_conv (x, y, z, xx, xy, xz, yx, yy, yz, zx, zy, zz, vx, vy, vz, elem)
 

Detailed Description

module FElib / Mesh / Cubic 3D domain

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

Function/Subroutine Documentation

◆ meshcubedom3d_init()

subroutine scale_mesh_cubedom3d::meshcubedom3d_init ( class(meshcubedom3d), intent(inout) this,
integer, intent(in) negx,
integer, intent(in) negy,
integer, intent(in) negz,
real(rp), intent(in) dom_xmin,
real(rp), intent(in) dom_xmax,
real(rp), intent(in) dom_ymin,
real(rp), intent(in) dom_ymax,
real(rp), intent(in) dom_zmin,
real(rp), intent(in) dom_zmax,
logical, intent(in) isperiodicx,
logical, intent(in) isperiodicy,
logical, intent(in) isperiodicz,
type(hexahedralelement), intent(in), target refelem,
integer, intent(in) nlocalmeshperprc,
integer, intent(in) nprcx,
integer, intent(in) nprcy,
integer, intent(in), optional nproc,
integer, intent(in), optional myrank,
real(rp), dimension(negz+1), intent(in), optional fz )

Definition at line 95 of file scale_mesh_cubedom3d.F90.

102
103 implicit none
104
105 class(MeshCubeDom3D), intent(inout) :: this
106 integer, intent(in) :: NeGX
107 integer, intent(in) :: NeGY
108 integer, intent(in) :: NeGZ
109 real(RP), intent(in) :: dom_xmin
110 real(RP), intent(in) :: dom_xmax
111 real(RP), intent(in) :: dom_ymin
112 real(RP), intent(in) :: dom_ymax
113 real(RP), intent(in) :: dom_Zmin
114 real(RP), intent(in) :: dom_zmax
115 logical, intent(in) :: isPeriodicX
116 logical, intent(in) :: isPeriodicY
117 logical, intent(in) :: isPeriodicZ
118 type(HexahedralElement), intent(in), target :: refElem
119 integer, intent(in) :: NLocalMeshPerPrc
120 integer, intent(in) :: NprcX
121 integer, intent(in) :: NprcY
122 integer, intent(in), optional :: nproc
123 integer, intent(in), optional :: myrank
124 real(RP), intent(in), optional :: FZ(NeGZ+1)
125
126 integer :: k
127 real(RP) :: dz
128 !-----------------------------------------------------------------------------
129
130 this%NeGX = negx
131 this%NeGY = negy
132 this%NeGZ = negz
133
134 this%xmin_gl = dom_xmin
135 this%xmax_gl = dom_xmax
136 this%ymin_gl = dom_ymin
137 this%ymax_gl = dom_ymax
138 this%zmin_gl = dom_zmin
139 this%zmax_gl = dom_zmax
140 this%dom_vol = (this%xmax_gl - this%xmin_gl) * (this%ymax_gl - this%ymin_gl) * (this%zmax_gl - this%zmin_gl)
141
142 this%isPeriodicX = isperiodicx
143 this%isPeriodicY = isperiodicy
144 this%isPeriodicZ = isperiodicz
145
146 this%NprcX = nprcx
147 this%NprcY = nprcy
148 this%NprcZ = 1
149
150 !- Fz
151 allocate( this%FZ(this%NeGZ+1) )
152 if ( present(fz) ) then
153 this%FZ(:) = fz(:)
154 else
155 this%FZ(1 ) = dom_zmin
156 this%FZ(this%NeGZ+1) = dom_zmax
157 dz = (dom_zmax - dom_zmin) / dble(this%NeGZ)
158 do k=2, this%NeGZ
159 this%FZ(k) = this%FZ(k-1) + dz
160 end do
161 end if
162
163 !--
164 call meshbase3d_init( this, refelem, nlocalmeshperprc, 6, &
165 nproc, myrank )
166
167 !--- 2D mesh
168
169 call this%refElem2D%Init( this%refElem3D%PolyOrder_h, refelem%IsLumpedMatrix() )
170
171 this%mesh2D%isPeriodicX = isperiodicx
172 this%mesh2D%isPeriodicY = isperiodicy
173 this%mesh2D%NprcX = nprcx
174 this%mesh2D%NprcY = nprcy
175
176 call meshbase2d_init( this%mesh2D, this%refElem2D, nlocalmeshperprc, &
177 nproc, myrank )
178
179 return

References scale_localmesh_base::bctype_interior, scale_mesh_base2d::meshbase2d_init(), scale_mesh_base3d::meshbase3d_final(), scale_mesh_base3d::meshbase3d_init(), scale_mesh_base3d::meshbase3d_setgeometricinfo(), meshcubedom3d_coord_conv(), scale_mesh_rectdom2d::meshrectdom2d_setuplocaldom(), scale_meshutil_3d::meshutil3d_buildglobalmap(), scale_meshutil_3d::meshutil3d_buildinteriormap(), scale_meshutil_3d::meshutil3d_genconnectivity(), scale_meshutil_3d::meshutil3d_gencubedomain(), and scale_meshutil_3d::meshutil3d_genpatchboundarymap().

◆ meshcubedom3d_coord_conv()

subroutine, public scale_mesh_cubedom3d::meshcubedom3d_coord_conv ( real(rp), dimension(elem%np), intent(out) x,
real(rp), dimension(elem%np), intent(out) y,
real(rp), dimension(elem%np), intent(out) z,
real(rp), dimension(elem%np), intent(out) xx,
real(rp), dimension(elem%np), intent(out) xy,
real(rp), dimension(elem%np), intent(out) xz,
real(rp), dimension(elem%np), intent(out) yx,
real(rp), dimension(elem%np), intent(out) yy,
real(rp), dimension(elem%np), intent(out) yz,
real(rp), dimension(elem%np), intent(out) zx,
real(rp), dimension(elem%np), intent(out) zy,
real(rp), dimension(elem%np), intent(out) zz,
real(rp), dimension(elem%nv), intent(in) vx,
real(rp), dimension(elem%nv), intent(in) vy,
real(rp), dimension(elem%nv), intent(in) vz,
type(elementbase3d), intent(in) elem )

Definition at line 515 of file scale_mesh_cubedom3d.F90.

517
518 implicit none
519
520 type(ElementBase3D), intent(in) :: elem
521 real(RP), intent(out) :: x(elem%Np), y(elem%Np), z(elem%Np)
522 real(RP), intent(out) :: xX(elem%Np), xY(elem%Np), xZ(elem%Np)
523 real(RP), intent(out) :: yX(elem%Np), yY(elem%Np), yZ(elem%Np)
524 real(RP), intent(out) :: zX(elem%Np), zY(elem%Np), zZ(elem%Np)
525 real(RP), intent(in) :: vx(elem%Nv), vy(elem%Nv), vz(elem%Nv)
526
527 !-------------------------------------------------
528
529 x(:) = vx(1) + 0.5_rp*(elem%x1(:) + 1.0_rp)*(vx(2) - vx(1))
530 y(:) = vy(1) + 0.5_rp*(elem%x2(:) + 1.0_rp)*(vy(3) - vy(1))
531 z(:) = vz(1) + 0.5_rp*(elem%x3(:) + 1.0_rp)*(vz(5) - vz(1))
532
533 xx(:) = 0.5_rp*(vx(2) - vx(1)) !matmul(refElem%Dx1,mesh%x1(:,n))
534 xy(:) = 0.0_rp !matmul(refElem%Dx2,mesh%x1(:,n))
535 xz(:) = 0.0_rp !matmul(refElem%Dx3,mesh%x1(:,n))
536 yx(:) = 0.0_rp !matmul(refElem%Dx1,mesh%x2(:,n))
537 yy(:) = 0.5_rp*(vy(3) - vy(1)) !matmul(refElem%Dx2,mesh%x2(:,n))
538 yz(:) = 0.0_rp !matmul(refElem%Dx3,mesh%x2(:,n))
539 zx(:) = 0.0_rp !matmul(refElem%Dx1,mesh%x3(:,n))
540 zy(:) = 0.0_rp !matmul(refElem%Dx2,mesh%x3(:,n))
541 zz(:) = 0.5_rp*(vz(5) - vz(1)) !matmul(refElem%Dx3,mesh%x3(:,n))
542
543 return

Referenced by meshcubedom3d_init(), and scale_mesh_cubedom3d::meshcubedom3d::set_geometric_with_vcoord().