GetCellNumber
Inheritence
This method is inherited from the AbstractMesh class.
GetCellNumber
Returns the master and slave cell numbers of a facet element.
Interface
MODULE FUNCTION GetCellNumber(obj, facetElement, elementType) RESULT(ans)
CLASS(AbstractMesh_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: facetElement
INTEGER(I4B), INTENT(IN) :: elementType
INTEGER(I4B) :: ans(2)
END FUNCTION GetCellNumber
Description
This function returns the global element numbers of the master and slave cells associated with a facet element. The master cell is the first cell that contains the facet, and the slave cell is the second cell that contains the facet (if any).
Arguments
obj
: The abstract mesh object.facetElement
: The local facet element number.elementType
: The element type of the facet.
Returns
ans
: A 2-element array where:ans(1)
is the master cell numberans(2)
is the slave cell number (or 0 if the facet is on a boundary)
Example
INTEGER(I4B) :: facetNum = 8, facetType = 3
INTEGER(I4B) :: cellNumbers(2)
cellNumbers = mesh%GetCellNumber(facetNum, facetType)
PRINT*, "Master cell:", cellNumbers(1)
PRINT*, "Slave cell:", cellNumbers(2)