Skip to main content

GetOrientation

The GetOrientation method retrieves orientation flags for the cells, faces, and edges of a specific element. Orientation flags indicate how local entities are oriented with respect to the global reference frame.

Interface

INTERFACE
MODULE SUBROUTINE GetOrientation(obj, cellOrient, faceOrient, &
edgeOrient, tCellOrient, tFaceOrient, tEdgeOrient, globalElement, &
islocal)
CLASS(AbstractMesh_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(INOUT) :: cellOrient(:)
!! cell connectivity of element
INTEGER(I4B), INTENT(INOUT) :: faceOrient(:, :)
!! face connectivity of element
INTEGER(I4B), INTENT(INOUT) :: edgeOrient(:)
!! edge connectivity of element
INTEGER(I4B), INTENT(OUT) :: tCellOrient
!! size of data written in cellCon
INTEGER(I4B), INTENT(OUT) :: tFaceOrient(2)
!! size of data written in faceCon
!! tFaceOrient(1) is the number of rows in faceOrient
!! tFaceOrient(2) is the number of columns in faceOrient
INTEGER(I4B), INTENT(OUT) :: tEdgeOrient
!! size of data written in edgecon
INTEGER(I4B), INTENT(IN) :: globalElement
!! global or local element number
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: islocal
!! if true then global element is local element
END SUBROUTINE GetOrientation
END INTERFACE

Syntax

CALL mesh%GetOrientation(cellOrient, faceOrient, edgeOrient, tCellOrient, tFaceOrient, tEdgeOrient, globalElement, [islocal])

Parameters

ParameterTypeIntentDescription
objCLASS(AbstractMesh_)INThe mesh object
cellOrientINTEGER(I4B)(:)INOUTArray to store cell orientation flags
faceOrientINTEGER(I4B)(:,:)INOUTArray to store face orientation flags
edgeOrientINTEGER(I4B)(:)INOUTArray to store edge orientation flags
tCellOrientINTEGER(I4B)OUTSize of data written to cellOrient
tFaceOrientINTEGER(I4B)(2)OUTDimensions of data written to faceOrient
tEdgeOrientINTEGER(I4B)OUTSize of data written to edgeOrient
globalElementINTEGER(I4B)INGlobal or local element number
islocalLOGICAL(LGT)IN (optional)If true, globalElement is treated as a local element number

Description

GetOrientation retrieves orientation flags for the cells, faces, and edges of a specified element. Orientation information is crucial for maintaining consistent element definitions, particularly for higher-order elements and when performing operations that depend on the normal direction of faces.

The method populates the provided arrays with orientation flags and returns the actual sizes of data written to these arrays.

Example Usage

TYPE(Mesh_) :: mesh
INTEGER(I4B) :: elemNum
INTEGER(I4B) :: cellOrient(1), faceOrient(4, 6), edgeOrient(12)
INTEGER(I4B) :: tCellOrient, tFaceOrient(2), tEdgeOrient

! Initialize mesh, elemNum...

! Get orientation information
CALL mesh%GetOrientation(cellOrient, faceOrient, edgeOrient, &
tCellOrient, tFaceOrient, tEdgeOrient, elemNum)

! Use orientation information for accurate element integration