| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | CGNStoSELFflip(1:6,1:6,1:4) | ||||
| integer, | public, | parameter | :: | mortarQuadKx(1:4) | = | [1, 2, 1, 2] | |
| integer, | public, | parameter | :: | mortarQuadKy(1:4) | = | [1, 1, 2, 2] | |
| integer, | public, | parameter | :: | selfSide3D_Bottom | = | 1 | |
| integer, | public, | parameter | :: | selfSide3D_East | = | 3 | |
| integer, | public, | parameter | :: | selfSide3D_North | = | 4 | |
| integer, | public, | parameter | :: | selfSide3D_South | = | 2 | |
| integer, | public, | parameter | :: | selfSide3D_Top | = | 6 | |
| integer, | public, | parameter | :: | selfSide3D_West | = | 5 |
| 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 | |||
| 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 | :: | nBCs | ||||
| integer, | public | :: | nCornerNodes | ||||
| integer, | public | :: | nElem | ||||
| integer, | public | :: | nGeo | ||||
| integer, | public | :: | nGlobalElem | ||||
| 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 |
| procedure, public :: Free => Free_Mesh3D_t | |
| procedure, public :: Init => Init_Mesh3D_t | |
| generic, public :: PeriodicStructuredMesh => UniformPeriodicMesh_Mesh3D_t | |
| procedure, public :: Read_HOHQMesh => Read_HOHQMesh_Mesh3D_t | |
| procedure, public :: Read_HOPr => Read_HOPr_Mesh3D_t | |
| procedure, public :: RecalculateFlip => RecalculateFlip_Mesh3D_t | |
| procedure, public :: ResetBoundaryConditionType => ResetBoundaryConditionType_Mesh3D_t | |
| procedure, public :: SimpleMortarMesh => SimpleMortarMesh_Mesh3D_t | |
| generic, public :: StructuredMesh => UniformStructuredMesh_Mesh3D_t | |
| procedure, private :: UniformPeriodicMesh_Mesh3D_t | |
| procedure, private :: UniformStructuredMesh_Mesh3D_t | |
| procedure, public :: UpdateDevice => UpdateDevice_Mesh3D_t | |
| procedure, public :: Write_Mesh => Write_Mesh3D_t |
Evaluates the bilinear map of face s of a trilinear (nGeo=1) element at the face coordinates (u,v) in [-1,1]^2, using the face trace-coordinate convention of BoundaryInterp: faces 1,6 -> (xi1,xi2); faces 2,4 -> (xi1,xi3); faces 3,5 -> (xi2,xi3).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=prec), | intent(in) | :: | elemCoords(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | s | |||
| real(kind=prec), | intent(in) | :: | u | |||
| real(kind=prec), | intent(in) | :: | v |
Identifies which of the six domain boundary planes of the SimpleMortarMesh contains face s of the element, and returns the corresponding boundary condition id. The domain is [0,3dx] x [0,2dx] x [0,2dx] with the region x > 2dx, above/below the small elements, outside the mesh; the x = 3dx plane is the domain east.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=prec), | intent(in) | :: | elemCoords(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | s | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | tol | |||
| integer, | intent(in) | :: | bcids(1:6) |
Determines whether face sSmall of the small element coincides with quadrant q of face sBig of the big element under the given flip: face_small(F_flip(u,v)) == face_big(quadrant_q(u,v)) at the sampled points.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=prec), | intent(in) | :: | coordsBig(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | sBig | |||
| integer, | intent(in) | :: | q | |||
| real(kind=prec), | intent(in) | :: | coordsSmall(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | sSmall | |||
| integer, | intent(in) | :: | flip | |||
| real(kind=prec), | intent(in) | :: | tol |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | k | |||
| integer, | intent(in) | :: | ti | |||
| integer, | intent(in) | :: | tj | |||
| integer, | intent(in) | :: | tk | |||
| integer, | intent(in) | :: | nxpertile | |||
| integer, | intent(in) | :: | nypertile | |||
| integer, | intent(in) | :: | nzpertile | |||
| integer, | intent(in) | :: | ntilex | |||
| integer, | intent(in) | :: | ntiley | |||
| integer, | intent(in) | :: | ntilez |
Map a global element position (gx,gy,gz), with gx in [1,nX] etc., to the tile-ordered element id used throughout the structured mesh. This is the inverse of the (i,ti) decomposition: gx = i + nxpertile*(ti-1).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | gx | |||
| integer, | intent(in) | :: | gy | |||
| integer, | intent(in) | :: | gz | |||
| integer, | intent(in) | :: | nxpertile | |||
| integer, | intent(in) | :: | nypertile | |||
| integer, | intent(in) | :: | nzpertile | |||
| integer, | intent(in) | :: | ntilex | |||
| integer, | intent(in) | :: | ntiley | |||
| integer, | intent(in) | :: | ntilez |
Coordinate form of MortarFaceMap: maps receiver-face coordinates (u,v) to donor-face coordinates (u2,v2) for each of the eight SELF face flips.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=prec), | intent(in) | :: | u | |||
| real(kind=prec), | intent(in) | :: | v | |||
| integer, | intent(in) | :: | flip | |||
| real(kind=prec), | intent(out) | :: | u2 | |||
| real(kind=prec), | intent(out) | :: | v2 |
| 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 |
Determines whether face sA of element A coincides with face sB of element B, and if so with which flip: face_B(F_flip(u,v)) == face_A(u,v) at the sampled points. Bilinear faces are pinned by their four corners plus one interior point.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=prec), | intent(in) | :: | coordsA(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | sA | |||
| real(kind=prec), | intent(in) | :: | coordsB(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | sB | |||
| real(kind=prec), | intent(in) | :: | tol | |||
| logical, | intent(out) | :: | matched | |||
| integer, | intent(out) | :: | flip |
Maps receiver-face node indices (i,j) to donor-face node indices (i2,j2) for each of the eight SELF face flips (see the CGNStoSELFflip table above; indices here are 1-based, so the 0-based rule i2 = N-i1 reads i2 = N+2-i). Mortar staging uses this to reorient a small face's trace into the big face's coordinates and to scatter restricted traces back.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | N | |||
| integer, | intent(in) | :: | flip | |||
| integer, | intent(out) | :: | i2 | |||
| integer, | intent(out) | :: | j2 |
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 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 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 |
Fill mesh%nodeCoords(:,:,:,:,e) for one hexahedral element by transfinite (Coons) interpolation of its six face grids. Faces flagged in the mesh file use the file's face-point grids; the remaining faces are bilinear patches of their four corner nodes evaluated at Chebyshev-Gauss-Lobatto parametric coordinates. Edge curves are extracted from the face grids (preferring a flagged face when an edge borders one flagged and one bilinear face) and the standard Boolean-sum formula x = Pxi + Peta + Pzeta - PxiPeta - PxiPzeta - PetaPzeta + PxiPeta*Pzeta combines face, edge, and corner contributions. For an element with all-straight faces this reduces to trilinear interpolation of the eight corners.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D_t), | intent(inout) | :: | mesh | |||
| integer, | intent(in) | :: | e | |||
| integer, | intent(in) | :: | nGeo | |||
| integer, | intent(in) | :: | allCorners(:,:) | |||
| integer, | intent(in) | :: | allFlags(:,:) | |||
| real(kind=prec), | intent(in) | :: | allFaces(:,:,:,:,:) | |||
| real(kind=prec), | intent(in) | :: | nodeXYZ(:,:) |