Skip to main content

GetParam

The GetParam method retrieves various parameters and properties of the mesh. It provides a comprehensive way to access mesh attributes in a single call.

Interface

INTERFACE
MODULE SUBROUTINE obj_GetParam(obj, &
isInitiated, isNodeToElementsInitiated, isNodeToNodesInitiated, &
isExtraNodeToNodesInitiated, isElementToElementsInitiated, &
isBoundaryDataInitiated, isFacetDataInitiated, uid, &
xidim, elemType, nsd, maxNptrs, minNptrs, &
maxElemNum, minElemNum, tNodes, tElements, &
minX, minY, minZ, maxX, maxY, maxZ, &
x, y, z, tElements_topology_wise, tElemTopologies, elemTopologies)

CLASS(AbstractMesh_), INTENT(IN) :: obj
LOGICAL(LGT), OPTIONAL, INTENT(OUT) :: isInitiated, &
isNodeToElementsInitiated, isNodeToNodesInitiated, &
isExtraNodeToNodesInitiated, isElementToElementsInitiated, &
isBoundaryDataInitiated, isFacetDataInitiated

INTEGER(I4B), OPTIONAL, INTENT(OUT) :: uid, xidim, elemType, nsd, &
maxNptrs, minNptrs, maxElemNum, minElemNum, tNodes, &
tElements, tElements_topology_wise(8), tElemTopologies, elemTopologies(8)

REAL(DFP), OPTIONAL, INTENT(OUT) :: minX, minY, minZ, maxX, maxY, maxZ, &
x, y, z
END SUBROUTINE obj_GetParam
END INTERFACE

Syntax

CALL mesh%GetParam([isInitiated], [isNodeToElementsInitiated], [...])

Parameters

All parameters are optional:

ParameterTypeIntentDescription
objCLASS(AbstractMesh_)INThe mesh object
isInitiatedLOGICAL(LGT)OUTFlag indicating if mesh is initiated
isNodeToElementsInitiatedLOGICAL(LGT)OUTFlag for node-to-elements mapping status
isNodeToNodesInitiatedLOGICAL(LGT)OUTFlag for node-to-nodes mapping status
isExtraNodeToNodesInitiatedLOGICAL(LGT)OUTFlag for extra node-to-nodes mapping status
isElementToElementsInitiatedLOGICAL(LGT)OUTFlag for element-to-elements mapping status
isBoundaryDataInitiatedLOGICAL(LGT)OUTFlag for boundary data status
isFacetDataInitiatedLOGICAL(LGT)OUTFlag for facet data status
uidINTEGER(I4B)OUTUnique ID of the mesh
xidimINTEGER(I4B)OUTIntrinsic dimension of elements
elemTypeINTEGER(I4B)OUTElement type
nsdINTEGER(I4B)OUTNumber of spatial dimensions
maxNptrsINTEGER(I4B)OUTMaximum node number
minNptrsINTEGER(I4B)OUTMinimum node number
maxElemNumINTEGER(I4B)OUTMaximum element number
minElemNumINTEGER(I4B)OUTMinimum element number
tNodesINTEGER(I4B)OUTTotal number of nodes
tElementsINTEGER(I4B)OUTTotal number of elements
tElements_topology_wiseINTEGER(I4B)(8)OUTElements count by topology
tElemTopologiesINTEGER(I4B)OUTTotal element topologies
elemTopologiesINTEGER(I4B)(8)OUTElement topology types
minX, minY, minZREAL(DFP)OUTMinimum coordinates of mesh
maxX, maxY, maxZREAL(DFP)OUTMaximum coordinates of mesh
x, y, zREAL(DFP)OUTCentroid coordinates of mesh

Description

GetParam provides a flexible way to retrieve various mesh parameters in a single method call. It allows retrieving any combination of mesh properties such as initialization status flags, mesh dimensions, node and element counts, boundary information, and spatial extents.

Implementation Details

The implementation simply assigns the requested mesh attributes to the corresponding output parameters if they are present in the call. All parameters are optional, so only the needed parameters are processed.

MODULE PROCEDURE obj_GetParam
IF (PRESENT(isInitiated)) isInitiated = obj%isInitiated
IF (PRESENT(isNodeToElementsInitiated)) isNodeToElementsInitiated = obj%isNodeToElementsInitiated
...
END PROCEDURE obj_GetParam

Example Usage

TYPE(Mesh_) :: mesh
INTEGER(I4B) :: totalNodes, totalElements, dimensions
REAL(DFP) :: xMin, xMax, yMin, yMax, zMin, zMax

! Initialize mesh...

! Get multiple mesh parameters in a single call
CALL mesh%GetParam(tNodes=totalNodes, tElements=totalElements, nsd=dimensions, &
minX=xMin, maxX=xMax, minY=yMin, maxY=yMax, minZ=zMin, maxZ=zMax)

! Display mesh information
PRINT *, "Mesh has", totalNodes, "nodes and", totalElements, "elements"
PRINT *, "Dimensions:", dimensions
PRINT *, "X range:", xMin, "to", xMax
PRINT *, "Y range:", yMin, "to", yMax
PRINT *, "Z range:", zMin, "to", zMax

See Also

  • SetParam: Sets mesh parameters
  • Individual getter methods for specific parameters (GetTotalNodes, GetTotalElements, etc.)