| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=255), | public, | allocatable | :: | BCNames(:) | |||
| integer, | public, | pointer, dimension(:,:) | :: | BCType | |||
| integer, | public, | pointer, dimension(:,:) | :: | CGNSCornerMap | |||
| integer, | public, | pointer, dimension(:,:) | :: | CGNSSideMap | |||
| integer, | public, | pointer, dimension(:,:) | :: | anisoMortarInfo | => | null() | |
| type(DomainDecomposition), | public | :: | decomp | ||||
| integer, | public, | pointer, dimension(:,:) | :: | elemInfo | |||
| integer, | public, | allocatable | :: | elemMaterial(:) | |||
| integer, | public, | pointer, dimension(:,:,:,:) | :: | globalNodeIDs | |||
| character(len=SELF_MESH_MATNAME_LENGTH), | public, | allocatable | :: | materialNames(:) | |||
| integer, | public, | pointer, dimension(:,:) | :: | mortarInfo | => | null() | |
| integer, | public | :: | nAnisoMortars | = | 0 | ||
| integer, | public | :: | nBCs | ||||
| integer, | public | :: | nCornerNodes | ||||
| integer, | public | :: | nElem | ||||
| integer, | public | :: | nGeo | ||||
| integer, | public | :: | nGlobalElem | ||||
| integer, | public | :: | nLayers | = | 0 | ||
| integer, | public | :: | nMaterials | = | 0 | ||
| integer, | public | :: | nMortars | = | 0 | ||
| integer, | public | :: | nNodes | ||||
| integer, | public | :: | nSides | ||||
| integer, | public | :: | nUniqueNodes | ||||
| integer, | public | :: | nUniqueSides | ||||
| real(kind=prec), | public, | pointer, dimension(:,:,:,:,:) | :: | nodeCoords | |||
| integer, | public | :: | quadrature | ||||
| integer, | public, | pointer, dimension(:,:,:) | :: | sideInfo | |||
| integer, | public, | pointer, dimension(:,:) | :: | sideMap |
Builds a layered hexahedral mesh by extruding a surface mesh downward through nz = size(zLevels,3)-1 layers bounded by the level surfaces z_0 < z_1 < ... < z_nz.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| class(Mesh2D_t), | intent(in) | :: | mesh2d | |||
| real(kind=prec), | intent(in) | :: | zLevels(1:,1:,0:,1:) | |||
| integer, | intent(in) | :: | bottomBC | |||
| integer, | intent(in) | :: | topBC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | nGeo | |||
| integer, | intent(in) | :: | nElem | |||
| integer, | intent(in) | :: | nSides | |||
| integer, | intent(in) | :: | nNodes | |||
| integer, | intent(in) | :: | nBCs |
Create a fully triply-periodic structured hexahedral mesh and store it in SELF's unstructured mesh format. Element geometry and ordering are identical to UniformStructuredMesh; the only difference is connectivity. The faces on the six domain boundaries are wired as interior faces whose neighbor is the element on the opposite side of the domain. This realises the triply periodic box T^3 = [0,Lx] x [0,Ly] x [0,Lz] required by, e.g., the Arnold-Beltrami-Childress (ABC) flow benchmark.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nxPerTile | |||
| integer, | intent(in) | :: | nyPerTile | |||
| integer, | intent(in) | :: | nzPerTile | |||
| integer, | intent(in) | :: | nTileX | |||
| integer, | intent(in) | :: | nTileY | |||
| integer, | intent(in) | :: | nTileZ | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | dy | |||
| real(kind=prec), | intent(in) | :: | dz | |||
| integer, | intent(in), | optional | :: | comm |
Reader for HOHQMesh 3-D (hexahedral) text mesh files in the ISM
and ISM-MM formats, as written by HOHQMesh's WriteISMHexMeshFile
(Source/3DSource/Mesh3DOutputMethods.f90). Unlike the 2-D
writer, the 3-D writer emits NO format header line: the first
line is always the count line "nNodes nElems polyOrder". The two
variants differ only in the per-element corner-node line:
* ISM : 8 corner-node ids
* ISM-MM : 8 corner-node ids followed by a material-name string
The variant is auto-detected from the presence of the 9th token.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| character, | intent(in) | :: | meshFile | |||
| integer, | intent(in), | optional | :: | comm |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| character, | intent(in) | :: | meshFile | |||
| integer, | intent(in), | optional | :: | comm |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | this |
This method can be used to reset all of the boundary elements boundary condition type to the desired value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | bcid |
Create the smallest 3D anisotropic (2-subface) nonconforming mesh: one "big" element whose east face is shared with the faces of two "small" dx x dx x dx elements that split it along one face coordinate only. The mesh is conforming everywhere except at the single mortar interface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| integer, | intent(in) | :: | bcids(1:6) | |||
| integer, | intent(in), | optional | :: | comm | ||
| integer, | intent(in), | optional | :: | flips(1:2) | ||
| integer, | intent(in), | optional | :: | splitCoord |
Create the smallest 3D 2:1 nonconforming (mortar) mesh: one "big" element of size 2dx x 2dx x 2*dx whose east face is shared with the faces of four "small" dx x dx x dx elements stacked 2x2 in (y,z). The mesh is conforming everywhere except at the single mortar interface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| integer, | intent(in) | :: | bcids(1:6) | |||
| integer, | intent(in), | optional | :: | comm | ||
| integer, | intent(in), | optional | :: | flips(1:4) |
Create a structured mesh and store it in SELF's unstructured mesh format. The mesh is created in tiles of size (tnx,tny,tnz). Tiling is used to determine the element ordering.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nxPerTile | |||
| integer, | intent(in) | :: | nyPerTile | |||
| integer, | intent(in) | :: | nzPerTile | |||
| integer, | intent(in) | :: | nTileX | |||
| integer, | intent(in) | :: | nTileY | |||
| integer, | intent(in) | :: | nTileZ | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | dy | |||
| real(kind=prec), | intent(in) | :: | dz | |||
| integer, | intent(in) | :: | bcids(1:6) | |||
| integer, | intent(in), | optional | :: | comm |
Create a fully triply-periodic structured hexahedral mesh and store it in SELF's unstructured mesh format. Element geometry and ordering are identical to UniformStructuredMesh; the only difference is connectivity. The faces on the six domain boundaries are wired as interior faces whose neighbor is the element on the opposite side of the domain. This realises the triply periodic box T^3 = [0,Lx] x [0,Ly] x [0,Lz] required by, e.g., the Arnold-Beltrami-Childress (ABC) flow benchmark.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nxPerTile | |||
| integer, | intent(in) | :: | nyPerTile | |||
| integer, | intent(in) | :: | nzPerTile | |||
| integer, | intent(in) | :: | nTileX | |||
| integer, | intent(in) | :: | nTileY | |||
| integer, | intent(in) | :: | nTileZ | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | dy | |||
| real(kind=prec), | intent(in) | :: | dz | |||
| integer, | intent(in), | optional | :: | comm |
Create a structured mesh and store it in SELF's unstructured mesh format. The mesh is created in tiles of size (tnx,tny,tnz). Tiling is used to determine the element ordering.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nxPerTile | |||
| integer, | intent(in) | :: | nyPerTile | |||
| integer, | intent(in) | :: | nzPerTile | |||
| integer, | intent(in) | :: | nTileX | |||
| integer, | intent(in) | :: | nTileY | |||
| integer, | intent(in) | :: | nTileZ | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | dy | |||
| real(kind=prec), | intent(in) | :: | dz | |||
| integer, | intent(in) | :: | bcids(1:6) | |||
| integer, | intent(in), | optional | :: | comm |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | meshFile |
type,extends(SEMMesh) :: Mesh3D_t
integer,pointer,dimension(:,:,:) :: sideInfo
real(prec),pointer,dimension(:,:,:,:,:) :: nodeCoords
integer,pointer,dimension(:,:) :: elemInfo
integer,pointer,dimension(:,:,:,:) :: globalNodeIDs
integer,pointer,dimension(:,:) :: CGNSCornerMap
integer,pointer,dimension(:,:) :: sideMap
integer,pointer,dimension(:,:) :: CGNSSideMap
integer,pointer,dimension(:,:) :: BCType
character(LEN=255),allocatable :: BCNames(:)
! 2:1 nonconforming (mortar) interface bookkeeping.
!
! A mortar interface joins one "big" element face to the four quarter-faces of its
! 2:1 refined neighbors ("small" faces). Faces that participate in a mortar carry
! sideInfo(3) = 0 (no conforming neighbor) and sideInfo(5) = 0 (no boundary
! condition), so all conforming-face machinery (SideExchange, RecalculateFlip,
! boundary-condition mapping) skips them; sideInfo(1) is set to the mortar index
! for reference.
!
! The big face is split into four sub-faces ("quadrants") indexed in the big
! face's trace coordinates: q = kx + 2*(ky-1) with kx, ky in {1,2} the
! half-interval index along the face's first and second coordinate
! (1 = [-1,0], 2 = [0,1]).
!
! mortarInfo(1:14,1:nMortars) is replicated on all ranks (element ids are global):
! 1 - big element id ; 2 - big local face id
! 3 - small element id on the sub-face covering big-face quadrant 1
! 4 - 10*(small local face) + flip for that sub-face
! 5,6 - same for quadrant 2
! 7,8 - same for quadrant 3
! 9,10 - same for quadrant 4
! 11:14 - global side ids of sub-faces 1..4 (used as MPI message tags)
! The flip maps big-face quadrant coordinates to the small face's own coordinates
! (the same receiver-to-donor convention as sideInfo(4); see MortarFaceMap).
integer :: nMortars = 0
integer,pointer,dimension(:,:) :: mortarInfo => null()
! Anisotropic (2-subface) nonconforming interfaces.
!
! An anisotropic mortar joins one big face to two small faces that split it along
! one of its two trace coordinates only (the split coordinate) and span the whole
! interval [-1,1] of the other. This is the interface between a coarse column and two
! fine columns of an extruded mesh whose surface mesh has 2-D mortars. Its faces
! carry sideInfo(3) = 0 and sideInfo(5) = 0 like those of a 2x2 mortar, and
! sideInfo(1) = nMortars + a, so a nonzero sideInfo(1) still marks a mortar face.
!
! anisoMortarInfo(1:9,1:nAnisoMortars) is replicated on all ranks (global element ids):
! 1 - big element id ; 2 - big local face id
! 3 - small element id on the half h = 1 ([-1,0] of the split coordinate)
! 4 - 10*(small local face) + flip for that half
! 5,6 - same for the half h = 2 ([0,1])
! 7,8 - global side ids of the two small faces (used as MPI message tags)
! 9 - the split coordinate of the big face, 1 or 2 (the face trace-coordinate
! convention of BoundaryInterp: faces 1,6 -> (xi1,xi2); 2,4 -> (xi1,xi3);
! 3,5 -> (xi2,xi3))
! The flip maps big-face half coordinates to the small face's own coordinates, as for
! mortarInfo. The 1-D mortarR/mortarP of the half act on the split coordinate and the
! identity on the other.
integer :: nAnisoMortars = 0
integer,pointer,dimension(:,:) :: anisoMortarInfo => null()
! Material tracking: every element has an integer material id
! indexing into materialNames. Single-material constructors and
! readers (HOPr, structured, periodic) leave nMaterials = 1 with
! the name "default". The HOHQMesh ISM-MM reader populates the
! table with the material strings from the .mesh file.
integer :: nMaterials = 0
integer,allocatable :: elemMaterial(:)
character(LEN=SELF_MESH_MATNAME_LENGTH),allocatable :: materialNames(:)
! Layer count of a mesh built by ExtrudedMesh, and 0 for every other mesh.
!
! An extruded mesh stores its elements column by column: local element
! e3 = (e2-1)*nLayers + k is layer k (k = 1 at the bottom) of the column above local
! element e2 of the surface Mesh2D it was built from, and the same rule maps global
! ids. A column therefore never straddles two ranks, and the surface element and
! layer of an element follow from its id alone:
! e2 = (e3-1)/nLayers + 1 , k = e3 - (e2-1)*nLayers
integer :: nLayers = 0
contains
procedure,public :: Init => Init_Mesh3D_t
procedure,public :: Free => Free_Mesh3D_t
procedure,public :: UpdateDevice => UpdateDevice_Mesh3D_t
generic,public :: StructuredMesh => UniformStructuredMesh_Mesh3D_t
procedure,private :: UniformStructuredMesh_Mesh3D_t
procedure,public :: SimpleMortarMesh => SimpleMortarMesh_Mesh3D_t
procedure,public :: SimpleAnisoMortarMesh => SimpleAnisoMortarMesh_Mesh3D_t
generic,public :: PeriodicStructuredMesh => UniformPeriodicMesh_Mesh3D_t
procedure,private :: UniformPeriodicMesh_Mesh3D_t
procedure,public :: ExtrudedMesh => ExtrudedMesh_Mesh3D_t
procedure,public :: Read_HOPr => Read_HOPr_Mesh3D_t
procedure,public :: Read_HOHQMesh => Read_HOHQMesh_Mesh3D_t
procedure,public :: ResetBoundaryConditionType => ResetBoundaryConditionType_Mesh3D_t
procedure,public :: Write_Mesh => Write_Mesh3D_t
procedure,public :: RecalculateFlip => RecalculateFlip_Mesh3D_t
endtype Mesh3D_t