Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High order element related enhancement #298

Merged
merged 46 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5d62fd4
Updates in IntegerUtility
vickysharma0812 Feb 1, 2024
c801d77
Updates in IntegerUtility (#284)
vickysharma0812 Feb 1, 2024
a07dbdf
Adding Append Methods
vickysharma0812 Feb 3, 2024
34d739c
Adding Append Methods (#285)
vickysharma0812 Mar 9, 2024
52ee7af
Updates in ReferenceElements
vickysharma0812 Mar 8, 2024
f598894
Updates in ReferenceElements (#286)
vickysharma0812 Mar 9, 2024
270f1c8
Updates in Reference triangle
vickysharma0812 Mar 8, 2024
05f8bb0
Updates in Reference triangle (#287)
vickysharma0812 Mar 9, 2024
ac4c21c
Updates in Reference quadrangle
vickysharma0812 Mar 8, 2024
9730d57
Updates in Reference quadrangle (#288)
vickysharma0812 Mar 9, 2024
dd5a0db
Updates in Reference Tetrahedron
vickysharma0812 Mar 8, 2024
94b8036
Updates in Reference Tetrahedron (#289)
vickysharma0812 Mar 9, 2024
a3e27c0
Update in Reference Hexahedron
vickysharma0812 Mar 8, 2024
bdb5ee0
Update in Reference Hexahedron (#290)
vickysharma0812 Mar 9, 2024
71e52ca
Updates in reference prism
vickysharma0812 Mar 9, 2024
1d1e9cf
Updates in reference prism (#291)
vickysharma0812 Mar 9, 2024
18558aa
Minor updates in ReferenceElements
vickysharma0812 Mar 9, 2024
f08abfd
Minor updates in ReferenceElements (#292)
vickysharma0812 Mar 9, 2024
7d804dc
Updates in RefElem FaceElemType
vickysharma0812 Mar 11, 2024
41f40e8
Updates in RefElem FaceElemType (#293)
vickysharma0812 Mar 12, 2024
0a70345
Updating ReallocateUtility
vickysharma0812 Mar 12, 2024
e2eb58e
Updating ReallocateUtility (#294)
vickysharma0812 Mar 12, 2024
71d9e57
Updates in ReferenceElement
vickysharma0812 Mar 14, 2024
db930aa
Updates in ReferenceElement (#295)
vickysharma0812 Mar 14, 2024
8b9d740
Updates in ReferenceElement_Method
vickysharma0812 Mar 20, 2024
1326b8c
Updates in ReferenceElement_Method (#296)
vickysharma0812 Mar 21, 2024
608aff9
EASIFEM-3
vickysharma0812 Mar 21, 2024
1a0124a
EASIFEM-3
vickysharma0812 Mar 21, 2024
411d607
EASIFEM-4
vickysharma0812 Mar 22, 2024
cbe5fa1
EASIFEM-4
vickysharma0812 Mar 22, 2024
fa79f37
EASIFEM-4
vickysharma0812 Mar 22, 2024
4f0e6de
EASIFEM-4
vickysharma0812 Mar 22, 2024
2506fad
EASIFEM-5
vickysharma0812 Mar 22, 2024
76c8788
EASIFEM-4
vickysharma0812 Mar 22, 2024
e5f275b
EASIFEM-5
vickysharma0812 Mar 22, 2024
5c00d30
EASIFEM-6
vickysharma0812 Mar 22, 2024
3178e31
EASIFEM-9
vickysharma0812 Mar 22, 2024
f25455e
EASIFEM-5
vickysharma0812 Mar 22, 2024
cefc637
EASIFEM-6
vickysharma0812 Mar 22, 2024
9d3c25b
EASIFEM-11
vickysharma0812 Mar 22, 2024
630bf8e
EASIFEM-16
vickysharma0812 Mar 22, 2024
26cca19
EASIFEM-12 adding face connectivity for tetrahedron10
shishiousan Mar 22, 2024
e60be4d
EASIFEM-14
vickysharma0812 Mar 22, 2024
b0f08dc
EASIFEM-12 adding face connectivity for hexahedron27
shishiousan Mar 22, 2024
beb2df9
Merge pull request #297 from easifem/EASIFEM-3-create-facet-elements-…
shishiousan Mar 22, 2024
5d31b06
EASIFEM-14
vickysharma0812 Mar 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 216 additions & 3 deletions src/modules/Geometry/src/ReferenceElement_Method.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,20 @@ MODULE ReferenceElement_Method
PUBLIC :: TotalEntities
PUBLIC :: FacetTopology
PUBLIC :: GetVTKelementType
PUBLIC :: GetEdgeConnectivity
PUBLIC :: GetFaceConnectivity
PUBLIC :: GetTotalNodes
PUBLIC :: GetTotalEdges
PUBLIC :: GetTotalFaces
PUBLIC :: GetTotalCells
PUBLIC :: ReferenceElementInfo
PUBLIC :: RefElemGetGeoParam
PUBLIC :: GetFaceElemType
PUBLIC :: GetElementIndex

INTEGER(I4B), PARAMETER, PUBLIC :: REFELEM_MAX_FACES = 6
INTEGER(I4B), PARAMETER, PUBLIC :: REFELEM_MAX_EDGES = 12
INTEGER(I4B), PARAMETER, PUBLIC :: REFELEM_MAX_POINTS = 8

!----------------------------------------------------------------------------
! ReferenceElementInfo_
Expand All @@ -92,9 +102,9 @@ MODULE ReferenceElement_Method
& Triangle, &
& Quadrangle, &
& Tetrahedron, Hexahedron, Prism, Pyramid]
INTEGER(I4B) :: maxFaces = 6
INTEGER(I4B) :: maxEdges = 12
INTEGER(I4B) :: maxPoints = 8
INTEGER(I4B) :: maxFaces = REFELEM_MAX_FACES
INTEGER(I4B) :: maxEdges = REFELEM_MAX_EDGES
INTEGER(I4B) :: maxPoints = REFELEM_MAX_POINTS
INTEGER(I4B) :: tCells(8) = [0, 0, 0, 0, 1, 1, 1, 1]
!! Here cell is a topology for which xidim = 3
INTEGER(I4B) :: tFaces(8) = [0, 0, 1, 1, 4, 6, 5, 5]
Expand All @@ -120,6 +130,58 @@ MODULE ReferenceElement_Method
TYPE(ReferenceElementInfo_), PARAMETER :: ReferenceElementInfo = &
& ReferenceElementInfo_()

!----------------------------------------------------------------------------
! GetElementIndex@GeometryMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2024-03-19
! summary: Returns the index of an element based on its topology
!
!# Introduction
!
! Point 1
! Line 2
! Triangle 3
! Quadrangle 4
! Tetrahedron 5
! Hexahedron 6
! Prism 7
! Pyramid 8

INTERFACE
MODULE PURE FUNCTION GetElementIndex(elemType) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B) :: ans
END FUNCTION GetElementIndex
END INTERFACE

!----------------------------------------------------------------------------
! RefElemGetGeoParam@GeometryMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2024-03-09
! summary: Returns the geometry parameters

INTERFACE RefElemGetGeoParam
MODULE PURE SUBROUTINE RefElemGetGeoParam1(elemType, tNodes, tEdges, &
& tFaces, tCells, edgeCon, faceCon, edgeOpt, faceOpt, faceElemType, &
& tFaceNodes)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tNodes
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tEdges
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaces
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tCells
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: edgeCon(:, :)
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: faceCon(:, :)
INTEGER(I4B), OPTIONAL, INTENT(IN) :: edgeOpt
INTEGER(I4B), OPTIONAL, INTENT(IN) :: faceOpt
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: faceElemType(:)
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaceNodes(:)
END SUBROUTINE RefElemGetGeoParam1
END INTERFACE RefElemGetGeoParam

!----------------------------------------------------------------------------
! GetTotalEdges@GeometryMethods
!----------------------------------------------------------------------------
Expand All @@ -135,6 +197,93 @@ MODULE PURE FUNCTION GetTotalEdges1(elemType) RESULT(ans)
END FUNCTION GetTotalEdges1
END INTERFACE GetTotalEdges

!----------------------------------------------------------------------------
! GetEdgeConnectivity@GeometryMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2024-03-07
! summary: Returns number of edges in the element

INTERFACE GetEdgeConnectivity
MODULE PURE SUBROUTINE GetEdgeConnectivity1(elemType, con, opt)
INTEGER(I4B), INTENT(IN) :: elemType
!! name of element
INTEGER(I4B), INTENT(INOUT) :: con(:, :)
!! Connectivity
!! The columns represents the face number
!! The row represents a face
!! con should be allocated by the user
INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt
!! If opt = 1, then edge connectivity for hierarchial approximation
!! If opt =2, then edge connectivity for Lagrangian approximation
!! opt=1 is default
END SUBROUTINE GetEdgeConnectivity1
END INTERFACE GetEdgeConnectivity

!----------------------------------------------------------------------------
! GetFaceConnectivity@GeometryMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2024-03-07
! summary: Returns number of edges in the element

INTERFACE GetFaceConnectivity
MODULE PURE SUBROUTINE GetFaceConnectivity1(elemType, con, opt)
INTEGER(I4B), INTENT(IN) :: elemType
!! name of element
INTEGER(I4B), INTENT(INOUT) :: con(:, :)
!! Connectivity
!! The columns represents the face number
!! The row represents a face
!! con should be allocated by the user
INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt
!! If opt = 1, then edge connectivity for hierarchial approximation
!! If opt = 2, then edge connectivity for Lagrangian approximation
!! opt = 1 is default
END SUBROUTINE GetFaceConnectivity1
END INTERFACE GetFaceConnectivity

!----------------------------------------------------------------------------
! GetFaceElemType@GeometryMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2024-03-11
! summary: Returns the element type of each face

INTERFACE GetFaceElemType
MODULE PURE SUBROUTINE GetFaceElemType1(elemType, faceElemType, opt, &
& tFaceNodes)
INTEGER(I4B), INTENT(IN) :: elemType
!! name of element
INTEGER(I4B), INTENT(INOUT) :: faceElemType(:)
!! Element names of faces
INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaceNodes(:)
!! Total number of nodes in each face
INTEGER(I4B), OPTIONAL, INTENT(IN) :: opt
!! If opt = 1, then edge connectivity for hierarchial approximation
!! If opt = 2, then edge connectivity for Lagrangian approximation
!! opt = 1 is default
END SUBROUTINE GetFaceElemType1
END INTERFACE GetFaceElemType

!----------------------------------------------------------------------------
! GetTotalNodes@GeometryMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2023-08-14
! summary: Returns number of nodes (vertices) in the element

INTERFACE GetTotalNodes
MODULE PURE FUNCTION GetTotalNodes1(elemType) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B) :: ans
END FUNCTION GetTotalNodes1
END INTERFACE GetTotalNodes

!----------------------------------------------------------------------------
! GetTotalFaces@GeometryMethods
!----------------------------------------------------------------------------
Expand Down Expand Up @@ -1011,6 +1160,22 @@ END FUNCTION refelem_FacetElements
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE FacetElements
MODULE FUNCTION refelem_FacetElements_elemType(elemType, nsd) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B), INTENT(IN) :: nsd
TYPE(ReferenceElement_), ALLOCATABLE :: ans(:)
END FUNCTION refelem_FacetElements_elemType
END INTERFACE FacetElements

!----------------------------------------------------------------------------
! FacetElements@FacetElementMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE
MODULE SUBROUTINE refelem_FacetElements_Line(refelem, ans)
CLASS(ReferenceElement_), INTENT(IN) :: refelem
Expand All @@ -1026,6 +1191,22 @@ END SUBROUTINE refelem_FacetElements_Line
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE
MODULE SUBROUTINE refelem_FacetElements_Line_elemType(elemType, nsd, ans)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B), INTENT(IN) :: nsd
TYPE(ReferenceElement_), INTENT(INOUT) :: ans(:)
END SUBROUTINE refelem_FacetElements_Line_elemType
END INTERFACE

!----------------------------------------------------------------------------
! FacetElements@FacetElementMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE
MODULE SUBROUTINE refelem_FacetElements_Surface(refelem, ans)
CLASS(ReferenceElement_), INTENT(IN) :: refelem
Expand All @@ -1041,13 +1222,45 @@ END SUBROUTINE refelem_FacetElements_Surface
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE
MODULE SUBROUTINE refelem_FacetElements_Surface_elemType(elemType, nsd, ans)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B), INTENT(IN) :: nsd
TYPE(ReferenceElement_), INTENT(INOUT) :: ans(:)
END SUBROUTINE refelem_FacetElements_Surface_elemType
END INTERFACE

!----------------------------------------------------------------------------
! FacetElements@FacetElementMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE
MODULE SUBROUTINE refelem_FacetElements_Volume(refelem, ans)
CLASS(ReferenceElement_), INTENT(IN) :: refelem
TYPE(ReferenceElement_), INTENT(INOUT) :: ans(:)
END SUBROUTINE refelem_FacetElements_Volume
END INTERFACE

!----------------------------------------------------------------------------
! FacetElements@FacetElementMethods
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 16 June 2021
! summary: This routine returns the facet elements

INTERFACE
MODULE SUBROUTINE refelem_FacetElements_Volume_elemType(elemType, nsd, ans)
INTEGER(I4B), INTENT(IN) :: elemType
INTEGER(I4B), INTENT(IN) :: nsd
TYPE(ReferenceElement_), INTENT(INOUT) :: ans(:)
END SUBROUTINE refelem_FacetElements_Volume_elemType
END INTERFACE

!----------------------------------------------------------------------------
! FacetTopology@GeometryMethods
!----------------------------------------------------------------------------
Expand Down
Loading
Loading