📁 AbstractRefElement
Abstract class for reference element.
Structure
TYPE, ABSTRACT :: AbstractRefElement_
PRIVATE
REAL(DFP), ALLOCATABLE :: xij(:, :)
!! Nodal coordinates
INTEGER(I4B) :: entityCounts(4) = 0_I4B
!! Number of 0D, 1D, 2D, 3D subentities in the reference element
INTEGER(I4B) :: xiDimension = -1_I4B
!! Xidimension elemType
!! 0 is for point
!! 1 is for line
!! 2 is for surface
!! 3 is for volume
INTEGER(I4B) :: name = -1_I4B
!! name of the element
TYPE(String) :: nameStr
!! name of the element
INTEGER(I4B) :: nsd = -1_I4B
!! Number of spatial dimensions
TYPE(Topology_), PUBLIC, ALLOCATABLE :: pointTopology(:)
!! Topology information of points
TYPE(Topology_), PUBLIC, ALLOCATABLE :: edgeTopology(:)
!! Topology information of edges
TYPE(Topology_), PUBLIC, ALLOCATABLE :: faceTopology(:)
!! Topology information of facet
TYPE(Topology_), PUBLIC, ALLOCATABLE :: cellTopology(:)
!! Topology information of cells
DeferredMethods
GetName
This method should return the integer code of reference elements.
Interace:
PURE FUNCTION GetName(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION GetName
GetFacetElements
This routine returns the facet elements
Interface:
ABSTRACT INTERFACE
SUBROUTINE GetFacetElements(obj, ans)
IMPORT AbstractRefElement_, AbstractRefElementPointer_
CLASS(AbstractRefElement_), INTENT(IN) :: obj
TYPE(AbstractRefElementPointer_), ALLOCATABLE :: ans(:)
END SUBROUTINE GetFacetElements
END INTERFACE
GenerateTopology
Returns the topology of reference element.
Interface:
ABSTRACT INTERFACE
SUBROUTINE GenerateTopology(obj)
IMPORT AbstractRefElement_, Topology_
CLASS(AbstractRefElement_), INTENT(INOUT) :: obj
END SUBROUTINE GenerateTopology
END INTERFACE
Methods
Initiate
Initiate an instance of reference element
Interface:
INTERFACE
MODULE SUBROUTINE Initiate(obj, nsd)
CLASS(AbstractRefElement_), INTENT(INOUT) :: obj
INTEGER(I4B), INTENT(IN) :: nsd
END SUBROUTINE Initiate
END INTERFACE
GetTopology
Return the topology of subentities.
- If
xidim=0
then the topology of points is returned - If
xidim=1
then the topology of edges is returned - If
xidim=2
then the topology of faces is returned - If
xidim=3
then the topology of cell is returned
If xidim
is absent then all the topologies are returned.
Interace:
INTERFACE
MODULE PURE FUNCTION GetTopology(obj, xidim) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B), OPTIONAL, INTENT(IN) :: xidim
TYPE(Topology_), ALLOCATABLE :: ans(:)
END FUNCTION GetTopology
END INTERFACE
Assignment(=)
Copy one reference elements.
Interface:
INTERFACE
MODULE PURE SUBROUTINE Copy(obj, obj2)
CLASS(AbstractRefElement_), INTENT(INOUT) :: obj
CLASS(AbstractRefElement_), INTENT(IN) :: obj2
END SUBROUTINE Copy
END INTERFACE
Deallocate
Deallocate the data stored inside reference element.
Interface:
INTERFACE
MODULE PURE SUBROUTINE Deallocate(obj)
CLASS(AbstractRefElement_), INTENT(INOUT) :: obj
END SUBROUTINE Deallocate
END INTERFACE
Display
Display the content of reference element.
INTERFACE
MODULE SUBROUTINE Display(obj, msg, unitno)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
CHARACTER(LEN=*), INTENT(IN) :: msg
INTEGER(I4B), INTENT(IN), OPTIONAL :: unitno
END SUBROUTINE Display
END INTERFACE
GetNNE
Get the number of node inside the element.
INTERFACE
MODULE ELEMENTAL FUNCTION GetNNE(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION GetNNE
END INTERFACE
GetNSD
Get the number of spatial dimension.
INTERFACE
MODULE ELEMENTAL FUNCTION GetNSD(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION GetNSD
END INTERFACE
GetXidimension
Get the xidimension.
INTERFACE
MODULE ELEMENTAL FUNCTION GetXidimension(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION GetXidimension
END INTERFACE
GetElementTopology
Get the element topology.
Interface:
INTERFACE
MODULE ELEMENTAL FUNCTION GetElementTopology(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B) :: ans
END FUNCTION GetElementTopology
END INTERFACE
GetNptrs
Get the node numbers of reference element.
Interface:
INTERFACE
MODULE PURE FUNCTION GetNptrs(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B), ALLOCATABLE :: ans(:)
END FUNCTION GetNptrs
END INTERFACE
GetFacetMatrix
Get the facet matrix
Interface:
INTERFACE
MODULE PURE FUNCTION GetFacetMatrix(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
INTEGER(I4B), ALLOCATABLE :: ans(:, :)
END FUNCTION GetFacetMatrix
END INTERFACE
GetNodeCoord
Get the node coordinates in format.
Interface:
INTERFACE
MODULE PURE FUNCTION GetNodeCoord(obj) RESULT(ans)
CLASS(AbstractRefElement_), INTENT(IN) :: obj
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION GetNodeCoord
END INTERFACE
SetParam
Set the parameters of reference element.
Interface:
INTERFACE
MODULE PURE SUBROUTINE refelem_SetParam(obj, xij, entityCounts, &
& xidimension, name, nameStr, nsd, &
& pointTopology, edgeTopology, faceTopology, cellTopology)
CLASS(AbstractRefElement_), INTENT(INOUT) :: obj
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
INTEGER(I4B), OPTIONAL, INTENT(IN) :: entityCounts(4)
INTEGER(I4B), OPTIONAL, INTENT(IN) :: xidimension
INTEGER(I4B), OPTIONAL, INTENT(IN) :: name
CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: nameStr
INTEGER(I4B), OPTIONAL, INTENT(IN) :: nsd
TYPE(Topology_), OPTIONAL, INTENT(IN) :: pointTopology(:)
TYPE(Topology_), OPTIONAL, INTENT(IN) :: edgeTopology(:)
TYPE(Topology_), OPTIONAL, INTENT(IN) :: faceTopology(:)
TYPE(Topology_), OPTIONAL, INTENT(IN) :: cellTopology(:)
END SUBROUTINE refelem_SetParam
END INTERFACE