Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adding FaceConnectivity methods to 3D elems #297

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/modules/Geometry/src/ReferenceHexahedron_Method.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand Down
48 changes: 27 additions & 21 deletions src/submodules/Geometry/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -220,40 +221,45 @@
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

!----------------------------------------------------------------------------
! GetFaceConnectivity_Hexahedron
!----------------------------------------------------------------------------

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

!----------------------------------------------------------------------------
Expand Down
15 changes: 14 additions & 1 deletion src/submodules/Geometry/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -289,10 +289,23 @@
!----------------------------------------------------------------------------

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

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 SELECT

END PROCEDURE GetFaceConnectivity_Tetrahedron

!----------------------------------------------------------------------------
Expand Down
Loading