Skip to main content

Display

Inheritence

This method is inherited from the AbstractMesh class.

Display

Displays comprehensive information about the AbstractMesh_ object including its properties, status flags, and data structures.

Interface

INTERFACE AbstractMeshDisplay
MODULE SUBROUTINE obj_Display(obj, msg, unitno)
CLASS(AbstractMesh_), INTENT(INOUT) :: obj
!! mesh object
CHARACTER(*), INTENT(IN) :: msg
!! message on screen
INTEGER(I4B), OPTIONAL, INTENT(IN) :: unitno
!! unit number of ouput file
END SUBROUTINE obj_Display
END INTERFACE AbstractMeshDisplay

Arguments

  • obj: The AbstractMesh_ object to be displayed
  • msg: A message to display at the beginning of the output
  • unitno: Optional output unit number (defaults to stdout if not provided)

Description

This method displays all the properties of the AbstractMesh_ object, including:

  • Initialization and status flags (isInitiated, showTime, readFromFile, etc.)
  • Element topology information (number of elements by topology type)
  • Mesh dimensions (nsd, xidim)
  • Node and element counts (tNodes, tElements, tEdges, tFaces)
  • Boundary information (minX, maxX, minY, maxY, minZ, maxZ)
  • Centroid coordinates (X, Y, Z)
  • Allocation status of various arrays (boundingEntity, local_elemNumber, etc.)
  • Data structure sizes (nodeData, elementData, facetData)
  • Status of KDTree data structures

The method first displays the provided message, then checks if the mesh is initialized before displaying the remaining information.

Example

Display method of FEMesh.

!> author: Vikas Sharma, Ph. D.
! date: 2025-06-01
! summary: Display method is tested in this example.

PROGRAM main
USE FEMesh_Class, only: FEMesh_
USE HDF5File_Class, only: HDF5File_
USE GlobalData, ONLY: I4B
USE Test_Method, ONLY: OK

IMPLICIT NONE

TYPE(FEMesh_) :: obj
TYPE(HDF5File_) :: meshfile
CHARACTER(LEN=*), PARAMETER :: filename = "./meshdata/small_tri6_mesh.h5"

INTEGER(I4B), PARAMETER :: nsd = 2

CALL meshfile%Initiate(FileName=filename, MODE="READ")
CALL meshfile%OPEN()
CALL obj%Initiate(hdf5=meshfile, dim=nsd)
CALL obj%Display("FEMesh")

CALL obj%DEALLOCATE()
CALL meshfile%DEALLOCATE()
END PROGRAM main

The result of this example is given below.

results
Mesh object initiated: TRUE
showTime: FALSE
readFromFile: TRUE
isNodeToElementsInitiated: FALSE
isNodeToNodesInitiated: FALSE
isExtraNodeToNodesInitiated: FALSE
isElementToElementsInitiated: TRUE
isEdgeConnectivityInitiated: FALSE
isFaceConnectivityInitiated: TRUE
isBoundaryDataInitiated: FALSE
isFacetDataInitiated: FALSE
uid: 1
Total elements (topology wise)
==============================
point: 0
line: 0
triangle: 14
quadrangle: 0
tetrahedron: 0
hexahedron: 0
prism: 0
pyramid: 0

Total topologies: 1
Topologies(1): Triangle3
maxNNE: 6
nsd: 2
xidim: 2
maxNptrs: 37
minNptrs: 1
maxElemNum: 26
minElemNum: 13
tNodes: 37
tEdges: 0
tFaces: 25
tElements: 14
minX: 0.00000
maxX: 2.00000
minY: 0.00000
maxY: 2.00000
minZ: 0.00000
maxZ: 0.00000
X: 0.00000
Y: 0.00000
Z: 0.00000
boundingEntity ALLOCATED: TRUE
boundingEntity:
----------------
1
2
3
4
local_elemNumber ALLOCATED: TRUE
local_nptrs ALLOCATED: TRUE
quality ALLOCATED: FALSE
facetElementType ALLOCATED: FALSE
nodeData ALLOCATED: TRUE
nodeData Size: 37
elementData ALLOCATED: TRUE
elementData Size: 14
facetData ALLOCATED: FALSE
kdtree Associated: FALSE
kdresult Allocated: FALSE