| 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 |
Create a six-element mesh with two 2:1 mortar interfaces, used to validate the mortar machinery in configurations the SimpleMortarMesh cannot reach:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(out) | :: | this | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| integer, | intent(in) | :: | bcids(1:4) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | nGeo | |||
| integer, | intent(in) | :: | nElem | |||
| integer, | intent(in) | :: | nSides | |||
| integer, | intent(in) | :: | nNodes | |||
| integer, | intent(in) | :: | nBCs |
Reader for HOHQMesh text mesh files in the ISM and ISM-MM formats. The format is auto-detected from the first line: * Line equal to "ISM-MM" (trimmed) => ISM-MM with per-element material name strings and a 4-int count line that includes an unused nEdges field (the ISM-MM writer in HOHQMesh does NOT emit an edge block). * Anything else is treated as plain ISM: the first line is itself the count line "nNodes nElems polyOrder" and there are no per-element material names.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(out) | :: | this | |||
| character, | intent(in) | :: | meshFile |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(out) | :: | this | |||
| character, | intent(in) | :: | meshFile |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_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(Mesh2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | bcid |
Create the smallest 2:1 nonconforming (mortar) mesh: one "big" element of size 2dx x 2dx whose east edge is shared with the west edges of two "small" dx x dx elements. The mesh is conforming everywhere except at the single mortar interface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(out) | :: | this | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| integer, | intent(in) | :: | bcids(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). Tiling is used to determine the element ordering.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nxPerTile | |||
| integer, | intent(in) | :: | nyPerTile | |||
| integer, | intent(in) | :: | nTileX | |||
| integer, | intent(in) | :: | nTileY | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | dy | |||
| integer, | intent(in) | :: | bcids(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). Tiling is used to determine the element ordering.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(out) | :: | this | |||
| integer, | intent(in) | :: | nxPerTile | |||
| integer, | intent(in) | :: | nyPerTile | |||
| integer, | intent(in) | :: | nTileX | |||
| integer, | intent(in) | :: | nTileY | |||
| real(kind=prec), | intent(in) | :: | dx | |||
| real(kind=prec), | intent(in) | :: | dy | |||
| integer, | intent(in) | :: | bcids(1:4) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh2D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | meshFile |
type,extends(SEMMesh) :: Mesh2D_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(:,:) :: CGNSSideMap
integer,pointer,dimension(:,:) :: BCType
character(LEN=255),allocatable :: BCNames(:)
! 2:1 nonconforming (mortar) interface bookkeeping.
!
! A mortar interface joins one "big" element edge to the two half-edges of its 2:1
! refined neighbors ("small" sides). Sides that participate in a mortar carry
! sideInfo(3) = 0 (no conforming neighbor) and sideInfo(5) = 0 (no boundary condition),
! so all conforming-side machinery (SideExchange, RecalculateFlip, boundary-condition
! mapping) skips them; sideInfo(1) is set to the mortar index for reference.
!
! mortarInfo(1:8,1:nMortars) is replicated on all ranks (element ids are global):
! 1 - big element id ; 2 - big local side id
! 3 - small element id on the sub-edge covering big-edge coordinate [-1,0]
! 4 - 10*(small local side) + flip for that sub-edge
! 5 - small element id on the sub-edge covering big-edge coordinate [0,1]
! 6 - 10*(small local side) + flip for that sub-edge
! 7 - global side id of sub-edge 1 (used as an MPI message tag)
! 8 - global side id of sub-edge 2 (used as an MPI message tag)
! flip = 0 when the small side's edge coordinate runs in the same direction as the big
! side's edge coordinate, flip = 1 when reversed (same convention as sideInfo(4)).
integer :: nMortars = 0
integer,pointer,dimension(:,:) :: mortarInfo => null()
! Material tracking: every element has an integer material id
! indexing into materialNames. Single-material readers (HOPr,
! structured, ISM, ISM-v2) leave nMaterials = 1 with the name
! "default". The 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(:)
contains
procedure,public :: Init => Init_Mesh2D_t
procedure,public :: Free => Free_Mesh2D_t
procedure,public :: UpdateDevice => UpdateDevice_Mesh2D_t
generic,public :: StructuredMesh => UniformStructuredMesh_Mesh2D_t
procedure,private :: UniformStructuredMesh_Mesh2D_t
procedure,public :: SimpleMortarMesh => SimpleMortarMesh_Mesh2D_t
procedure,public :: DoubleMortarMesh => DoubleMortarMesh_Mesh2D_t
procedure,public :: ResetBoundaryConditionType => ResetBoundaryConditionType_Mesh2D_t
procedure,public :: Read_HOPr => Read_HOPr_Mesh2D_t
procedure,public :: Read_HOHQMesh => Read_HOHQMesh_Mesh2D_t
procedure,public :: Write_Mesh => Write_Mesh2D_t
procedure,public :: RecalculateFlip => RecalculateFlip_Mesh2D_t
endtype Mesh2D_t