Skip to main content

DisplayElementData

Inheritence

This method is inherited from the AbstractMesh class.

DisplayElementData

Displays detailed information about element data in the mesh, either for a specific element or all elements.

Interface

INTERFACE
MODULE SUBROUTINE DisplayElementData(obj, msg, unitno, globalElement, &
islocal)
CLASS(AbstractMesh_), INTENT(INOUT) :: obj
!! object
CHARACTER(*), INTENT(IN) :: msg
!! message
INTEGER(I4B), OPTIONAL, INTENT(IN) :: unitno
!! unit number
INTEGER(I4B), OPTIONAL, INTENT(IN) :: globalElement
!! global element number
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: islocal
!! if true then globalElement is local
END SUBROUTINE DisplayElementData
END INTERFACE

Arguments

  • obj: The AbstractMesh_ object containing element data to display
  • msg: A message to display at the beginning of the output
  • unitno: Optional output unit number (defaults to stdout if not provided)
  • globalElement: Optional global element number to display; if not provided, all elements are displayed
  • islocal: Optional flag indicating if globalElement is a local element number

Description

This method displays element data in two possible modes:

  1. If globalElement is provided, it displays information for only that specific element
  2. Otherwise, it iterates through all elements in the mesh and displays their data

For each element, it calls elemData_Display to show:

  • Element number (local and global)
  • Element type and properties
  • Node connectivity
  • Boundary information
  • Material properties
  • Any other element-specific data

A blank line is inserted between element entries for better readability.

Example 1

This example shows how to use DisplayElementData method to display the content of element data inside the mesh.

!> author: Vikas Sharma, Ph. D.
! date: 2025-06-02
! summary: Testing DisplayElementData method of FEMesh class

PROGRAM main
USE FEMesh_Class
use HDF5File_Class
use GlobalData

IMPLICIT NONE

TYPE(FEMesh_) :: obj
TYPE(HDF5File_) :: meshfile
INTEGER(I4B), ALLOCATABLE :: nptrs(:)
INTEGER(I4B) :: iel, ii
CHARACTER(LEN=*), PARAMETER :: filename = "./meshdata/small_tri3_mesh.h5"

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

CALL obj%DisplayElementData("element data")

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

Example 2

This example shows how to use DisplayElementData method to display the content of element data inside the mesh.

!> author: Vikas Sharma, Ph. D.
! date: 2025-06-02
! summary: Testing DisplayElementData method of FEMesh class

PROGRAM main
USE FEMesh_Class
USE HDF5File_Class
USE GlobalData

IMPLICIT NONE

TYPE(FEMesh_) :: obj
TYPE(HDF5File_) :: meshfile
INTEGER(I4B), ALLOCATABLE :: nptrs(:)
INTEGER(I4B) :: iel, ii
CHARACTER(LEN=*), PARAMETER :: filename = "./meshdata/small_tri3_mesh.h5"

CALL meshfile%Initiate(FileName=filename, MODE="READ")
CALL meshfile%OPEN()
CALL obj%Initiate(hdf5=meshfile, dim=2)
CALL obj%DisplayElementData("element data:", globalElement=1, islocal=.TRUE.)

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