GetMeshID
This routine returns the mesh-ids of the domain region defined in an instance of MeshSelection.
Interface
- Interface
- example
- ↢ close
INTERFACE
MODULE PURE FUNCTION GetMeshID(obj, dim) RESULT(Ans)
CLASS(MeshSelection_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: dim
INTEGER(I4B), ALLOCATABLE :: ans(:)
END FUNCTION GetMeshID
END INTERFACE
dimdenotes the dimension of the mesh.dim=0mesh of points.dim=1, mesh of lines.dim=2, mesh of surfaces.dim=3, mesh of volumes.
This example shows the use of getMeshID method.
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( MeshSelection_ ) :: obj
CALL obj%Initiate( isSelectionByMeshID=.TRUE. )
CALL obj%Add( dim=0, meshID=[1,2,3,4,5,6])
CALL obj%Add( dim=1, meshID=[2,5,6,7])
CALL obj%Add( dim=2, meshID=[1,3,5,6,8])
CALL obj%Add( dim=3, meshID=[1,8])
CALL obj%Set()
CALL OK( ALL([1,2,3,4,5,6] .EQ. obj%getMeshID(0)), "getMeshID" )
CALL OK( ALL([2,5,6,7] .EQ. obj%getMeshID(1)), "getMeshID" )
CALL OK( ALL([1,3,5,6,8] .EQ. obj%getMeshID(2)), "getMeshID" )
CALL OK( ALL([1,8] .EQ. obj%getMeshID(3)), "getMeshID" )
CALL obj%Deallocate()
END PROGRAM main