From 03c5b788bf72d6ad0db9eac845503e853bcb6e57 Mon Sep 17 00:00:00 2001 From: shion Date: Mon, 15 Apr 2024 15:13:10 +0900 Subject: [PATCH] Updates in ReferenceElement - updating ReferenceLine and Reference Point methods --- .../Geometry/src/ReferencePoint_Method.F90 | 16 ++++++++++++++++ src/modules/GlobalData/src/GlobalData.F90 | 1 + .../ReferenceElement_Method@GeometryMethods.F90 | 3 ++- .../src/ReferenceLine_Method@Methods.F90 | 2 ++ .../src/ReferencePoint_Method@Methods.F90 | 13 +++++++++++++ 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/modules/Geometry/src/ReferencePoint_Method.F90 b/src/modules/Geometry/src/ReferencePoint_Method.F90 index 680df48f..1ef7a39c 100644 --- a/src/modules/Geometry/src/ReferencePoint_Method.F90 +++ b/src/modules/Geometry/src/ReferencePoint_Method.F90 @@ -31,6 +31,7 @@ MODULE ReferencePoint_Method PUBLIC :: Measure_Simplex_Point PUBLIC :: Point_Quality PUBLIC :: Quality_Point +PUBLIC :: TotalNodesInElement_Point !---------------------------------------------------------------------------- ! Initiate@Methods @@ -220,6 +221,21 @@ MODULE FUNCTION Point_Quality(refelem, xij, measure) RESULT(Ans) END FUNCTION Point_Quality END INTERFACE Quality_Point +!---------------------------------------------------------------------------- +! TotalNodesInElement_Point +!---------------------------------------------------------------------------- + +!> author: Shion Shimizu +! date: 2024-04-14 +! summary: Returns total nodes in element + +INTERFACE + MODULE FUNCTION TotalNodesInElement_Point(elemType) RESULT(Ans) + INTEGER(I4B), INTENT(IN) :: elemType + INTEGER(I4B) :: Ans + END FUNCTION TotalNodesInElement_Point +END INTERFACE + !---------------------------------------------------------------------------- ! !---------------------------------------------------------------------------- diff --git a/src/modules/GlobalData/src/GlobalData.F90 b/src/modules/GlobalData/src/GlobalData.F90 index 730c4b0b..9b7742eb 100755 --- a/src/modules/GlobalData/src/GlobalData.F90 +++ b/src/modules/GlobalData/src/GlobalData.F90 @@ -413,6 +413,7 @@ MODULE GlobalData INTEGER(I4B), PARAMETER :: Pyramid13 = 19 INTEGER(I4B), PARAMETER :: Point = 15 INTEGER(I4B), PARAMETER :: Point1 = 15 +INTEGER(I4B), PARAMETER :: Line1 = 15 ! Read material data from ? INTEGER(I4B), PARAMETER :: PhysicalTag = 1 INTEGER(I4B), PARAMETER :: GeometryTag = 2 diff --git a/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 b/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 index 4f038b95..ce9f5c4b 100644 --- a/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 +++ b/src/submodules/Geometry/src/ReferenceElement_Method@GeometryMethods.F90 @@ -19,7 +19,8 @@ USE ErrorHandling, ONLY: Errormsg USE Display_Method -USE ReferencePoint_Method, ONLY: Measure_Simplex_Point, Point_quality +USE ReferencePoint_Method, ONLY: Measure_Simplex_Point, Point_quality, & +& TotalNodesInElement_Point USE ReferenceLine_Method, ONLY: Measure_Simplex_Line, & & Line_quality, & & TotalNodesInElement_Line, & diff --git a/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 index 11a17f7c..0388be93 100644 --- a/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceLine_Method@Methods.F90 @@ -83,6 +83,8 @@ MODULE PROCEDURE TotalNodesInElement_Line SELECT CASE (ElemType) +CASE (Line1) + ans = 1 CASE (Line2) ans = 2 CASE (Line3) diff --git a/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 b/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 index 5c3fe479..23d1edaa 100644 --- a/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferencePoint_Method@Methods.F90 @@ -86,4 +86,17 @@ ans = 0.0_DFP END PROCEDURE Point_Quality +!---------------------------------------------------------------------------- +! TotalNodesInElement +!---------------------------------------------------------------------------- + +MODULE PROCEDURE TotalNodesInElement_Point +SELECT CASE (elemType) +CASE (Point) + ans = 1 +CASE default + ans = 0 +END SELECT +END PROCEDURE TotalNodesInElement_Point + END SUBMODULE Methods