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

Updates in reference prism #291

Merged
merged 1 commit into from
Mar 9, 2024
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
18 changes: 17 additions & 1 deletion src/modules/Geometry/src/ReferencePrism_Method.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ MODULE ReferencePrism_Method
PUBLIC :: Initiate
PUBLIC :: ReferencePrism
PUBLIC :: ReferencePrism_Pointer
PUBLIC :: highOrderElement_Prism
PUBLIC :: HighOrderElement_Prism
PUBLIC :: Measure_Simplex_Prism
PUBLIC :: Prism_Quality
PUBLIC :: Quality_Prism
PUBLIC :: GetEdgeConnectivity_Prism
PUBLIC :: GetFaceConnectivity_Prism
PUBLIC :: RefCoord_Prism

!----------------------------------------------------------------------------
! Initiate@Prism
Expand Down Expand Up @@ -214,4 +215,19 @@ MODULE SUBROUTINE GetFaceConnectivity_Prism(con, opt)
END SUBROUTINE GetFaceConnectivity_Prism
END INTERFACE

!----------------------------------------------------------------------------
! RefCoord_Prism
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2023-08-09
! summary: Reference Coordinates of prism

INTERFACE
MODULE PURE FUNCTION RefCoord_Prism(refPrism) RESULT(ans)
CHARACTER(*), INTENT(IN) :: refPrism
REAL(DFP) :: ans(3, 6)
END FUNCTION RefCoord_Prism
END INTERFACE

END MODULE ReferencePrism_Method
16 changes: 0 additions & 16 deletions src/modules/Polynomial/src/PrismInterpolationUtility.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ MODULE PrismInterpolationUtility
PUBLIC :: LagrangeCoeff_Prism
PUBLIC :: QuadraturePoint_Prism
PUBLIC :: TensorQuadraturePoint_Prism
PUBLIC :: RefCoord_Prism
PUBLIC :: RefElemDomain_Prism
PUBLIC :: LagrangeEvalAll_Prism
PUBLIC :: LagrangeGradientEvalAll_Prism
Expand Down Expand Up @@ -103,21 +102,6 @@ MODULE FUNCTION RefElemDomain_Prism(baseContinuity, baseInterpol) &
END FUNCTION RefElemDomain_Prism
END INTERFACE

!----------------------------------------------------------------------------
! RefCoord_Prism
!----------------------------------------------------------------------------

!> author: Vikas Sharma, Ph. D.
! date: 2023-08-09
! summary: Reference Coordinates of prism

INTERFACE
MODULE PURE FUNCTION RefCoord_Prism(refPrism) RESULT(ans)
CHARACTER(*), INTENT(IN) :: refPrism
REAL(DFP) :: ans(3, 6)
END FUNCTION RefCoord_Prism
END INTERFACE

!----------------------------------------------------------------------------
! LagrangeDegree_Prism
!----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/submodules/Geometry/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
!
!----------------------------------------------------------------------------

MODULE PROCEDURE Hexahedron_quality
MODULE PROCEDURE Hexahedron_Quality
ans = 0.0_I4B
! TODO Implement Hexahedron_quality
END PROCEDURE Hexahedron_quality
Expand Down
61 changes: 50 additions & 11 deletions src/submodules/Geometry/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

MODULE PROCEDURE Initiate_ref_Prism
INTEGER(I4B) :: ii, jj
INTEGER(I4B), PARAMETER :: tNodes = 6, tFaces=5, tEdges=9, xidim=3, &
& max_nodes_face = 4, min_nodes_face=3, name=Prism
INTEGER(I4B) :: p1p2(2, tEdges), lloop(max_nodes_face+2, tFaces), &
INTEGER(I4B), PARAMETER :: tNodes = 6, tFaces = 5, tEdges = 9, xidim = 3, &
& max_nodes_face = 4, min_nodes_face = 3, name = Prism
INTEGER(I4B) :: p1p2(2, tEdges), lloop(max_nodes_face + 2, tFaces), &
& vol(tNodes, 1)
REAL(DFP) :: unit_xij(xidim, tNodes), biunit_xij(xidim, tNodes)

Expand Down Expand Up @@ -95,7 +95,7 @@
jj = jj + obj%entityCounts(2)
DO ii = 1, obj%entityCounts(3)
obj%topology(jj + ii) = ReferenceTopology( &
& lloop(2+1:2+lloop(1,ii), ii), lloop(2, ii))
& lloop(2 + 1:2 + lloop(1, ii), ii), lloop(2, ii))
END DO

jj = jj + obj%entityCounts(3)
Expand All @@ -107,7 +107,7 @@
END PROCEDURE Initiate_ref_Prism

!----------------------------------------------------------------------------
! ReferencePrism
! ReferencePrism
!----------------------------------------------------------------------------

MODULE PROCEDURE reference_Prism
Expand All @@ -132,9 +132,9 @@
! FIX #250
END PROCEDURE highOrderElement_Prism

!-----------------------------------------------------------------------------
!----------------------------------------------------------------------------
! MeasureSimplex
!-----------------------------------------------------------------------------
!----------------------------------------------------------------------------

MODULE PROCEDURE Measure_Simplex_Prism
INTEGER(I4B) :: fm(5, 7), node0(5, 4), order0(5), b, iface
Expand All @@ -153,14 +153,15 @@
END PROCEDURE Measure_Simplex_Prism

!----------------------------------------------------------------------------
!
! Prism_Quality
!----------------------------------------------------------------------------

MODULE PROCEDURE Prism_quality
END PROCEDURE Prism_quality
MODULE PROCEDURE Prism_Quality
ans = 0.0_DFP
END PROCEDURE Prism_Quality

!----------------------------------------------------------------------------
!
! PolyhedronVolume3D
!----------------------------------------------------------------------------

MODULE PROCEDURE PolyhedronVolume3D
Expand Down Expand Up @@ -190,6 +191,44 @@
ans = ans / 6.0_DFP
END PROCEDURE PolyhedronVolume3D

!----------------------------------------------------------------------------
! Refcoord_Prism
!----------------------------------------------------------------------------

MODULE PROCEDURE RefCoord_Prism
ans = 0.0_DFP
!FIX: Implement RefCoord_Prism
!ISSUE: #251
END PROCEDURE RefCoord_Prism

!----------------------------------------------------------------------------
! GetEdgeConnectivity_Prism
!----------------------------------------------------------------------------

MODULE PROCEDURE GetEdgeConnectivity_Prism
con(1:2, 1) = [1, 2]
con(1:2, 2) = [1, 3]
con(1:2, 3) = [1, 4]
con(1:2, 4) = [2, 3]
con(1:2, 5) = [2, 5]
con(1:2, 6) = [3, 6]
con(1:2, 7) = [4, 5]
con(1:2, 8) = [4, 6]
con(1:2, 9) = [5, 6]
END PROCEDURE GetEdgeConnectivity_Prism

!----------------------------------------------------------------------------
! GetFaceConnectivity_Prism
!----------------------------------------------------------------------------

MODULE PROCEDURE GetFaceConnectivity_Prism
con(1:3, 1) = [1, 3, 2, 0]
con(1:4, 2) = [2, 3, 6, 5]
con(1:4, 3) = [1, 2, 5, 4]
con(1:4, 4) = [1, 4, 6, 3]
con(1:3, 5) = [4, 5, 6, 0]
END PROCEDURE GetFaceConnectivity_Prism

!----------------------------------------------------------------------------
!
!----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/submodules/Geometry/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@
!
!----------------------------------------------------------------------------

MODULE PROCEDURE Quadrangle_quality
MODULE PROCEDURE Quadrangle_Quality
ans = 0.0_DFP
END PROCEDURE Quadrangle_quality
END PROCEDURE Quadrangle_Quality

!----------------------------------------------------------------------------
! QuadArea3D
Expand Down
7 changes: 4 additions & 3 deletions src/submodules/Geometry/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@
!
!----------------------------------------------------------------------------

MODULE PROCEDURE Tetrahedron_quality
! TODO Implement Tetrahedron_quality
END PROCEDURE Tetrahedron_quality
MODULE PROCEDURE Tetrahedron_Quality
ans = 0.0_DFP
! TODO Implement Tetrahedron_Quality
END PROCEDURE Tetrahedron_Quality

!----------------------------------------------------------------------------
! TetrahedronVolume3D
Expand Down
22 changes: 2 additions & 20 deletions src/submodules/Polynomial/src/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@
!----------------------------------------------------------------------------

MODULE PROCEDURE EdgeConnectivity_Prism
ans(:, 1) = [1, 2]
ans(:, 2) = [1, 3]
ans(:, 3) = [1, 4]
ans(:, 4) = [2, 3]
ans(:, 5) = [2, 5]
ans(:, 6) = [3, 6]
ans(:, 7) = [4, 5]
ans(:, 8) = [4, 6]
ans(:, 9) = [5, 6]
CALL GetEdgeConnectivity_Prism(con=ans)
END PROCEDURE EdgeConnectivity_Prism

!----------------------------------------------------------------------------
Expand All @@ -54,7 +46,7 @@
!----------------------------------------------------------------------------

MODULE PROCEDURE RefElemDomain_Prism
!FIX: Implement RefElemDomain_Prism
!FIX: Implement RefElemDomain_Prism
CALL Errormsg(&
& msg="[WORK IN PROGRESS] We are working on it", &
& file=__FILE__, &
Expand All @@ -63,16 +55,6 @@
& unitno=stderr)
END PROCEDURE RefElemDomain_Prism

!----------------------------------------------------------------------------
! Refcoord_Prism
!----------------------------------------------------------------------------

MODULE PROCEDURE RefCoord_Prism
ans = 0.0_DFP
!FIX: Implement RefCoord_Prism
!ISSUE: #251
END PROCEDURE RefCoord_Prism

!----------------------------------------------------------------------------
! LagrangeDegree_Prism
!----------------------------------------------------------------------------
Expand Down