RecursiveNode3D
Returns the barycentric coordinates of recursive nodes on a tetrahedron.
Interface
INTERFACE
MODULE FUNCTION RecursiveNode3D(order, ipType, &
& domain) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order >= 0
INTEGER(I4B), INTENT(IN) :: ipType
!! interpolation point type
!! Equidistance
!! LobattoGaussJacobi
!! LobattoGaussChebyshev
!! LobattoGaussGegenbauer
!! GaussJacobi
!! GaussChebyshev
!! GaussGegenbauer
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! barycentric coordinates, in xiJ format
!! size(ans,1) = 4 corresponding to b0, b1, b2, b3
!! size(ans,2) total number of points
CHARACTER(*), OPTIONAL, INTENT(IN) :: domain
!! unit
!! Biunit
!! Equilateral
END FUNCTION RecursiveNode3D
END INTERFACE
order
Order of element.
ipType
Interpolation point type. Following values are allowed.
- Equidistance
- GaussJacobi
- GaussJacobiLobatto
- GaussChebyshev
- GaussChebyshevLobatto
- GaussLegendre
- GaussLegendreLobatto
- GaussUltraspherical
- GaussUltrasphericalLobatto
domain
It specifies the domain of the element. It is an optional argument. It can take following values:
UNIT
, unit segment , in this caseSIZE(ans,1)
is 3.BIUNIT
, biunit segment , in this caseSIZE(ans, 1)
is 3.BARYCENTRIC
, in this caseSIZE(ans,1)
is 4. This is also the default value.
Examples
- ️܀ Example
- Example 2
- ↢
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
b = RecursiveNode3D(order=0, ipType=Equidistance)
call Display(b, "b=")
b = RecursiveNode3D(order=1, ipType=Equidistance)
call Display(MdEncode(b), "b=")
b=
0 | 0 | 0 | 1 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
1 | 0 | 0 | 0 |
b = RecursiveNode3D(order=2, ipType=Equidistance)
call Display(MdEncode(b), "b=")
b=
0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0.5 | 0.5 | 1 |
0 | 0 | 0 | 0.5 | 0.5 | 1 | 0 | 0 | 0.5 | 0 |
0 | 0.5 | 1 | 0 | 0.5 | 0 | 0 | 0.5 | 0 | 0 |
1 | 0.5 | 0 | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 |
b = RecursiveNode3D(order=3, ipType=Equidistance)
call Display(MdEncode(transpose(b)), "b=")
b=
0 | 0 | 0 | 1 |
0 | 0 | 0.33333 | 0.66667 |
0 | 0 | 0.66667 | 0.33333 |
0 | 0 | 1 | 0 |
0 | 0.33333 | 0 | 0.66667 |
0 | 0.33333 | 0.33333 | 0.33333 |
0 | 0.33333 | 0.66667 | 0 |
0 | 0.66667 | 0 | 0.33333 |
0 | 0.66667 | 0.33333 | 0 |
0 | 1 | 0 | 0 |
0.33333 | 0 | 0 | 0.66667 |
0.33333 | 0 | 0.33333 | 0.33333 |
0.33333 | 0 | 0.66667 | 0 |
0.33333 | 0.33333 | 0 | 0.33333 |
0.33333 | 0.33333 | 0.33333 | 0 |
0.33333 | 0.66667 | 0 | 0 |
0.66667 | 0 | 0 | 0.33333 |
0.66667 | 0 | 0.33333 | 0 |
0.66667 | 0.33333 | 0 | 0 |
1 | 0 | 0 | 0 |
END PROGRAM main
This example is similar to example 3 but in this case we test domain.
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
b = RecursiveNode3D(order=2, ipType=Equidistance, &
& domain="unit")
call Display(MdEncode(transpose(b)), "b=")
b=
x1 | x2 | x3 |
---|---|---|
0 | 0 | 0 |
0 | 0 | 0.5 |
0 | 0 | 1 |
0 | 0.5 | 0 |
0 | 0.5 | 0.5 |
0 | 1 | 0 |
0.5 | 0 | 0 |
0.5 | 0 | 0.5 |
0.5 | 0.5 | 0 |
1 | 0 | 0 |
b = RecursiveNode3D(order=2, ipType=Equidistance, &
& domain="biunit")
call Display(MdEncode(transpose(b)), "b=")
b=
x1 | x2 | x3 |
---|---|---|
-1 | -1 | -1 |
-1 | -1 | 0 |
-1 | -1 | 1 |
-1 | 0 | -1 |
-1 | 0 | 0 |
-1 | 1 | -1 |
0 | -1 | -1 |
0 | -1 | 0 |
0 | 0 | -1 |
1 | -1 | -1 |
b = RecursiveNode3D(order=2, ipType=Equidistance, &
& domain="barycentric")
call Display(MdEncode(transpose(b)), "b=")
b=
b0 | b1 | b2 | b3 |
---|---|---|---|
0 | 0 | 0 | 1 |
0 | 0 | 0.5 | 0.5 |
0 | 0 | 1 | 0 |
0 | 0.5 | 0 | 0.5 |
0 | 0.5 | 0.5 | 0 |
0 | 1 | 0 | 0 |
0.5 | 0 | 0 | 0.5 |
0.5 | 0 | 0.5 | 0 |
0.5 | 0.5 | 0 | 0 |
1 | 0 | 0 | 0 |
!!! note "Equilateral"
b = RecursiveNode3D(order=2, ipType=Equidistance, &
& domain="Equilateral")
call Display(MdEncode(transpose(b)), "b=")
b=
x1 | x2 | x3 |
---|---|---|
-1 | -0.57735 | -0.40825 |
-0.5 | -0.28868 | 0.40825 |
0 | 0 | 1.2247 |
-0.5 | 0.28868 | -0.40825 |
-5.55112E-17 | 0.57735 | 0.40825 |
0 | 1.1547 | -0.40825 |
5.55112E-17 | -0.57735 | -0.40825 |
0.5 | -0.28868 | 0.40825 |
0.5 | 0.28868 | -0.40825 |
1 | -0.57735 | -0.40825 |
END PROGRAM main