diff --git a/src/modules/Geometry/src/ReferenceElement_Method.F90 b/src/modules/Geometry/src/ReferenceElement_Method.F90 index 9d9f6640..a72a30aa 100644 --- a/src/modules/Geometry/src/ReferenceElement_Method.F90 +++ b/src/modules/Geometry/src/ReferenceElement_Method.F90 @@ -63,11 +63,19 @@ MODULE ReferenceElement_Method PUBLIC :: TotalEntities PUBLIC :: FacetTopology PUBLIC :: GetVTKelementType -PUBLIC :: GetTotalEdges PUBLIC :: GetEdgeConnectivity +PUBLIC :: GetFaceConnectivity +PUBLIC :: GetTotalNodes +PUBLIC :: GetTotalEdges PUBLIC :: GetTotalFaces PUBLIC :: GetTotalCells PUBLIC :: ReferenceElementInfo +PUBLIC :: RefElemGetGeoParam +PUBLIC :: GetFaceElemType + +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_ @@ -93,9 +101,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] @@ -121,6 +129,32 @@ MODULE ReferenceElement_Method TYPE(ReferenceElementInfo_), PARAMETER :: ReferenceElementInfo = & & ReferenceElementInfo_() +!---------------------------------------------------------------------------- +! 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 !---------------------------------------------------------------------------- @@ -145,7 +179,7 @@ END FUNCTION GetTotalEdges1 ! summary: Returns number of edges in the element INTERFACE GetEdgeConnectivity - MODULE SUBROUTINE GetEdgeConnectivity1(elemType, con, opt) + MODULE PURE SUBROUTINE GetEdgeConnectivity1(elemType, con, opt) INTEGER(I4B), INTENT(IN) :: elemType !! name of element INTEGER(I4B), INTENT(INOUT) :: con(:, :) @@ -160,21 +194,6 @@ MODULE SUBROUTINE GetEdgeConnectivity1(elemType, con, opt) END SUBROUTINE GetEdgeConnectivity1 END INTERFACE GetEdgeConnectivity -!---------------------------------------------------------------------------- -! GetTotalFaces@GeometryMethods -!---------------------------------------------------------------------------- - -!> author: Vikas Sharma, Ph. D. -! date: 2023-08-14 -! summary: Returns number of faces in the element - -INTERFACE GetTotalFaces - MODULE PURE FUNCTION GetTotalFaces1(elemType) RESULT(ans) - INTEGER(I4B), INTENT(IN) :: elemType - INTEGER(I4B) :: ans - END FUNCTION GetTotalFaces1 -END INTERFACE GetTotalFaces - !---------------------------------------------------------------------------- ! GetFaceConnectivity@GeometryMethods !---------------------------------------------------------------------------- @@ -184,7 +203,7 @@ END FUNCTION GetTotalFaces1 ! summary: Returns number of edges in the element INTERFACE GetFaceConnectivity - MODULE SUBROUTINE GetFaceConnectivity1(elemType, con, opt) + MODULE PURE SUBROUTINE GetFaceConnectivity1(elemType, con, opt) INTEGER(I4B), INTENT(IN) :: elemType !! name of element INTEGER(I4B), INTENT(INOUT) :: con(:, :) @@ -194,11 +213,65 @@ MODULE SUBROUTINE GetFaceConnectivity1(elemType, con, opt) !! 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 + !! 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 +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2023-08-14 +! summary: Returns number of faces in the element + +INTERFACE GetTotalFaces + MODULE PURE FUNCTION GetTotalFaces1(elemType) RESULT(ans) + INTEGER(I4B), INTENT(IN) :: elemType + INTEGER(I4B) :: ans + END FUNCTION GetTotalFaces1 +END INTERFACE GetTotalFaces + !---------------------------------------------------------------------------- ! GetTotalCells@GeometryMethods !---------------------------------------------------------------------------- diff --git a/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 b/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 index 9780f87d..81eac952 100644 --- a/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 +++ b/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 @@ -36,6 +36,7 @@ MODULE ReferenceHexahedron_Method PUBLIC :: GetFaceConnectivity_Hexahedron PUBLIC :: RefCoord_Hexahedron PUBLIC :: RefHexahedronCoord +PUBLIC :: GetFaceElemType_Hexahedron !---------------------------------------------------------------------------- ! Initiate@Hexahedron @@ -192,4 +193,26 @@ MODULE PURE FUNCTION RefHexahedronCoord(refHexahedron) RESULT(ans) END FUNCTION RefHexahedronCoord END INTERFACE RefCoord_Hexahedron +!---------------------------------------------------------------------------- +! GetFaceElemType@GeometryMethods +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-11 +! summary: Returns the element type of each face + +INTERFACE + MODULE PURE SUBROUTINE GetFaceElemType_Hexahedron(faceElemType, opt, & + & tFaceNodes) + INTEGER(I4B), INTENT(INOUT) :: faceElemType(:) + !! Face element type + INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaceNodes(:) + !! total 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 GetFaceElemType_Hexahedron +END INTERFACE + END MODULE ReferenceHexahedron_Method diff --git a/src/modules/Geometry/src/ReferencePrism_Method.F90 b/src/modules/Geometry/src/ReferencePrism_Method.F90 index 22634458..0765749b 100644 --- a/src/modules/Geometry/src/ReferencePrism_Method.F90 +++ b/src/modules/Geometry/src/ReferencePrism_Method.F90 @@ -36,6 +36,7 @@ MODULE ReferencePrism_Method PUBLIC :: GetEdgeConnectivity_Prism PUBLIC :: GetFaceConnectivity_Prism PUBLIC :: RefCoord_Prism +PUBLIC :: GetFaceElemType_Prism !---------------------------------------------------------------------------- ! Initiate@Prism @@ -230,4 +231,26 @@ MODULE PURE FUNCTION RefCoord_Prism(refPrism) RESULT(ans) END FUNCTION RefCoord_Prism END INTERFACE +!---------------------------------------------------------------------------- +! GetFaceElemType@GeometryMethods +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-11 +! summary: Returns the element type of each face + +INTERFACE + MODULE PURE SUBROUTINE GetFaceElemType_Prism(faceElemType, opt, & + & tFaceNodes) + INTEGER(I4B), INTENT(INOUT) :: faceElemType(:) + !! Face element type + INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaceNodes(:) + !! total 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 GetFaceElemType_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 53fd2411..fa851b61 100644 --- a/src/modules/Geometry/src/ReferencePyramid_Method.F90 +++ b/src/modules/Geometry/src/ReferencePyramid_Method.F90 @@ -34,6 +34,7 @@ MODULE ReferencePyramid_Method PUBLIC :: GetEdgeConnectivity_Pyramid PUBLIC :: GetFaceConnectivity_Pyramid PUBLIC :: RefCoord_Pyramid +PUBLIC :: GetFaceElemType_Pyramid !---------------------------------------------------------------------------- ! Initiate@Pyramid @@ -176,4 +177,26 @@ MODULE PURE FUNCTION RefCoord_Pyramid(refPyramid) RESULT(ans) END FUNCTION RefCoord_Pyramid END INTERFACE +!---------------------------------------------------------------------------- +! GetFaceElemType@GeometryMethods +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-11 +! summary: Returns the element type of each face + +INTERFACE + MODULE PURE SUBROUTINE GetFaceElemType_Pyramid(faceElemType, opt, & + & tFaceNodes) + INTEGER(I4B), INTENT(INOUT) :: faceElemType(:) + !! Face element type + INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaceNodes(:) + !! total 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 GetFaceElemType_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 43ab2fb6..63dfd2ea 100644 --- a/src/modules/Geometry/src/ReferenceQuadrangle_Method.F90 +++ b/src/modules/Geometry/src/ReferenceQuadrangle_Method.F90 @@ -242,4 +242,8 @@ MODULE PURE FUNCTION RefQuadrangleCoord(refQuadrangle) RESULT(ans) END FUNCTION RefQuadrangleCoord END INTERFACE RefCoord_Quadrangle +!---------------------------------------------------------------------------- +! GetFace +!---------------------------------------------------------------------------- + END MODULE ReferenceQuadrangle_Method diff --git a/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 b/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 index bd0f558a..dd8cec2d 100644 --- a/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 +++ b/src/modules/Geometry/src/ReferenceTetrahedron_Method.F90 @@ -35,6 +35,7 @@ MODULE ReferenceTetrahedron_Method PUBLIC :: GetEdgeConnectivity_Tetrahedron PUBLIC :: GetFaceConnectivity_Tetrahedron PUBLIC :: RefCoord_Tetrahedron +PUBLIC :: GetFaceElemType_Tetrahedron !---------------------------------------------------------------------------- ! Initiate@Tetrahedron @@ -191,4 +192,26 @@ MODULE PURE FUNCTION RefCoord_Tetrahedron(refTetrahedron) RESULT(ans) END FUNCTION RefCoord_Tetrahedron END INTERFACE +!---------------------------------------------------------------------------- +! GetFaceElemType@GeometryMethods +!---------------------------------------------------------------------------- + +!> author: Vikas Sharma, Ph. D. +! date: 2024-03-11 +! summary: Returns the element type of each face + +INTERFACE + MODULE PURE SUBROUTINE GetFaceElemType_Tetrahedron(faceElemType, opt, & + & tFaceNodes) + INTEGER(I4B), INTENT(INOUT) :: faceElemType(:) + !! Face element type + INTEGER(I4B), OPTIONAL, INTENT(INOUT) :: tFaceNodes(:) + !! total 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 GetFaceElemType_Tetrahedron +END INTERFACE + END MODULE ReferenceTetrahedron_Method diff --git a/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 b/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 index 43b0bb46..7eb7d83b 100644 --- a/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 +++ b/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 @@ -21,123 +21,216 @@ 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 + & Triangle_quality, triangle_contains_point, & + & GetEdgeConnectivity_Triangle + USE ReferenceQuadrangle_Method, ONLY: Measure_Simplex_Quadrangle, & - & Quadrangle_quality + & Quadrangle_quality, GetEdgeConnectivity_Quadrangle + USE ReferenceTetrahedron_Method, ONLY: Measure_Simplex_Tetrahedron, & - & Tetrahedron_quality + & Tetrahedron_quality, GetEdgeConnectivity_Tetrahedron, & + & GetFaceConnectivity_Tetrahedron, GetFaceElemType_Tetrahedron + USE ReferenceHexahedron_Method, ONLY: Measure_Simplex_Hexahedron, & - & Hexahedron_quality + & Hexahedron_quality, GetEdgeConnectivity_Hexahedron, & + & GetFaceConnectivity_Hexahedron, GetFaceElemType_Hexahedron + USE ReferencePrism_Method, ONLY: Measure_Simplex_Prism, & - & Prism_quality + & Prism_quality, GetEdgeConnectivity_Prism, & + & GetFaceConnectivity_Prism, GetFaceElemType_Prism + USE ReferencePyramid_Method, ONLY: Measure_Simplex_Pyramid, & - & Pyramid_quality + & Pyramid_quality, GetEdgeConnectivity_Pyramid, & + & GetFaceConnectivity_Pyramid, GetFaceElemType_Pyramid IMPLICIT NONE CONTAINS !---------------------------------------------------------------------------- -! GetTotalEdges +! RefElemGetGeoParam !---------------------------------------------------------------------------- -MODULE PROCEDURE GetTotalEdges1 +MODULE PROCEDURE RefElemGetGeoParam1 +IF (PRESENT(tCells)) tCells = 1_I4B + SELECT CASE (elemType) CASE (Point) - ans = 0_I4B + IF (PRESENT(tNodes)) tNodes = 1_I4B + IF (PRESENT(tEdges)) tEdges = 0_I4B + IF (PRESENT(tFaces)) tFaces = 0_I4B + CASE (Line) - ans = 1_I4B + IF (PRESENT(tNodes)) tNodes = 2_I4B + IF (PRESENT(tEdges)) tEdges = 0_I4B + IF (PRESENT(tFaces)) tFaces = 0_I4B + CASE (Triangle) - ans = 3_I4B + IF (PRESENT(tNodes)) tNodes = 3_I4B + IF (PRESENT(tEdges)) tEdges = 3_I4B + IF (PRESENT(tFaces)) tFaces = 0_I4B + IF (PRESENT(edgeCon)) CALL GetEdgeConnectivity_Triangle(con=edgeCon, & + & opt=edgeOpt) + CASE (Quadrangle) - ans = 4_I4B + IF (PRESENT(tNodes)) tNodes = 4_I4B + IF (PRESENT(tEdges)) tEdges = 4_I4B + IF (PRESENT(tFaces)) tFaces = 0_I4B + IF (PRESENT(edgeCon)) CALL GetEdgeConnectivity_Quadrangle(con=edgeCon, & + & opt=edgeOpt) + CASE (Tetrahedron) - ans = 6_I4B + IF (PRESENT(tNodes)) tNodes = 4_I4B + IF (PRESENT(tEdges)) tEdges = 6_I4B + IF (PRESENT(tFaces)) tFaces = 4_I4B + IF (PRESENT(edgeCon)) CALL GetEdgeConnectivity_Tetrahedron(con=edgeCon, & + & opt=edgeOpt) + IF (PRESENT(faceCon)) CALL GetFaceConnectivity_Tetrahedron(con=faceCon, & + & opt=faceOpt) + IF (PRESENT(faceElemType)) CALL GetFaceElemType_Tetrahedron( & + & faceElemType=faceElemType, tFaceNodes=tFaceNodes) + CASE (Hexahedron) - ans = 12_I4B + IF (PRESENT(tNodes)) tNodes = 8_I4B + IF (PRESENT(tEdges)) tEdges = 12_I4B + IF (PRESENT(tFaces)) tFaces = 6_I4B + IF (PRESENT(edgeCon)) CALL GetEdgeConnectivity_Hexahedron(con=edgeCon, & + & opt=edgeOpt) + IF (PRESENT(faceCon)) CALL GetFaceConnectivity_Hexahedron(con=faceCon, & + & opt=faceOpt) + IF (PRESENT(faceElemType)) CALL GetFaceElemType_Hexahedron( & + & faceElemType=faceElemType, tFaceNodes=tFaceNodes) + CASE (Prism) - ans = 9_I4B + IF (PRESENT(tNodes)) tNodes = 6_I4B + IF (PRESENT(tEdges)) tEdges = 9_I4B + IF (PRESENT(tFaces)) tFaces = 5_I4B + IF (PRESENT(edgeCon)) CALL GetEdgeConnectivity_Prism(con=edgeCon, & + & opt=edgeOpt) + IF (PRESENT(faceCon)) CALL GetFaceConnectivity_Prism(con=faceCon, & + & opt=faceOpt) + IF (PRESENT(faceElemType)) CALL GetFaceElemType_Prism( & + & faceElemType=faceElemType, tFaceNodes=tFaceNodes) + CASE (Pyramid) - ans = 8_I4B + IF (PRESENT(tNodes)) tNodes = 5_I4B + IF (PRESENT(tEdges)) tEdges = 8_I4B + IF (PRESENT(tFaces)) tFaces = 5_I4B + IF (PRESENT(edgeCon)) CALL GetEdgeConnectivity_Pyramid(con=edgeCon, & + & opt=edgeOpt) + IF (PRESENT(faceCon)) CALL GetFaceConnectivity_Pyramid(con=faceCon, & + & opt=faceOpt) + + IF (PRESENT(faceElemType)) CALL GetFaceElemType_Tetrahedron( & + & faceElemType=faceElemType, tFaceNodes=tFaceNodes) + +CASE DEFAULT + IF (PRESENT(tNodes)) tNodes = 0_I4B + IF (PRESENT(tEdges)) tEdges = 0_I4B + IF (PRESENT(tFaces)) tFaces = 0_I4B END SELECT +END PROCEDURE RefElemGetGeoParam1 + +!---------------------------------------------------------------------------- +! GetTotalNodes +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetTotalNodes1 +CALL RefElemGetGeoParam(tNodes=ans, elemType=elemType) +END PROCEDURE GetTotalNodes1 + +!---------------------------------------------------------------------------- +! GetTotalEdges +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetTotalEdges1 +CALL RefElemGetGeoParam(tEdges=ans, elemType=elemType) END PROCEDURE GetTotalEdges1 +!---------------------------------------------------------------------------- +! GetTotalFaces +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetTotalFaces1 +CALL RefElemGetGeoParam(tFaces=ans, elemType=elemType) +END PROCEDURE GetTotalFaces1 + +!---------------------------------------------------------------------------- +! GetTotalCells +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetTotalCells1 +CALL RefElemGetGeoParam(tCells=ans, elemType=elemType) +! SELECT CASE (elemType) +! CASE (Point, Line, Triangle, Quadrangle) +! ans = 0_I4B +! CASE (Tetrahedron, Hexahedron, Prism, Pyramid) +! ans = 1_I4B +! END SELECT +END PROCEDURE GetTotalCells1 + !---------------------------------------------------------------------------- ! 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 (Point, Line) CASE (Triangle) - ! CALL GetEdgeConnectivity_Triangle(con=con, opt=opt) + CALL GetEdgeConnectivity_Triangle(con=con, opt=opt) CASE (Quadrangle) - ! CALL GetEdgeConnectivity_Quadrangle(con=con, opt=opt) + CALL GetEdgeConnectivity_Quadrangle(con=con, opt=opt) CASE (Tetrahedron) - ! CALL GetEdgeConnectivity_Tetrahedron(con=con, opt=opt) + CALL GetEdgeConnectivity_Tetrahedron(con=con, opt=opt) CASE (Hexahedron) - ! CALL GetEdgeConnectivity_Hexahedron(con=con, opt=opt) + CALL GetEdgeConnectivity_Hexahedron(con=con, opt=opt) CASE (Prism) - ! CALL GetEdgeConnectivity_Prism(con=con, opt=opt) + 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) + CALL GetEdgeConnectivity_Pyramid(con=con, opt=opt) END SELECT END PROCEDURE GetEdgeConnectivity1 !---------------------------------------------------------------------------- -! GetTotalFaces +! GetFaceConnectivity2 !---------------------------------------------------------------------------- -MODULE PROCEDURE GetTotalFaces1 +MODULE PROCEDURE GetFaceConnectivity1 SELECT CASE (elemType) -CASE (Point) - ans = 0_I4B -CASE (Line) - ans = 0_I4B -CASE (Triangle) - ans = 1_I4B -CASE (Quadrangle) - ans = 1_I4B +! CASE (Point, Line, Triangle, Quadrangle) CASE (Tetrahedron) - ans = 4_I4B + CALL GetFaceConnectivity_Tetrahedron(con=con, opt=opt) CASE (Hexahedron) - ans = 6_I4B + CALL GetFaceConnectivity_Hexahedron(con=con, opt=opt) CASE (Prism) - ans = 5_I4B + CALL GetFaceConnectivity_Prism(con=con, opt=opt) CASE (Pyramid) - ans = 5_I4B + CALL GetFaceConnectivity_Pyramid(con=con, opt=opt) END SELECT -END PROCEDURE GetTotalFaces1 - -!---------------------------------------------------------------------------- -! GetFaceConnectivity2 -!---------------------------------------------------------------------------- - -MODULE PROCEDURE GetFaceConnectivity1 END PROCEDURE GetFaceConnectivity1 !---------------------------------------------------------------------------- -! GetTotalCells +! GetFaceElemType !---------------------------------------------------------------------------- -MODULE PROCEDURE GetTotalCells1 +MODULE PROCEDURE GetFaceElemType1 SELECT CASE (elemType) -CASE (Point, Line, Triangle, Quadrangle) - ans = 0_I4B -CASE (Tetrahedron, Hexahedron, Prism, Pyramid) - ans = 1_I4B +! CASE (Point, Line, Triangle, Quadrangle) +CASE (Tetrahedron) + CALL GetFaceElemType_Tetrahedron(faceElemType=faceElemType, opt=opt, & + & tFaceNodes=tFaceNodes) +CASE (Hexahedron) + CALL GetFaceElemType_Hexahedron(faceElemType=faceElemType, opt=opt, & + & tFaceNodes=tFaceNodes) +CASE (Prism) + CALL GetFaceElemType_Prism(faceElemType=faceElemType, opt=opt, & + & tFaceNodes=tFaceNodes) +CASE (Pyramid) + CALL GetFaceElemType_Pyramid(faceElemType=faceElemType, opt=opt, & + & tFaceNodes=tFaceNodes) END SELECT -END PROCEDURE GetTotalCells1 +END PROCEDURE GetFaceElemType1 !---------------------------------------------------------------------------- ! MeasureSimplex diff --git a/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 index 75cc25ba..b3c00985 100644 --- a/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 @@ -250,6 +250,15 @@ END SELECT END PROCEDURE GetFaceConnectivity_Hexahedron +!---------------------------------------------------------------------------- +! GetFaceElemType_Hexahedron +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetFaceElemType_Hexahedron +faceElemType(1:6) = Quadrangle4 +IF (PRESENT(tFaceNodes)) tFaceNodes(1:6) = 4_I4B +END PROCEDURE GetFaceElemType_Hexahedron + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- diff --git a/src/submodules/Geometry/src/ReferencePrism_Method@Methods.F90 b/src/submodules/Geometry/src/ReferencePrism_Method@Methods.F90 index f0c0ec6b..9f7810e7 100644 --- a/src/submodules/Geometry/src/ReferencePrism_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferencePrism_Method@Methods.F90 @@ -228,6 +228,16 @@ con(1:4, 5) = [4, 5, 6, 0] END PROCEDURE GetFaceConnectivity_Prism +!---------------------------------------------------------------------------- +! GetFaceElemType_Prism +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetFaceElemType_Prism +faceElemType(1:5) = [Triangle3, Quadrangle4, Quadrangle4, Quadrangle4, & + & Triangle3] +IF (PRESENT(tFaceNodes)) tFaceNodes(1:5) = [3, 4, 4, 4, 3] +END PROCEDURE GetFaceElemType_Prism + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- diff --git a/src/submodules/Geometry/src/ReferencePyramid_Method@Methods.F90 b/src/submodules/Geometry/src/ReferencePyramid_Method@Methods.F90 index 684686ad..91c45087 100644 --- a/src/submodules/Geometry/src/ReferencePyramid_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferencePyramid_Method@Methods.F90 @@ -193,6 +193,16 @@ con(1:4, 5) = [1, 2, 5, 0] END PROCEDURE GetFaceConnectivity_Pyramid +!---------------------------------------------------------------------------- +! GetFaceElemType_Pyramid +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetFaceElemType_Pyramid +faceElemType(1:5) = [Quadrangle4, Triangle3, Triangle3, Triangle3, & + & Triangle3] +IF (PRESENT(tFaceNodes)) tFaceNodes(1:5) = [4, 3, 3, 3, 3] +END PROCEDURE GetFaceElemType_Pyramid + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- diff --git a/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 index 11500aac..18c04243 100644 --- a/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 @@ -225,4 +225,13 @@ END SELECT END PROCEDURE GetFaceConnectivity_Tetrahedron +!---------------------------------------------------------------------------- +! GetFaceElemType +!---------------------------------------------------------------------------- + +MODULE PROCEDURE GetFaceElemType_Tetrahedron +faceElemType(1:4) = Triangle3 +IF (PRESENT(tFaceNodes)) tFaceNodes(1:4) = 3_I4B +END PROCEDURE GetFaceElemType_Tetrahedron + END SUBMODULE Methods