From 26cca19304beead2bc7e1941a86946a4fb486d0f Mon Sep 17 00:00:00 2001 From: shion Date: Fri, 22 Mar 2024 18:59:55 +0900 Subject: [PATCH 1/2] EASIFEM-12 adding face connectivity for tetrahedron10 --- .../src/ReferenceTetrahedron_Method@Methods.F90 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 index c92eda1f..afa0b96d 100644 --- a/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 @@ -289,10 +289,24 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE GetFaceConnectivity_Tetrahedron +INTEGER(I4B) :: order0, jj con(1:3, 1) = [1, 3, 2] con(1:3, 2) = [1, 2, 4] con(1:3, 3) = [1, 4, 3] con(1:3, 4) = [2, 3, 4] + +order0 = Input(default=1_I4B, option=order) +jj = 4_I4B + +IF (order0 .EQ. 1_I4B) THEN + RETURN +ELSEIF (order0 .EQ. 2_I4B) THEN + con(jj:6, 1) = [6, 8, 5] + con(jj:6, 2) = [5, 9, 7] + con(jj:6, 3) = [7, 10, 6] + con(jj:6, 4) = [8, 10, 9] +END IF + END PROCEDURE GetFaceConnectivity_Tetrahedron !---------------------------------------------------------------------------- From b0f08dcd5979513d3452c01a74e7d00925bcfd38 Mon Sep 17 00:00:00 2001 From: shion Date: Fri, 22 Mar 2024 20:22:53 +0900 Subject: [PATCH 2/2] EASIFEM-12 adding face connectivity for hexahedron27 --- .../src/ReferenceHexahedron_Method.F90 | 12 ++++- .../ReferenceHexahedron_Method@Methods.F90 | 48 +++++++++++-------- .../ReferenceTetrahedron_Method@Methods.F90 | 9 ++-- 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 b/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 index 81eac952..793f9e4f 100644 --- a/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 +++ b/src/modules/Geometry/src/ReferenceHexahedron_Method.F90 @@ -138,10 +138,12 @@ END SUBROUTINE HexahedronVolume3D !> author: Vikas Sharma, Ph. D. ! date: 2024-03-08 +!> author: Shion Shimizu +! update: 2024-03-22 ! summary: Returns number of edges in the element INTERFACE - MODULE PURE SUBROUTINE GetEdgeConnectivity_Hexahedron(con, opt) + MODULE PURE SUBROUTINE GetEdgeConnectivity_Hexahedron(con, opt, order) INTEGER(I4B), INTENT(INOUT) :: con(:, :) !! Connectivity !! The columns represents the edge number @@ -151,6 +153,8 @@ MODULE PURE SUBROUTINE GetEdgeConnectivity_Hexahedron(con, opt) !! If opt = 1, then edge connectivity for hierarchial approximation !! If opt =2, then edge connectivity for Lagrangian approximation !! opt=1 is default + INTEGER(I4B), OPTIONAL, INTENT(IN) :: order + !! order default is 1 END SUBROUTINE GetEdgeConnectivity_Hexahedron END INTERFACE @@ -160,10 +164,12 @@ END SUBROUTINE GetEdgeConnectivity_Hexahedron !> author: Vikas Sharma, Ph. D. ! date: 2024-03-08 +!> author: Shion Shimizu +! update : 2024-03-22 ! summary: Returns number of edges in the element INTERFACE - MODULE PURE SUBROUTINE GetFaceConnectivity_Hexahedron(con, opt) + MODULE PURE SUBROUTINE GetFaceConnectivity_Hexahedron(con, opt, order) INTEGER(I4B), INTENT(INOUT) :: con(:, :) !! Connectivity !! The columns represents the face number @@ -173,6 +179,8 @@ MODULE PURE SUBROUTINE GetFaceConnectivity_Hexahedron(con, opt) !! If opt = 1, then face connectivity for hierarchial approximation !! If opt =2, then face connectivity for Lagrangian approximation !! opt=1 is default + INTEGER(I4B), OPTIONAL, INTENT(IN) :: order + !! order default is 1 END SUBROUTINE GetFaceConnectivity_Hexahedron END INTERFACE diff --git a/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 index 08d67e26..08ea49c6 100644 --- a/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceHexahedron_Method@Methods.F90 @@ -208,6 +208,7 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE GetEdgeConnectivity_Hexahedron +INTEGER(I4B) :: order0, ii, jj, iface con(1:2, 1) = [1, 2] con(1:2, 2) = [1, 4] con(1:2, 3) = [1, 5] @@ -220,6 +221,17 @@ con(1:2, 10) = [5, 8] con(1:2, 11) = [6, 7] con(1:2, 12) = [7, 8] + +order0 = Input(default=1_I4B, option=order) +jj = 8 + +DO iface = 1, 12 + DO ii = 1, order0 - 1 + con(2 + ii, iface) = jj + ii + END DO + jj = jj + order0 - 1 +END DO + END PROCEDURE GetEdgeConnectivity_Hexahedron !---------------------------------------------------------------------------- @@ -227,33 +239,27 @@ !---------------------------------------------------------------------------- MODULE PROCEDURE GetFaceConnectivity_Hexahedron +INTEGER(I4B) :: order0, ii con(1:4, 1) = [1, 4, 3, 2] ! back con(1:4, 2) = [5, 6, 7, 8] ! front con(1:4, 3) = [1, 5, 8, 4] ! left con(1:4, 4) = [2, 3, 7, 6] ! right con(1:4, 5) = [1, 2, 6, 5] ! bottom con(1:4, 6) = [3, 4, 8, 7] ! top -! INTEGER(I4B) :: opt0 -! -! opt0 = Input(default=1_I4B, option=opt) -! -! SELECT CASE (opt0) -! CASE (1_I4B) -! con(1:4, 1) = [1, 2, 3, 4] ! back -! con(1:4, 2) = [5, 6, 7, 8] ! front -! con(1:4, 3) = [1, 4, 8, 5] ! left -! con(1:4, 4) = [2, 3, 7, 6] ! right -! con(1:4, 5) = [1, 2, 6, 5] ! bottom -! con(1:4, 6) = [4, 3, 7, 8] ! top -! -! CASE (2_I4B) -! con(1:4, 1) = [1, 4, 3, 2] ! back -! con(1:4, 2) = [5, 6, 7, 8] ! front -! con(1:4, 3) = [1, 5, 8, 4] ! left -! con(1:4, 4) = [2, 3, 7, 6] ! right -! con(1:4, 5) = [1, 2, 6, 5] ! bottom -! con(1:4, 6) = [3, 4, 8, 7] ! top -! END SELECT + +order0 = Input(default=1_I4B, option=order) +ii = 5 + +SELECT CASE (order0) +CASE (2_I4B) + con(ii:8, 1) = [10, 14, 12, 9, 21] ! back + con(ii:8, 2) = [17, 19, 20, 18, 22] ! front + con(ii:8, 3) = [11, 18, 16, 10, 23] ! left + con(ii:8, 4) = [12, 15, 19, 13, 24] ! right + con(ii:8, 5) = [9, 13, 17, 11, 25] ! bottom + con(ii:8, 6) = [14, 16, 20, 15, 26] ! top +END SELECT + END PROCEDURE GetFaceConnectivity_Hexahedron !---------------------------------------------------------------------------- diff --git a/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 b/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 index afa0b96d..24eef42c 100644 --- a/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 +++ b/src/submodules/Geometry/src/ReferenceTetrahedron_Method@Methods.F90 @@ -278,8 +278,8 @@ DO iface = 1, 6 DO ii = 1, order0 - 1 con(2 + ii, iface) = jj + ii - jj = jj + 1 END DO + jj = jj + order0 - 1 END DO END PROCEDURE GetEdgeConnectivity_Tetrahedron @@ -298,14 +298,13 @@ order0 = Input(default=1_I4B, option=order) jj = 4_I4B -IF (order0 .EQ. 1_I4B) THEN - RETURN -ELSEIF (order0 .EQ. 2_I4B) THEN +SELECT CASE (order0) +CASE (2_I4B) con(jj:6, 1) = [6, 8, 5] con(jj:6, 2) = [5, 9, 7] con(jj:6, 3) = [7, 10, 6] con(jj:6, 4) = [8, 10, 9] -END IF +END SELECT END PROCEDURE GetFaceConnectivity_Tetrahedron