SELF_Mesh_3D_t Module


Uses

  • module~~self_mesh_3d_t~~UsesGraph module~self_mesh_3d_t SELF_Mesh_3D_t module~self_hdf5 SELF_HDF5 module~self_mesh_3d_t->module~self_hdf5 module~self_supportroutines SELF_SupportRoutines module~self_mesh_3d_t->module~self_supportroutines HDF5 HDF5 module~self_mesh_3d_t->HDF5 module~self_domaindecomposition SELF_DomainDecomposition module~self_mesh_3d_t->module~self_domaindecomposition module~self_mesh SELF_Mesh module~self_mesh_3d_t->module~self_mesh module~self_quadrature SELF_Quadrature module~self_mesh_3d_t->module~self_quadrature module~self_lagrange~3 SELF_Lagrange module~self_mesh_3d_t->module~self_lagrange~3 iso_c_binding iso_c_binding module~self_mesh_3d_t->iso_c_binding module~self_constants SELF_Constants module~self_mesh_3d_t->module~self_constants module~self_hdf5->HDF5 module~self_hdf5->module~self_constants iso_fortran_env iso_fortran_env module~self_hdf5->iso_fortran_env mpi mpi module~self_hdf5->mpi module~self_supportroutines->module~self_constants module~self_supportroutines->iso_fortran_env module~self_domaindecomposition_t SELF_DomainDecomposition_t module~self_domaindecomposition->module~self_domaindecomposition_t module~self_mesh->module~self_domaindecomposition module~self_mesh->iso_c_binding module~self_mesh->module~self_constants module~self_quadrature->module~self_constants module~self_quadrature->iso_fortran_env module~self_lagrange~3->iso_c_binding module~self_lagrange~3->module~self_constants module~self_lagrange~3->iso_fortran_env module~self_lagrange_t SELF_Lagrange_t module~self_lagrange~3->module~self_lagrange_t module~self_constants->iso_c_binding module~self_constants->iso_fortran_env module~self_domaindecomposition_t->module~self_supportroutines module~self_domaindecomposition_t->module~self_lagrange~3 module~self_domaindecomposition_t->iso_c_binding module~self_domaindecomposition_t->module~self_constants module~self_domaindecomposition_t->mpi module~self_lagrange_t->module~self_hdf5 module~self_lagrange_t->module~self_supportroutines module~self_lagrange_t->HDF5 module~self_lagrange_t->module~self_quadrature module~self_lagrange_t->iso_c_binding module~self_lagrange_t->module~self_constants module~self_lagrange_t->iso_fortran_env

Used by

  • module~~self_mesh_3d_t~~UsedByGraph module~self_mesh_3d_t SELF_Mesh_3D_t module~self_mesh_3d SELF_Mesh_3D module~self_mesh_3d->module~self_mesh_3d_t module~self_mesh_3d~2 SELF_Mesh_3D module~self_mesh_3d~2->module~self_mesh_3d_t module~self_mappedscalar_3d_t SELF_MappedScalar_3D_t module~self_mappedscalar_3d_t->module~self_mesh_3d module~self_geometry_3d SELF_Geometry_3D module~self_mappedscalar_3d_t->module~self_geometry_3d module~self_mappedvector_3d_t SELF_MappedVector_3D_t module~self_mappedvector_3d_t->module~self_mesh_3d module~self_mappedvector_3d_t->module~self_geometry_3d module~self_octreemesh_3d SELF_OctreeMesh_3D module~self_octreemesh_3d->module~self_mesh_3d module~self_geometry_3d->module~self_mesh_3d module~self_dgmodel3d_t SELF_DGModel3D_t module~self_dgmodel3d_t->module~self_mesh_3d module~self_dgmodel3d_t->module~self_geometry_3d module~self_mappedscalar_3d SELF_MappedScalar_3D module~self_dgmodel3d_t->module~self_mappedscalar_3d module~self_mappedvector_3d SELF_MappedVector_3D module~self_dgmodel3d_t->module~self_mappedvector_3d module~self_transferplan_3d SELF_TransferPlan_3D module~self_dgmodel3d_t->module~self_transferplan_3d module~self_meshrefinement_3d SELF_MeshRefinement_3D module~self_meshrefinement_3d->module~self_mesh_3d module~self_adaptivemesh_3d SELF_AdaptiveMesh_3D module~self_adaptivemesh_3d->module~self_mesh_3d module~self_adaptivemesh_3d->module~self_octreemesh_3d module~self_amrcontroller_3d SELF_AMRController_3D module~self_amrcontroller_3d->module~self_mesh_3d module~self_amrcontroller_3d->module~self_octreemesh_3d module~self_amrcontroller_3d->module~self_geometry_3d module~self_amrcontroller_3d->module~self_dgmodel3d_t module~self_amrcontroller_3d->module~self_adaptivemesh_3d module~self_amrcontroller_3d->module~self_transferplan_3d module~self_dgmodel3d~2 SELF_DGModel3D module~self_dgmodel3d~2->module~self_mesh_3d module~self_dgmodel3d~2->module~self_geometry_3d module~self_dgmodel3d~2->module~self_dgmodel3d_t module~self_dgmodel3d~2->module~self_transferplan_3d module~self_esatmo3d SELF_ESAtmo3D module~self_esatmo3d->module~self_mesh_3d module~self_esatmo3d->module~self_geometry_3d module~self_esatmo3d_t SELF_ESAtmo3D_t module~self_esatmo3d->module~self_esatmo3d_t module~self_ecdgmodel3d_t SELF_ECDGModel3D_t module~self_esatmo3d->module~self_ecdgmodel3d_t module~self_ecadvection3d~2 SELF_ECAdvection3D module~self_ecadvection3d~2->module~self_mesh_3d module~self_ecadvection3d~2->module~self_geometry_3d module~self_ecadvection3d~2->module~self_ecdgmodel3d_t module~self_ecadvection3d_t SELF_ECAdvection3D_t module~self_ecadvection3d~2->module~self_ecadvection3d_t module~self_mappedscalar_3d->module~self_mappedscalar_3d_t module~self_mappedvector_3d~2 SELF_MappedVector_3D module~self_mappedvector_3d~2->module~self_mappedvector_3d_t module~self_mappedscalar_3d~2 SELF_MappedScalar_3D module~self_mappedscalar_3d~2->module~self_mappedscalar_3d_t module~self_mappedvector_3d->module~self_mappedvector_3d_t module~self_transferplan_3d->module~self_octreemesh_3d module~self_mappedtwopointvector_3d_t SELF_MappedTwoPointVector_3D_t module~self_mappedtwopointvector_3d_t->module~self_geometry_3d module~self_points_t SELF_Points_t module~self_points_t->module~self_geometry_3d module~self_points_t->module~self_mappedscalar_3d module~self_points SELF_Points module~self_points->module~self_geometry_3d module~self_points->module~self_mappedscalar_3d module~self_points->module~self_points_t module~self_dgmodel3d SELF_DGModel3D module~self_dgmodel3d->module~self_dgmodel3d_t module~self_esatmo3d_t->module~self_mappedscalar_3d module~self_ecdgmodel3d SELF_ECDGModel3D module~self_esatmo3d_t->module~self_ecdgmodel3d module~self_ecdgmodel3d_t->module~self_dgmodel3d module~self_mappedtwopointvector_3d~2 SELF_MappedTwoPointVector_3D module~self_ecdgmodel3d_t->module~self_mappedtwopointvector_3d~2 module~self_mappedtwopointvector_3d~2->module~self_mappedtwopointvector_3d_t module~self_mappedtwopointvector_3d SELF_MappedTwoPointVector_3D module~self_mappedtwopointvector_3d->module~self_mappedtwopointvector_3d_t module~self_points~2 SELF_Points module~self_points~2->module~self_points_t module~self_advection_diffusion_3d_t self_advection_diffusion_3d_t module~self_advection_diffusion_3d_t->module~self_dgmodel3d module~self_nulldgmodel3d_t self_NullDGModel3D_t module~self_nulldgmodel3d_t->module~self_dgmodel3d module~self_lineareuler3d_t self_LinearEuler3D_t module~self_lineareuler3d_t->module~self_dgmodel3d module~self_esatmo3d~2 SELF_ESAtmo3D module~self_esatmo3d~2->module~self_esatmo3d_t module~self_ecdgmodel3d->module~self_ecdgmodel3d_t module~self_advection_diffusion_3d self_advection_diffusion_3d module~self_advection_diffusion_3d->module~self_advection_diffusion_3d_t module~self_advection_diffusion_3d~2 self_advection_diffusion_3d module~self_advection_diffusion_3d~2->module~self_advection_diffusion_3d_t module~self_ecdgmodel3d~2 SELF_ECDGModel3D module~self_ecdgmodel3d~2->module~self_ecdgmodel3d_t module~self_nulldgmodel3d self_NullDGModel3D module~self_nulldgmodel3d->module~self_nulldgmodel3d_t module~self_nulldgmodel3d~2 self_NullDGModel3D module~self_nulldgmodel3d~2->module~self_nulldgmodel3d_t module~self_lineareuler3d self_LinearEuler3D module~self_lineareuler3d->module~self_lineareuler3d_t module~self_lineareuler3d~2 self_LinearEuler3D module~self_lineareuler3d~2->module~self_lineareuler3d_t module~self_ecadvection3d_t->module~self_ecdgmodel3d module~self_ecadvection3d SELF_ECAdvection3D module~self_ecadvection3d->module~self_ecadvection3d_t

Contents


Variables

TypeVisibilityAttributesNameInitial
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

Derived Types

type, public, extends(SEMMesh) :: Mesh3D_t

Components

TypeVisibilityAttributesNameInitial
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

Type-Bound Procedures

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

Functions

public pure function BilinearFacePoint3D(elemCoords, s, u, v) result(p)

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).

Arguments

TypeIntentOptionalAttributesName
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

Return Value real(kind=prec)(1:3)

public function DomainBoundaryId3D(elemCoords, s, dx, tol, bcids) result(bcid)

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.

Arguments

TypeIntentOptionalAttributesName
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)

Return Value integer

public function QuadrantMatches3D(coordsBig, sBig, q, coordsSmall, sSmall, flip, tol) result(matched)

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.

Arguments

TypeIntentOptionalAttributesName
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

Return Value logical

public pure function elementid(i, j, k, ti, tj, tk, nxpertile, nypertile, nzpertile, ntilex, ntiley, ntilez) result(eid)

Arguments

TypeIntentOptionalAttributesName
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

Return Value integer

public pure function gid2eid(gx, gy, gz, nxpertile, nypertile, nzpertile, ntilex, ntiley, ntilez) result(eid)

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).

Arguments

TypeIntentOptionalAttributesName
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

Return Value integer


Subroutines

public pure subroutine FlipFaceCoords3D(u, v, flip, u2, v2)

Coordinate form of MortarFaceMap: maps receiver-face coordinates (u,v) to donor-face coordinates (u2,v2) for each of the eight SELF face flips.

Arguments

TypeIntentOptionalAttributesName
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

public subroutine Free_Mesh3D_t(this)

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(inout) :: this

public subroutine Init_Mesh3D_t(this, nGeo, nElem, nSides, nNodes, nBCs)

Arguments

TypeIntentOptionalAttributesName
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

public subroutine MatchFaces3D(coordsA, sA, coordsB, sB, tol, matched, flip)

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.

Arguments

TypeIntentOptionalAttributesName
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

public pure subroutine MortarFaceMap(i, j, N, flip, i2, j2)

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.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: i
integer, intent(in) :: j
integer, intent(in) :: N
integer, intent(in) :: flip
integer, intent(out) :: i2
integer, intent(out) :: j2

public subroutine Read_HOHQMesh_Mesh3D_t(this, meshFile, 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.

Read more…

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(out) :: this
character, intent(in) :: meshFile
integer, intent(in), optional :: comm

public subroutine Read_HOPr_Mesh3D_t(this, meshFile, comm)

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(out) :: this
character, intent(in) :: meshFile
integer, intent(in), optional :: comm

public subroutine RecalculateFlip_Mesh3D_t(this)

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(inout) :: this

public subroutine ResetBoundaryConditionType_Mesh3D_t(this, bcid)

This method can be used to reset all of the boundary elements boundary condition type to the desired value.

Read more…

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(inout) :: this
integer, intent(in) :: bcid

public subroutine SimpleMortarMesh_Mesh3D_t(this, dx, bcids, comm, flips)

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.

Read more…

Arguments

TypeIntentOptionalAttributesName
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)

public subroutine UniformPeriodicMesh_Mesh3D_t(this, nxPerTile, nyPerTile, nzPerTile, nTileX, nTileY, nTileZ, dx, dy, dz, 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.

Read more…

Arguments

TypeIntentOptionalAttributesName
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

public subroutine UniformStructuredMesh_Mesh3D_t(this, nxPerTile, nyPerTile, nzPerTile, nTileX, nTileY, nTileZ, dx, dy, dz, bcids, 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.

Read more…

Arguments

TypeIntentOptionalAttributesName
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

public subroutine UpdateDevice_Mesh3D_t(this)

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(inout) :: this

public subroutine Write_Mesh3D_t(this, meshFile)

Arguments

TypeIntentOptionalAttributesName
class(Mesh3D_t), intent(inout) :: this
character, intent(in) :: meshFile

public subroutine build_nodeCoords_for_hex(mesh, e, nGeo, allCorners, allFlags, allFaces, nodeXYZ)

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.

Arguments

TypeIntentOptionalAttributesName
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(:,:)