diff --git a/src/modules/Geometry/src/ReferenceElement_Method.F90 b/src/modules/Geometry/src/ReferenceElement_Method.F90 index a69fa0c7..9d9f6640 100644 --- a/src/modules/Geometry/src/ReferenceElement_Method.F90 +++ b/src/modules/Geometry/src/ReferenceElement_Method.F90 @@ -64,6 +64,7 @@ MODULE ReferenceElement_Method PUBLIC :: FacetTopology PUBLIC :: GetVTKelementType PUBLIC :: GetTotalEdges +PUBLIC :: GetEdgeConnectivity PUBLIC :: GetTotalFaces PUBLIC :: GetTotalCells PUBLIC :: ReferenceElementInfo @@ -135,6 +136,30 @@ 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 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 + !---------------------------------------------------------------------------- ! GetTotalFaces@GeometryMethods !---------------------------------------------------------------------------- @@ -150,6 +175,30 @@ MODULE PURE FUNCTION GetTotalFaces1(elemType) RESULT(ans) END FUNCTION GetTotalFaces1 END INTERFACE GetTotalFaces +!---------------------------------------------------------------------------- +! GetFaceConnectivity@GeometryMethods +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-07 +! summary: Returns number of edges in the element + +INTERFACE GetFaceConnectivity + MODULE 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 + !---------------------------------------------------------------------------- ! GetTotalCells@GeometryMethods !---------------------------------------------------------------------------- diff --git a/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 b/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 index a87df515..da86b45a 100644 --- a/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 +++ b/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 @@ -30,7 +30,10 @@ MODULE ReferenceHexahedron_Method PUBLIC :: highorderElement_Hexahedron PUBLIC :: Measure_Simplex_Hexahedron PUBLIC :: Hexahedron_Quality +PUBLIC :: Quality_Hexahedron PUBLIC :: HexahedronVolume3D +PUBLIC :: GetEdgeConnectivity_Hexahedron +PUBLIC :: GetFaceConnectivity_Hexahedron !---------------------------------------------------------------------------- ! Initiate@Hexahedron @@ -57,7 +60,7 @@ END SUBROUTINE initiate_ref_Hexahedron MODULE PURE FUNCTION reference_Hexahedron(nsd, xij, domainName) RESULT(obj) INTEGER(I4B), INTENT(IN) :: NSD REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName TYPE(ReferenceHexahedron_) :: obj END FUNCTION reference_Hexahedron END INTERFACE ReferenceHexahedron @@ -71,7 +74,7 @@ MODULE FUNCTION reference_Hexahedron_Pointer(nsd, xij, domainName) & & RESULT(obj) INTEGER(I4B), INTENT(IN) :: NSD REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName CLASS(ReferenceHexahedron_), POINTER :: obj END FUNCTION reference_Hexahedron_Pointer END INTERFACE ReferenceHexahedron_Pointer @@ -106,14 +109,14 @@ END FUNCTION Measure_Simplex_Hexahedron ! Hexahedron_quality !---------------------------------------------------------------------------- -INTERFACE - MODULE FUNCTION Hexahedron_quality(refelem, xij, measure) RESULT(Ans) +INTERFACE Quality_Hexahedron + MODULE FUNCTION Hexahedron_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans - END FUNCTION Hexahedron_quality -END INTERFACE + END FUNCTION Hexahedron_Quality +END INTERFACE Quality_Hexahedron !---------------------------------------------------------------------------- ! HexahedronVolume3D @@ -126,4 +129,48 @@ MODULE PURE SUBROUTINE HexahedronVolume3D(xij, ans) END SUBROUTINE HexahedronVolume3D END INTERFACE +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Hexahedron(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Hexahedron +END INTERFACE + +!---------------------------------------------------------------------------- +! GetFaceConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetFaceConnectivity_Hexahedron(con, opt) + 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 face connectivity for hierarchial approximation + !! If opt =2, then face connectivity for Lagrangian approximation + !! opt=1 is default + END SUBROUTINE GetFaceConnectivity_Hexahedron +END INTERFACE + END MODULE ReferenceHexahedron_Method diff --git a/src/modules/Geometry/src/ReferenceLine_Method.F90 b/src/modules/Geometry/src/ReferenceLine_Method.F90 index 12936e54..7fd08ba8 100644 --- a/src/modules/Geometry/src/ReferenceLine_Method.F90 +++ b/src/modules/Geometry/src/ReferenceLine_Method.F90 @@ -27,10 +27,14 @@ MODULE ReferenceLine_Method PUBLIC :: Initiate PUBLIC :: ReferenceLine PUBLIC :: ReferenceLine_Pointer -PUBLIC :: highorderElement_Line +PUBLIC :: HighOrderElement_Line PUBLIC :: Measure_Simplex_Line PUBLIC :: Line_Quality +PUBLIC :: Quality_Line PUBLIC :: LineName +PUBLIC :: GetEdgeConnectivity_Line +PUBLIC :: RefLineCoord +PUBLIC :: RefCoord_Line !---------------------------------------------------------------------------- ! LineName @@ -184,7 +188,7 @@ END FUNCTION reference_line_pointer_1 ! summary: This function returns lagrange element on line ! !# Introduction -! Returns lagrange line element of higher order. By lagrange element we means +! Returns lagrange line element of Higher order. By lagrange element we means ! standard finite elements, with equi-distance lagrange interpolation points. ! !### Usage @@ -195,12 +199,12 @@ END FUNCTION reference_line_pointer_1 ! call random_number( xij ) ! call initiate( obj=obj1, nsd=3, xij=xij ) ! call display( obj1, "obj1 : " ) -! call obj1%highorderElement( order=2, Highorderobj=obj3 ) <--- +! call obj1%HighOrderElement( order=2, HighOrderobj=obj3 ) <--- ! call display( obj3, "Second order Lagrange Element : ") !``` INTERFACE - MODULE SUBROUTINE highorderElement_Line(refelem, order, obj, & + MODULE SUBROUTINE HighOrderElement_Line(refelem, order, obj, & & ipType) CLASS(ReferenceElement_), INTENT(IN) :: refelem !! Linear line element @@ -209,7 +213,7 @@ MODULE SUBROUTINE highorderElement_Line(refelem, order, obj, & CLASS(ReferenceElement_), INTENT(INOUT) :: obj !! High order lagrange line element INTEGER(I4B), INTENT(IN) :: ipType - END SUBROUTINE highorderElement_Line + END SUBROUTINE HighOrderElement_Line END INTERFACE !---------------------------------------------------------------------------- @@ -248,15 +252,54 @@ END FUNCTION Measure_Simplex_Line ! line_quality@Methods !---------------------------------------------------------------------------- -INTERFACE +INTERFACE Quality_Line MODULE FUNCTION Line_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans END FUNCTION Line_Quality +END INTERFACE Quality_Line + +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Line(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Line END INTERFACE +!---------------------------------------------------------------------------- +! RefLineCoord +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2023-07-03 +! summary: Returns the coordinate of reference triangle + +INTERFACE RefCoord_Line + MODULE PURE FUNCTION RefLineCoord(refLine) RESULT(ans) + CHARACTER(*), INTENT(IN) :: refLine + !! "unit" + !! "biunit" + REAL(DFP) :: ans(1, 2) + END FUNCTION RefLineCoord +END INTERFACE RefCoord_Line + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- diff --git a/src/modules/Geometry/src/ReferencePoint_Method.F90 b/src/modules/Geometry/src/ReferencePoint_Method.F90 index 79415f15..680df48f 100644 --- a/src/modules/Geometry/src/ReferencePoint_Method.F90 +++ b/src/modules/Geometry/src/ReferencePoint_Method.F90 @@ -27,9 +27,10 @@ MODULE ReferencePoint_Method PUBLIC :: Initiate PUBLIC :: ReferencePoint PUBLIC :: ReferencePoint_Pointer -PUBLIC :: highOrderElement_Point +PUBLIC :: HighOrderElement_Point PUBLIC :: Measure_Simplex_Point PUBLIC :: Point_Quality +PUBLIC :: Quality_Point !---------------------------------------------------------------------------- ! Initiate@Methods @@ -60,7 +61,7 @@ MODULE ReferencePoint_Method ! call display( obj1, "obj1 : " ) !``` -INTERFACE +INTERFACE Initiate MODULE PURE SUBROUTINE refPoint_Initiate(obj, NSD, XiJ) CLASS(ReferencePoint_), INTENT(INOUT) :: obj !! The instance @@ -69,10 +70,6 @@ MODULE PURE SUBROUTINE refPoint_Initiate(obj, NSD, XiJ) REAL(DFP), INTENT(IN), OPTIONAL :: XiJ(:, :) !! Coords of element END SUBROUTINE refPoint_Initiate -END INTERFACE - -INTERFACE Initiate - MODULE PROCEDURE refPoint_Initiate END INTERFACE Initiate !---------------------------------------------------------------------------- @@ -101,16 +98,12 @@ END SUBROUTINE refPoint_Initiate ! call display( obj, 'obj : ' ) !``` -INTERFACE +INTERFACE ReferencePoint MODULE PURE FUNCTION refPoint_Constructor1(NSD, XiJ) RESULT(obj) INTEGER(I4B), INTENT(IN) :: NSD REAL(DFP), INTENT(IN), OPTIONAL :: XiJ(:, :) TYPE(ReferencePoint_) :: obj END FUNCTION refPoint_Constructor1 -END INTERFACE - -INTERFACE ReferencePoint - MODULE PROCEDURE refPoint_Constructor1 END INTERFACE ReferencePoint !---------------------------------------------------------------------------- @@ -140,16 +133,12 @@ END FUNCTION refPoint_Constructor1 ! call display( obj, "obj : ") !``` -INTERFACE +INTERFACE ReferencePoint_Pointer MODULE PURE FUNCTION refPoint_Constructor_1(NSD, XiJ) RESULT(obj) INTEGER(I4B), INTENT(IN) :: NSD REAL(DFP), INTENT(IN), OPTIONAL :: XiJ(:, :) CLASS(ReferencePoint_), POINTER :: obj END FUNCTION refPoint_Constructor_1 -END INTERFACE - -INTERFACE ReferencePoint_Pointer - MODULE PROCEDURE refPoint_Constructor_1 END INTERFACE ReferencePoint_Pointer !---------------------------------------------------------------------------- @@ -222,14 +211,14 @@ END FUNCTION Measure_Simplex_Point ! Point_quality !---------------------------------------------------------------------------- -INTERFACE +INTERFACE Quality_Point MODULE FUNCTION Point_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferencePoint_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans END FUNCTION Point_Quality -END INTERFACE +END INTERFACE Quality_Point !---------------------------------------------------------------------------- ! diff --git a/src/modules/Geometry/src/ReferencePrism_Method.F90 b/src/modules/Geometry/src/ReferencePrism_Method.F90 index 304da899..74fbcd25 100644 --- a/src/modules/Geometry/src/ReferencePrism_Method.F90 +++ b/src/modules/Geometry/src/ReferencePrism_Method.F90 @@ -32,6 +32,9 @@ MODULE ReferencePrism_Method PUBLIC :: highOrderElement_Prism PUBLIC :: Measure_Simplex_Prism PUBLIC :: Prism_Quality +PUBLIC :: Quality_Prism +PUBLIC :: GetEdgeConnectivity_Prism +PUBLIC :: GetFaceConnectivity_Prism !---------------------------------------------------------------------------- ! Initiate@Prism @@ -46,7 +49,7 @@ MODULE SUBROUTINE initiate_ref_Prism(obj, nsd, xij, domainName) CLASS(ReferencePrism_), INTENT(INOUT) :: obj INTEGER(I4B), INTENT(IN) :: nsd REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName END SUBROUTINE initiate_ref_Prism END INTERFACE Initiate @@ -58,7 +61,7 @@ END SUBROUTINE initiate_ref_Prism MODULE FUNCTION reference_Prism(nsd, xij, domainName) RESULT(obj) INTEGER(I4B), INTENT(IN) :: nsd REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName TYPE(ReferencePrism_) :: obj END FUNCTION reference_Prism END INTERFACE ReferencePrism @@ -71,7 +74,7 @@ END FUNCTION reference_Prism MODULE FUNCTION reference_Prism_Pointer(nsd, xij, domainName) RESULT(obj) INTEGER(I4B), INTENT(IN) :: nsd REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName CLASS(ReferencePrism_), POINTER :: obj END FUNCTION reference_Prism_Pointer END INTERFACE ReferencePrism_Pointer @@ -105,14 +108,14 @@ END FUNCTION Measure_Simplex_Prism ! Prism_Quality !---------------------------------------------------------------------------- -INTERFACE +INTERFACE Quality_Prism MODULE FUNCTION Prism_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans END FUNCTION Prism_Quality -END INTERFACE +END INTERFACE Quality_Prism !---------------------------------------------------------------------------- ! POLYHEDRONVOLUME3D @@ -167,4 +170,48 @@ MODULE PURE SUBROUTINE PolyhedronVolume3D( & END SUBROUTINE PolyhedronVolume3D END INTERFACE +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Prism(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Prism +END INTERFACE + +!---------------------------------------------------------------------------- +! GetFaceConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetFaceConnectivity_Prism(con, opt) + 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 face connectivity for hierarchial approximation + !! If opt =2, then face connectivity for Lagrangian approximation + !! opt=1 is default + END SUBROUTINE GetFaceConnectivity_Prism +END INTERFACE + END MODULE ReferencePrism_Method diff --git a/src/modules/Geometry/src/ReferencePyramid_Method.F90 b/src/modules/Geometry/src/ReferencePyramid_Method.F90 index 1b15e1f7..d0cc1d2a 100644 --- a/src/modules/Geometry/src/ReferencePyramid_Method.F90 +++ b/src/modules/Geometry/src/ReferencePyramid_Method.F90 @@ -30,6 +30,9 @@ MODULE ReferencePyramid_Method PUBLIC :: highOrderElement_Pyramid PUBLIC :: Measure_Simplex_Pyramid PUBLIC :: Pyramid_Quality +PUBLIC :: Quality_Pyramid +PUBLIC :: GetEdgeConnectivity_Pyramid +PUBLIC :: GetFaceConnectivity_Pyramid !---------------------------------------------------------------------------- ! Initiate@Pyramid @@ -44,7 +47,7 @@ MODULE SUBROUTINE initiate_ref_Pyramid(obj, nsd, xij, domainName) CLASS(ReferencePyramid_), INTENT(INOUT) :: obj INTEGER(I4B), INTENT(IN) :: nsd REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName END SUBROUTINE initiate_ref_Pyramid END INTERFACE Initiate @@ -56,7 +59,7 @@ END SUBROUTINE initiate_ref_Pyramid MODULE FUNCTION reference_Pyramid(nsd, xij, domainName) RESULT(obj) INTEGER(I4B), INTENT(IN) :: nsd REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName TYPE(ReferencePyramid_) :: obj END FUNCTION reference_Pyramid END INTERFACE ReferencePyramid @@ -70,7 +73,7 @@ MODULE FUNCTION reference_Pyramid_Pointer(nsd, xij, domainName) & & RESULT(obj) INTEGER(I4B), INTENT(IN) :: nsd REAL(DFP), INTENT(IN), OPTIONAL :: xij(:, :) - CHARACTER(*), OPTIONAL, INTENT( IN ) :: domainName + CHARACTER(*), OPTIONAL, INTENT(IN) :: domainName CLASS(ReferencePyramid_), POINTER :: obj END FUNCTION reference_Pyramid_Pointer END INTERFACE ReferencePyramid_Pointer @@ -104,13 +107,57 @@ END FUNCTION Measure_Simplex_Pyramid ! Pyramid_Quality !---------------------------------------------------------------------------- -INTERFACE +INTERFACE Quality_Pyramid MODULE FUNCTION Pyramid_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans END FUNCTION Pyramid_Quality +END INTERFACE Quality_Pyramid + +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Pyramid(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Pyramid +END INTERFACE + +!---------------------------------------------------------------------------- +! GetFaceConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetFaceConnectivity_Pyramid(con, opt) + 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 face connectivity for hierarchial approximation + !! If opt =2, then face connectivity for Lagrangian approximation + !! opt=1 is default + END SUBROUTINE GetFaceConnectivity_Pyramid END INTERFACE END MODULE ReferencePyramid_Method diff --git a/src/modules/Geometry/src/ReferenceQuadrangle_Method.F90 b/src/modules/Geometry/src/ReferenceQuadrangle_Method.F90 index 55850774..60d5847c 100644 --- a/src/modules/Geometry/src/ReferenceQuadrangle_Method.F90 +++ b/src/modules/Geometry/src/ReferenceQuadrangle_Method.F90 @@ -27,12 +27,14 @@ MODULE ReferenceQuadrangle_Method PUBLIC :: Initiate PUBLIC :: ReferenceQuadrangle PUBLIC :: ReferenceQuadrangle_Pointer -PUBLIC :: highorderElement_Quadrangle +PUBLIC :: HighorderElement_Quadrangle PUBLIC :: Measure_Simplex_Quadrangle PUBLIC :: Quadrangle_Quality +PUBLIC :: Quality_Quadrangle PUBLIC :: QuadArea3D, QuadrangleArea3D PUBLIC :: QuadArea2D, QuadrangleArea2D PUBLIC :: QuadrangleName +PUBLIC :: GetEdgeConnectivity_Quadrangle !---------------------------------------------------------------------------- ! QuadrangleName @@ -123,13 +125,13 @@ END FUNCTION reference_Quadrangle_Pointer !``` INTERFACE - MODULE SUBROUTINE highorderElement_Quadrangle(refelem, order, obj, & + MODULE SUBROUTINE HighorderElement_Quadrangle(refelem, order, obj, & & ipType) CLASS(ReferenceElement_), INTENT(IN) :: refelem INTEGER(I4B), INTENT(IN) :: order CLASS(ReferenceElement_), INTENT(INOUT) :: obj INTEGER(I4B), INTENT(IN) :: ipType - END SUBROUTINE highorderElement_Quadrangle + END SUBROUTINE HighorderElement_Quadrangle END INTERFACE !---------------------------------------------------------------------------- @@ -148,14 +150,14 @@ END FUNCTION Measure_Simplex_Quadrangle ! Quadrangle_quality !---------------------------------------------------------------------------- -INTERFACE +INTERFACE Quality_Quadrangle MODULE FUNCTION Quadrangle_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans END FUNCTION Quadrangle_Quality -END INTERFACE +END INTERFACE Quality_Quadrangle !----------------------------------------------------------------------------- ! @@ -204,4 +206,26 @@ MODULE PURE SUBROUTINE QuadArea2D(q, ans) END SUBROUTINE QuadArea2D END INTERFACE QuadrangleArea2D +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Quadrangle(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Quadrangle +END INTERFACE + END MODULE ReferenceQuadrangle_Method diff --git a/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 b/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 index 08dcb803..833e9eff 100644 --- a/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 +++ b/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 @@ -27,10 +27,13 @@ MODULE ReferenceTetrahedron_Method PUBLIC :: Initiate PUBLIC :: ReferenceTetrahedron PUBLIC :: ReferenceTetrahedron_Pointer -PUBLIC :: highOrderElement_Tetrahedron +PUBLIC :: HighOrderElement_Tetrahedron PUBLIC :: Measure_Simplex_Tetrahedron PUBLIC :: Tetrahedron_Quality PUBLIC :: TetrahedronVolume3D +PUBLIC :: Quality_Tetrahedron +PUBLIC :: GetEdgeConnectivity_Tetrahedron +PUBLIC :: GetFaceConnectivity_Tetrahedron !---------------------------------------------------------------------------- ! Initiate@Tetrahedron @@ -80,7 +83,7 @@ END FUNCTION reference_Tetrahedron_Pointer !---------------------------------------------------------------------------- INTERFACE - MODULE SUBROUTINE highOrderElement_Tetrahedron( & + MODULE SUBROUTINE HighOrderElement_Tetrahedron( & & refelem, & & order, & & obj, & @@ -89,7 +92,7 @@ MODULE SUBROUTINE highOrderElement_Tetrahedron( & INTEGER(I4B), INTENT(IN) :: order CLASS(ReferenceElement_), INTENT(INOUT) :: obj INTEGER(I4B), INTENT(IN) :: ipType - END SUBROUTINE highOrderElement_Tetrahedron + END SUBROUTINE HighOrderElement_Tetrahedron END INTERFACE !---------------------------------------------------------------------------- @@ -108,14 +111,14 @@ END FUNCTION Measure_Simplex_Tetrahedron ! Tetrahedron_Quality !---------------------------------------------------------------------------- -INTERFACE +INTERFACE Quality_Tetrahedron MODULE FUNCTION Tetrahedron_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans END FUNCTION Tetrahedron_Quality -END INTERFACE +END INTERFACE Quality_Tetrahedron !---------------------------------------------------------------------------- ! TetrahedronVolume3D @@ -128,4 +131,48 @@ MODULE PURE SUBROUTINE TetrahedronVolume3D(xij, ans) END SUBROUTINE TetrahedronVolume3D END INTERFACE +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Tetrahedron(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Tetrahedron +END INTERFACE + +!---------------------------------------------------------------------------- +! GetFaceConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetFaceConnectivity_Tetrahedron(con, opt) + 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 face connectivity for hierarchial approximation + !! If opt =2, then face connectivity for Lagrangian approximation + !! opt=1 is default + END SUBROUTINE GetFaceConnectivity_Tetrahedron +END INTERFACE + END MODULE ReferenceTetrahedron_Method diff --git a/src/modules/Geometry/src/ReferenceTriangle_Method.F90 b/src/modules/Geometry/src/ReferenceTriangle_Method.F90 index 4aff2145..51f42ca7 100644 --- a/src/modules/Geometry/src/ReferenceTriangle_Method.F90 +++ b/src/modules/Geometry/src/ReferenceTriangle_Method.F90 @@ -29,6 +29,8 @@ MODULE ReferenceTriangle_Method PUBLIC :: ReferenceTriangle_Pointer PUBLIC :: HighorderElement_Triangle PUBLIC :: Measure_Simplex_Triangle +PUBLIC :: Triangle_Contains_Point +PUBLIC :: Contains_Point_Triangle PUBLIC :: Angles PUBLIC :: Area PUBLIC :: ArealVector @@ -38,7 +40,6 @@ MODULE ReferenceTriangle_Method PUBLIC :: CircumCircle PUBLIC :: CircumRadius PUBLIC :: ContainsLine -PUBLIC :: Triangle_Contains_Point PUBLIC :: Diameter PUBLIC :: EdgeLength PUBLIC :: Incenter @@ -49,15 +50,17 @@ MODULE ReferenceTriangle_Method PUBLIC :: NearestPoint PUBLIC :: RandomPoint PUBLIC :: Triangle_Quality +PUBLIC :: Quality_Triangle PUBLIC :: TriangleArea3D PUBLIC :: TriangleArea2D +PUBLIC :: GetEdgeConnectivity_Triangle !---------------------------------------------------------------------------- ! Initiate@Triangle !---------------------------------------------------------------------------- !> author: Vikas Sharma, Ph. D. -! date: 3 March 2021 +! date: 3 March 2021 ! summary: This routine constructs an instance of [[ReferenceTriangle_]] ! !# Introduction @@ -66,7 +69,8 @@ MODULE ReferenceTriangle_Method ! - User can specify the coordinates of the trinagle ! !@note -! This routine will contruct a three node triangle. Also, SHAPE(xij) = [3,3] +! This routine will contruct a three node triangle. +! Also, SHAPE(xij) = [3,3] !@endnote ! !### Usage @@ -364,13 +368,13 @@ END SUBROUTINE triangle_contains_line ! ContainsPoint@Triangle !---------------------------------------------------------------------------- -INTERFACE - MODULE PURE FUNCTION triangle_contains_point(refelem, xij, x) RESULT(Ans) +INTERFACE Contains_Point_Triangle + MODULE PURE FUNCTION Triangle_Contains_Point(refelem, xij, x) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :), x(:) LOGICAL(LGT) :: Ans - END FUNCTION triangle_contains_point -END INTERFACE + END FUNCTION Triangle_Contains_Point +END INTERFACE Contains_Point_Triangle !---------------------------------------------------------------------------- ! Diameter@Triangle @@ -462,7 +466,8 @@ END FUNCTION triangle_point_dist !---------------------------------------------------------------------------- INTERFACE NearestPoint - MODULE PURE SUBROUTINE triangle_get_nearest_point(refelem, xij, x, xn, dist) + MODULE PURE SUBROUTINE triangle_get_nearest_point(refelem, xij, x, xn, & + & dist) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :), x(:) REAL(DFP), INTENT(INOUT) :: xn(:) @@ -489,14 +494,14 @@ END FUNCTION triangle_random_point ! Quality@Triangle !---------------------------------------------------------------------------- -INTERFACE - MODULE PURE FUNCTION triangle_quality(refelem, xij, measure) RESULT(Ans) +INTERFACE Quality_Triangle + MODULE PURE FUNCTION Triangle_Quality(refelem, xij, measure) RESULT(Ans) CLASS(ReferenceElement_), INTENT(IN) :: refelem REAL(DFP), INTENT(IN) :: xij(:, :) INTEGER(I4B), INTENT(IN) :: measure REAL(DFP) :: Ans - END FUNCTION triangle_quality -END INTERFACE + END FUNCTION Triangle_Quality +END INTERFACE Quality_Triangle !---------------------------------------------------------------------------- ! TriangleArea3D @@ -520,9 +525,9 @@ MODULE PURE SUBROUTINE TriangleArea3D(t, ans) END SUBROUTINE TriangleArea3D END INTERFACE -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- ! -!----------------------------------------------------------------------------- +!---------------------------------------------------------------------------- !> author: Vikas Sharma, Ph. D. ! date: 10 Aug 2022 @@ -542,6 +547,28 @@ MODULE PURE SUBROUTINE TriangleArea2D(t, ans) END SUBROUTINE TriangleArea2D END INTERFACE +!---------------------------------------------------------------------------- +! GetEdgeConnectivity +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-08 +! summary: Returns number of edges in the element + +INTERFACE + MODULE SUBROUTINE GetEdgeConnectivity_Triangle(con, opt) + INTEGER(I4B), INTENT(INOUT) :: con(:, :) + !! Connectivity + !! The columns represents the edge number + !! The row represents a edge + !! 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 GetEdgeConnectivity_Triangle +END INTERFACE + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- diff --git a/src/modules/Polynomial/src/LineInterpolationUtility.F90 b/src/modules/Polynomial/src/LineInterpolationUtility.F90 index 7315d7ec..6e9c3e11 100644 --- a/src/modules/Polynomial/src/LineInterpolationUtility.F90 +++ b/src/modules/Polynomial/src/LineInterpolationUtility.F90 @@ -33,8 +33,6 @@ MODULE LineInterpolationUtility PUBLIC :: LagrangeGradientEvalAll_Line PUBLIC :: BasisEvalAll_Line PUBLIC :: BasisGradientEvalAll_Line -PUBLIC :: RefLineCoord -PUBLIC :: RefCoord_Line PUBLIC :: QuadraturePoint_Line PUBLIC :: ToVEFC_Line PUBLIC :: QuadratureNumber_Line @@ -44,7 +42,6 @@ MODULE LineInterpolationUtility PUBLIC :: OrthogonalBasis_Line PUBLIC :: OrthogonalBasisGradient_Line - !---------------------------------------------------------------------------- ! RefElemDomain_Line !---------------------------------------------------------------------------- @@ -96,23 +93,6 @@ MODULE PURE SUBROUTINE ToVEFC_Line(pt) END SUBROUTINE ToVEFC_Line END INTERFACE -!---------------------------------------------------------------------------- -! RefLineCoord -!---------------------------------------------------------------------------- - -!> author: Vikas Sharma, Ph. D. -! date: 2023-07-03 -! summary: Returns the coordinate of reference triangle - -INTERFACE RefCoord_Line - MODULE PURE FUNCTION RefLineCoord(refLine) RESULT(ans) - CHARACTER(*), INTENT(IN) :: refLine - !! "unit" - !! "biunit" - REAL(DFP) :: ans(1, 2) - END FUNCTION RefLineCoord -END INTERFACE RefCoord_Line - !---------------------------------------------------------------------------- ! LagrangeDegree_Line !---------------------------------------------------------------------------- @@ -196,7 +176,7 @@ END FUNCTION LagrangeInDOF_Line !- All points are inside the interval !- Points are in increasing order -INTERFACE +INTERFACE EquidistanceInPoint_Line MODULE PURE FUNCTION EquidistanceInPoint_Line1(order, xij) RESULT(ans) INTEGER(I4B), INTENT(IN) :: order !! order @@ -204,10 +184,6 @@ MODULE PURE FUNCTION EquidistanceInPoint_Line1(order, xij) RESULT(ans) !! coordinates of point 1 and point 2 REAL(DFP), ALLOCATABLE :: ans(:) END FUNCTION EquidistanceInPoint_Line1 -END INTERFACE - -INTERFACE EquidistanceInPoint_Line - MODULE PROCEDURE EquidistanceInPoint_Line1 END INTERFACE EquidistanceInPoint_Line !---------------------------------------------------------------------------- @@ -227,7 +203,7 @@ END FUNCTION EquidistanceInPoint_Line1 !- The number of space components in `ans` is nsd if xij present !- Otherwise, the number of space components in `ans` is 1. -INTERFACE +INTERFACE EquidistanceInPoint_Line MODULE PURE FUNCTION EquidistanceInPoint_Line2(order, xij) RESULT(ans) INTEGER(I4B), INTENT(IN) :: order !! order @@ -240,10 +216,6 @@ MODULE PURE FUNCTION EquidistanceInPoint_Line2(order, xij) RESULT(ans) !! The number of rows is equal to the number of rows in xij !! (if xij present), otherwise, it is 1. END FUNCTION EquidistanceInPoint_Line2 -END INTERFACE - -INTERFACE EquidistanceInPoint_Line - MODULE PROCEDURE EquidistanceInPoint_Line2 END INTERFACE EquidistanceInPoint_Line !---------------------------------------------------------------------------- diff --git a/src/submodules/Geometry/src/ReferenceElement_Method@ElementNameMethods.F90 b/src/submodules/Geometry/src/ReferenceElement_Method@ElementNameMethods.F90 index 6a79cc3b..efba61a7 100644 --- a/src/submodules/Geometry/src/ReferenceElement_Method@ElementNameMethods.F90 +++ b/src/submodules/Geometry/src/ReferenceElement_Method@ElementNameMethods.F90 @@ -20,7 +20,6 @@ ! summary: This sumodule contains method for geometry SUBMODULE(ReferenceElement_Method) ElementNameMethods -USE BaseMethod IMPLICIT NONE CONTAINS @@ -97,7 +96,7 @@ CASE (Hexahedron125) ans = "Hexahedron125" CASE DEFAULT - ans = "" + ans = "NONE" END SELECT END PROCEDURE Element_Name @@ -115,75 +114,75 @@ MODULE PROCEDURE Element_Type SELECT CASE (TRIM(ElemName)) CASE ("Line0") - Ans = 0 + ans = 0 CASE ("Line1", "Point") - Ans = Point + ans = Point CASE ("Line2", "Line") - Ans = Line2 + ans = Line2 CASE ("Triangle3", "Triangle") - Ans = Triangle3 + ans = Triangle3 CASE ("Quadrangle4", "Quadrangle") - Ans = Quadrangle4 + ans = Quadrangle4 CASE ("Tetrahedron4", "Tetrahedron") - Ans = Tetrahedron4 + ans = Tetrahedron4 CASE ("Hexahedron8", "Hexahedron") - Ans = Hexahedron8 + ans = Hexahedron8 CASE ("Prism6", "Prism") - Ans = Prism6 + ans = Prism6 CASE ("Pyramid5", "Pyramid") - Ans = Pyramid5 + ans = Pyramid5 CASE ("Line3") - Ans = Line3 + ans = Line3 CASE ("Triangle6") - Ans = Triangle6 + ans = Triangle6 CASE ("Quadrangle9") - Ans = Quadrangle9 + ans = Quadrangle9 CASE ("Tetrahedron10") - Ans = Tetrahedron10 + ans = Tetrahedron10 CASE ("Hexahedron27") - Ans = Hexahedron27 + ans = Hexahedron27 CASE ("Prism18") - Ans = Prism18 + ans = Prism18 CASE ("Pyramid14") - Ans = Pyramid14 + ans = Pyramid14 CASE ("Point1") - Ans = Point1 + ans = Point1 CASE ("Quadrangle8") - Ans = Quadrangle8 + ans = Quadrangle8 CASE ("Hexahedron20") - Ans = Hexahedron20 + ans = Hexahedron20 CASE ("Prism15") - Ans = Prism15 + ans = Prism15 CASE ("Pyramid13") - Ans = Pyramid13 + ans = Pyramid13 CASE ("Triangle9") - Ans = Triangle9 + ans = Triangle9 CASE ("Triangle10") - Ans = Triangle10 + ans = Triangle10 CASE ("Triangle12") - Ans = Triangle12 + ans = Triangle12 CASE ("Triangle15a") - Ans = Triangle15a + ans = Triangle15a CASE ("Triangle15b") - Ans = Triangle15b + ans = Triangle15b CASE ("Triangle21") - Ans = Triangle21 + ans = Triangle21 CASE ("Line4") - Ans = Line4 + ans = Line4 CASE ("Line5") - Ans = Line5 + ans = Line5 CASE ("Line6") - Ans = Line6 + ans = Line6 CASE ("Tetrahedron20") - Ans = Tetrahedron20 + ans = Tetrahedron20 CASE ("Tetrahedron35") - Ans = Tetrahedron35 + ans = Tetrahedron35 CASE ("Tetrahedron56") - Ans = Tetrahedron56 + ans = Tetrahedron56 CASE ("Hexahedron64") - Ans = Hexahedron64 + ans = Hexahedron64 CASE ("Hexahedron125") - Ans = Hexahedron125 + ans = Hexahedron125 END SELECT END PROCEDURE Element_Type @@ -202,71 +201,71 @@ MODULE PROCEDURE Element_Order SELECT CASE (ElemType) CASE (Line2) - Ans = 1 + ans = 1 CASE (Triangle3) - Ans = 1 + ans = 1 CASE (Quadrangle4) - Ans = 1 + ans = 1 CASE (Tetrahedron4) - Ans = 1 + ans = 1 CASE (Hexahedron8) - Ans = 1 + ans = 1 CASE (Prism6) - Ans = 1 + ans = 1 CASE (Pyramid5) - Ans = 1 + ans = 1 CASE (Line3) - Ans = 2 + ans = 2 CASE (Triangle6) - Ans = 2 + ans = 2 CASE (Quadrangle9) - Ans = 2 + ans = 2 CASE (Tetrahedron10) - Ans = 2 + ans = 2 CASE (Hexahedron27) - Ans = 2 + ans = 2 CASE (Prism18) - Ans = 2 + ans = 2 CASE (Pyramid14) - Ans = 2 + ans = 2 CASE (Point1) - Ans = 0 + ans = 0 CASE (Quadrangle8) - Ans = 2 + ans = 2 CASE (Hexahedron20) - Ans = 2 + ans = 2 CASE (Prism15) - Ans = 2 + ans = 2 CASE (Pyramid13) - Ans = 2 + ans = 2 CASE (Triangle9) - Ans = 3 + ans = 3 CASE (Triangle10) - Ans = 3 + ans = 3 CASE (Triangle12) - Ans = 4 + ans = 4 CASE (Triangle15a) - Ans = 4 + ans = 4 CASE (Triangle15b) - Ans = 5 + ans = 5 CASE (Triangle21) - Ans = 5 + ans = 5 CASE (Line4) - Ans = 3 + ans = 3 CASE (Line5) - Ans = 4 + ans = 4 CASE (Line6) - Ans = 5 + ans = 5 CASE (Tetrahedron20) - Ans = 3 + ans = 3 CASE (Tetrahedron35) - Ans = 4 + ans = 4 CASE (Tetrahedron56) - Ans = 5 + ans = 5 CASE (Hexahedron64) - Ans = 3 + ans = 3 CASE (Hexahedron125) - Ans = 4 + ans = 4 END SELECT END PROCEDURE Element_Order @@ -275,7 +274,7 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE Element_Order_refelem -Ans = refelem%Order +ans = refelem%Order END PROCEDURE Element_Order_refelem !---------------------------------------------------------------------------- @@ -300,7 +299,7 @@ Tetrahedron56, & Hexahedron64, & Hexahedron125) - Ans = 3 + ans = 3 CASE (Triangle3, & Triangle6, & Triangle9, & @@ -312,15 +311,15 @@ Quadrangle4, & Quadrangle8, & Quadrangle9) - Ans = 2 + ans = 2 CASE (Line2, & Line3, & Line4, & Line5, & Line6) - Ans = 1 + ans = 1 CASE DEFAULT - Ans = 0 + ans = 0 END SELECT END PROCEDURE Elem_XiDimension1 @@ -343,24 +342,24 @@ & Line4, & & Line5, & & Line6) - Ans = Line + ans = Line CASE (Triangle3, Triangle6, & & Triangle9, Triangle10, Triangle12, Triangle15a, & & Triangle15b, Triangle21) - Ans = Triangle + ans = Triangle CASE (Quadrangle4, Quadrangle8, & & Quadrangle9) - Ans = Quadrangle + ans = Quadrangle CASE (Tetrahedron4, Tetrahedron10, & & Tetrahedron20, Tetrahedron35, Tetrahedron56) - Ans = Tetrahedron + ans = Tetrahedron CASE (Hexahedron8, Hexahedron27, & & Hexahedron20, Hexahedron64, Hexahedron125) - Ans = Hexahedron + ans = Hexahedron CASE (Prism6, Prism18, Prism15) - Ans = Prism + ans = Prism CASE (Pyramid5, Pyramid13, Pyramid14) - Ans = Pyramid + ans = Pyramid END SELECT END PROCEDURE refelem_ElementTopology1 @@ -379,71 +378,71 @@ MODULE PROCEDURE Total_Nodes_In_Element SELECT CASE (ElemType) CASE (Line2) - Ans = 2 + ans = 2 CASE (Triangle3) - Ans = 3 + ans = 3 CASE (Quadrangle4) - Ans = 4 + ans = 4 CASE (Tetrahedron4) - Ans = 4 + ans = 4 CASE (Hexahedron8) - Ans = 8 + ans = 8 CASE (Prism6) - Ans = 6 + ans = 6 CASE (Pyramid5) - Ans = 5 + ans = 5 CASE (Line3) - Ans = 3 + ans = 3 CASE (Triangle6) - Ans = 6 + ans = 6 CASE (Quadrangle9) - Ans = 9 + ans = 9 CASE (Tetrahedron10) - Ans = 10 + ans = 10 CASE (Hexahedron27) - Ans = 27 + ans = 27 CASE (Prism18) - Ans = 18 + ans = 18 CASE (Pyramid14) - Ans = 14 + ans = 14 CASE (Point1) - Ans = 1 + ans = 1 CASE (Quadrangle8) - Ans = 8 + ans = 8 CASE (Hexahedron20) - Ans = 20 + ans = 20 CASE (Prism15) - Ans = 15 + ans = 15 CASE (Pyramid13) - Ans = 13 + ans = 13 CASE (Triangle9) - Ans = 9 + ans = 9 CASE (Triangle10) - Ans = 10 + ans = 10 CASE (Triangle12) - Ans = 12 + ans = 12 CASE (Triangle15a) - Ans = 15 + ans = 15 CASE (Triangle15b) - Ans = 15 + ans = 15 CASE (Triangle21) - Ans = 21 + ans = 21 CASE (Line4) - Ans = 4 + ans = 4 CASE (Line5) - Ans = 5 + ans = 5 CASE (Line6) - Ans = 6 + ans = 6 CASE (Tetrahedron20) - Ans = 20 + ans = 20 CASE (Tetrahedron35) - Ans = 35 + ans = 35 CASE (Tetrahedron56) - Ans = 56 + ans = 56 CASE (Hexahedron64) - Ans = 64 + ans = 64 CASE (Hexahedron125) - Ans = 125 + ans = 125 END SELECT ! END PROCEDURE Total_Nodes_In_Element diff --git a/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 b/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 index 30d85ac8..43b0bb46 100644 --- a/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 +++ b/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 @@ -16,7 +16,24 @@ ! SUBMODULE(ReferenceElement_Method) GeometryMethods -USE BaseMethod +USE ErrorHandling, ONLY: Errormsg +USE Display_Method + +USE ReferencePoint_Method, ONLY: Measure_Simplex_Point, Point_quality +USE ReferenceLine_Method, ONLY: Measure_Simplex_Line, Line_quality +USE ReferenceTriangle_Method, ONLY: Measure_Simplex_Triangle, & + & Triangle_quality, triangle_contains_point +USE ReferenceQuadrangle_Method, ONLY: Measure_Simplex_Quadrangle, & + & Quadrangle_quality +USE ReferenceTetrahedron_Method, ONLY: Measure_Simplex_Tetrahedron, & + & Tetrahedron_quality +USE ReferenceHexahedron_Method, ONLY: Measure_Simplex_Hexahedron, & + & Hexahedron_quality +USE ReferencePrism_Method, ONLY: Measure_Simplex_Prism, & + & Prism_quality +USE ReferencePyramid_Method, ONLY: Measure_Simplex_Pyramid, & + & Pyramid_quality + IMPLICIT NONE CONTAINS @@ -45,6 +62,38 @@ END SELECT END PROCEDURE GetTotalEdges1 +!---------------------------------------------------------------------------- +! GetEdgeConnectivity1 +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetEdgeConnectivity1 +SELECT CASE (elemType) +CASE (Point) + ! CALL GetEdgeConnectivity_Point(con=con, opt=opt) +CASE (Line) + ! CALL GetEdgeConnectivity_Line(con=con, opt=opt) +CASE (Triangle) + ! CALL GetEdgeConnectivity_Triangle(con=con, opt=opt) +CASE (Quadrangle) + ! CALL GetEdgeConnectivity_Quadrangle(con=con, opt=opt) +CASE (Tetrahedron) + ! CALL GetEdgeConnectivity_Tetrahedron(con=con, opt=opt) +CASE (Hexahedron) + ! CALL GetEdgeConnectivity_Hexahedron(con=con, opt=opt) +CASE (Prism) + ! CALL GetEdgeConnectivity_Prism(con=con, opt=opt) +CASE (Pyramid) + ! CALL GetEdgeConnectivity_Pyramid(con=con, opt=opt) +CASE DEFAULT + CALL Errormsg( & + & msg="No case found for given elemType="//ToString(elemType), & + & file=__FILE__, & + & routine="GetEdgeConnectivity1()", & + & line=__LINE__, & + & unitno=stderr) +END SELECT +END PROCEDURE GetEdgeConnectivity1 + !---------------------------------------------------------------------------- ! GetTotalFaces !---------------------------------------------------------------------------- @@ -70,6 +119,13 @@ END SELECT END PROCEDURE GetTotalFaces1 +!---------------------------------------------------------------------------- +! GetFaceConnectivity2 +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetFaceConnectivity1 +END PROCEDURE GetFaceConnectivity1 + !---------------------------------------------------------------------------- ! GetTotalCells !---------------------------------------------------------------------------- diff --git a/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 index 195bf823..2f729c3e 100644 --- a/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 @@ -20,7 +20,13 @@ ! summary: This submodule contains methods for [[ReferenceLine_]] SUBMODULE(ReferenceLine_Method) Methods -USE BaseMethod +USE ReallocateUtility +USE ReferenceElement_Method +USE StringUtility +USE ApproxUtility +USE String_Class, ONLY: String +USE LineInterpolationUtility +USE Display_Method IMPLICIT NONE CONTAINS @@ -58,7 +64,7 @@ biunit_xij = RefCoord_Line("BIUNIT") IF (PRESENT(xij)) THEN - obj%xij = xij(1:1, 1:2) + obj%xij = xij(1:1, 1:2) IF (ALL(obj%xij(1:1, 1:2) .approxeq.unit_xij)) THEN obj%domainName = "UNIT" ELSE IF (ALL(obj%xij(1:1, 1:2) .approxeq.biunit_xij)) THEN @@ -95,7 +101,7 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE reference_Line -CALL Initiate(obj=obj, nsd=nsd, xij=xij, domainName=domainName) +CALL initiate_ref_line(obj=obj, nsd=nsd, xij=xij, domainName=domainName) END PROCEDURE reference_Line !---------------------------------------------------------------------------- @@ -104,7 +110,7 @@ MODULE PROCEDURE reference_Line_Pointer_1 ALLOCATE (obj) -CALL Initiate(obj=obj, nsd=nsd, xij=xij, domainName=domainName) +CALL initiate_ref_line(obj=obj, nsd=nsd, xij=xij, domainName=domainName) END PROCEDURE reference_Line_Pointer_1 !---------------------------------------------------------------------------- @@ -124,7 +130,7 @@ obj%entityCounts = [nns, 1, 0, 0] obj%xiDimension = 1 obj%order = order -obj%name = ElementType("Line"//TRIM(INT2STR(nns))) +obj%name = ElementType("Line"//ToString(nns)) ALLOCATE (obj%topology(nns + 1)) DO CONCURRENT(i=1:nns) obj%topology(i) = ReferenceTopology([i], Point) @@ -158,4 +164,19 @@ ans = 0.0_DFP END PROCEDURE Line_quality +!---------------------------------------------------------------------------- +! RefLineCoord +!---------------------------------------------------------------------------- + +MODULE PROCEDURE RefLineCoord +TYPE(String) :: astr +astr = UpperCase(refLine) +SELECT CASE (astr%chars()) +CASE ("UNIT") + ans(1, :) = [0.0_DFP, 1.0_DFP] +CASE ("BIUNIT") + ans(1, :) = [-1.0_DFP, 1.0_DFP] +END SELECT +END PROCEDURE RefLineCoord + END SUBMODULE Methods diff --git a/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 b/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 index 5d0cb697..5c3fe479 100644 --- a/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 @@ -17,10 +17,11 @@ !> author: Vikas Sharma, Ph. D. ! date: 2 March 2021 -! summary: This submodule contains methods for [[ReferencePoint_]] +! summary: This submodule contains methods for [[ReferencePoint_]] SUBMODULE(ReferencePoint_Method) Methods -USE BaseMethod +USE ReallocateUtility +USE ReferenceElement_Method IMPLICIT NONE CONTAINS @@ -29,24 +30,19 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE refPoint_Initiate - !! - CALL Reallocate( obj%XiJ, 3, 1 ) - !! - IF( PRESENT( XiJ ) ) THEN - obj%XiJ = XiJ - END IF - !! - obj%EntityCounts = [1, 0, 0, 0] - obj%XiDimension = 0 - obj%Order = 0 - obj%NSD = NSD - obj%Name = Point1 - IF( ALLOCATED( obj%Topology ) ) DEALLOCATE( obj%Topology ) - ALLOCATE( obj%Topology( 1 ) ) - obj%Topology( 1 ) = ReferenceTopology( [1], Point ) - !! - obj%highOrderElement => highOrderElement_Point - !! +CALL Reallocate(obj%XiJ, 3, 1) +IF (PRESENT(XiJ)) THEN + obj%XiJ = XiJ +END IF +obj%EntityCounts = [1, 0, 0, 0] +obj%XiDimension = 0 +obj%Order = 0 +obj%NSD = NSD +obj%Name = Point1 +IF (ALLOCATED(obj%Topology)) DEALLOCATE (obj%Topology) +ALLOCATE (obj%Topology(1)) +obj%Topology(1) = ReferenceTopology([1], Point) +obj%highOrderElement => HighOrderElement_Point END PROCEDURE refPoint_Initiate !---------------------------------------------------------------------------- @@ -54,7 +50,7 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE refPoint_Constructor1 - CALL Initiate( obj, NSD, XiJ ) +CALL refPoint_Initiate(obj, NSD, XiJ) END PROCEDURE refPoint_Constructor1 !---------------------------------------------------------------------------- @@ -62,24 +58,24 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE refPoint_Constructor_1 - ALLOCATE( obj ) - CALL Initiate( obj, NSD, XiJ ) +ALLOCATE (obj) +CALL refpoint_Initiate(obj, NSD, XiJ) END PROCEDURE refPoint_Constructor_1 !---------------------------------------------------------------------------- ! LagrangeElement !---------------------------------------------------------------------------- -MODULE PROCEDURE highOrderElement_Point - CALL Initiate( obj=obj, anotherobj=refelem ) -END PROCEDURE highOrderElement_Point +MODULE PROCEDURE HighOrderElement_Point +CALL Initiate(obj=obj, anotherobj=refelem) +END PROCEDURE HighOrderElement_Point !---------------------------------------------------------------------------- ! MeasureSimplex !---------------------------------------------------------------------------- MODULE PROCEDURE Measure_Simplex_Point - ans = 0.0_DFP +ans = 0.0_DFP END PROCEDURE Measure_Simplex_Point !---------------------------------------------------------------------------- @@ -87,7 +83,7 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE Point_Quality - ans = 0.0_DFP +ans = 0.0_DFP END PROCEDURE Point_Quality -END SUBMODULE Methods \ No newline at end of file +END SUBMODULE Methods diff --git a/src/submodules/Geometry/src/ReferenceTriangle_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceTriangle_Method@Methods.F90 index 2fcb266d..6e6b60b2 100644 --- a/src/submodules/Geometry/src/ReferenceTriangle_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceTriangle_Method@Methods.F90 @@ -16,7 +16,7 @@ ! !> author: Vikas Sharma, Ph. D. -! date: 2 March 2021 +! date: 2 March 2021 ! summary: This submodule contains methods for [[ReferenceTriangle_]] SUBMODULE(ReferenceTriangle_Method) Methods diff --git a/src/submodules/Polynomial/src/LineInterpolationUtility@Methods.F90 b/src/submodules/Polynomial/src/LineInterpolationUtility@Methods.F90 index 83700b4e..a1043bcd 100644 --- a/src/submodules/Polynomial/src/LineInterpolationUtility@Methods.F90 +++ b/src/submodules/Polynomial/src/LineInterpolationUtility@Methods.F90 @@ -56,21 +56,6 @@ END IF END PROCEDURE ToVEFC_Line -!---------------------------------------------------------------------------- -! RefLineCoord -!---------------------------------------------------------------------------- - -MODULE PROCEDURE RefLineCoord -TYPE(String) :: astr -astr = UpperCase(refLine) -SELECT CASE (astr%chars()) -CASE ("UNIT") - ans(1, :) = [0.0_DFP, 1.0_DFP] -CASE ("BIUNIT") - ans(1, :) = [-1.0_DFP, 1.0_DFP] -END SELECT -END PROCEDURE RefLineCoord - !---------------------------------------------------------------------------- ! LagrangeDegree_Line !---------------------------------------------------------------------------- @@ -1365,7 +1350,7 @@ END PROCEDURE OrthogonalBasis_Line1 !---------------------------------------------------------------------------- -! OrthogonalBasisGradient_Line1 +! OrthogonalBasisGradient_Line1 !---------------------------------------------------------------------------- MODULE PROCEDURE OrthogonalBasisGradient_Line1 @@ -1394,7 +1379,7 @@ & unitno=stderr) RETURN END SELECT -END PROCEDURE OrthogonalBasisGradient_Line1 +END PROCEDURE OrthogonalBasisGradient_Line1 !---------------------------------------------------------------------------- !