QuadraturePoint_Tetrahedron
This function returns the quadrature points on the tetrahedron.
Calling example.
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE QuadraturePoint_Tetrahedron
MODULE FUNCTION QuadraturePoint_Tetrahedron1(&
& order, &
& quadType, &
& refTetrahedron, &
& xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order of integrand
INTEGER(I4B), INTENT(IN) :: quadType
!! quadrature point type
!! currently this variable is not used
CHARACTER(*), INTENT(IN) :: refTetrahedron
!! Reference triangle
!! BIUNIT
!! UNIT
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! nodal coordinates of triangle.
!! The number of rows in xij should be 3.
!! The number of columns in xij should be 4
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! Quadrature points
END FUNCTION QuadraturePoint_Tetrahedron1
END INTERFACE QuadraturePoint_Tetrahedron
refTetrahedron
refTetrahedron
can be UNIT
or BIUNIT
. By default, quadrature points are computed on the unit tetrahedron domain. This argument is used to transfer those points to the specified domain of the tetrahedron. If xij
is present then this argument is ignored.
xij
Nodal coordinates of the tetrahedron. The number of rows should be 3 corresponding to components. The number of columns in xij
should be 4 corresponding to the 4 vertices of tetrahedron. The returned quadrature points will be in this domain.
PROGRAM main
USE easifemBase
IMPLICIT NONE
REAL(dfp), ALLOCATABLE :: xij(:, :), ans(:, :)
INTEGER(I4B) :: order, quadType
TYPE(String) :: refTetrahedron
refTetrahedron = "UNIT"
order = 1
quadType = GaussLegendre
ans = QuadraturePoint_Tetrahedron(&
& order=order, &
& quadType=quadType, &
& refTetrahedron=refTetrahedron%chars())
CALL Display(mdencode(ans) , "ans" // char_lf2 )
See results
Ans
0.25 |
0.25 |
0.25 |
0.16667 |
refTetrahedron = "BIUNIT"
order = 1
quadType = GaussLegendre
ans = QuadraturePoint_Tetrahedron(&
& order=order, &
& quadType=quadType, &
& refTetrahedron=refTetrahedron%chars())
CALL Display(mdencode(ans) , "ans" // char_lf2 )
Ans
-0.5 |
-0.5 |
-0.5 |
1.3333 |
refTetrahedron = "UNIT"
xij = 2.0_DFP + RefCoord_Tetrahedron(refTetrahedron%chars())
order = 1
quadType = GaussLegendre
ans = QuadraturePoint_Tetrahedron(&
& order=order, &
& quadType=quadType, &
& refTetrahedron=refTetrahedron%chars())
CALL Display(mdencode(ans) , "ans" // char_lf2 )
END PROGRAM main
See results
Ans
0.25 |
0.25 |
0.25 |
0.16667 |
Interface 2
INTERFACE QuadraturePoint_Tetrahedron
MODULE FUNCTION QuadraturePoint_Tetrahedron2(&
& nips, &
& quadType, &
& refTetrahedron, &
& xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: nips(1)
!! nips(1) .LE. 79, then we call
!! economical quadrature rules.
!! Otherwise, this routine will retport
!! error
INTEGER(I4B), INTENT(IN) :: quadType
!! quadrature point type,
!! currently this variable is not used
CHARACTER(*), INTENT(IN) :: refTetrahedron
!! Reference triangle
!! BIUNIT
!! UNIT
REAL(DFP), OPTIONAL, INTENT(IN) :: xij(:, :)
!! nodal coordinates of triangle.
!! The number of rows in xij should be 3
!! The number of columns in xij should be 4
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! Quadrature points
END FUNCTION QuadraturePoint_Tetrahedron2
END INTERFACE QuadraturePoint_Tetrahedron
Return quadrature points by specifying the number of integration points nips
. Currently, following nips
are allowed.
1, 4, 5, 11, 14, 24, 31, 43, 53, 126, 210, 330, 495, 715, 1001