RecursiveNode2D
Returns the barycentric coordinates of recursive nodes on the triangle.
Interface
INTERFACE
MODULE FUNCTION RecursiveNode2D(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) = 3 corresponding to b0, b1, b2
!! size(ans,2) total number of points
CHARACTER(*), OPTIONAL, INTENT(IN) :: domain
!! unit
!! Biunit
!! Equilateral
END FUNCTION RecursiveNode2D
END INTERFACE
orderOrder of element.
ipTypeInterpolation point type. Following values are allowed.
- Equidistance
- GaussJacobi
- GaussJacobiLobatto
- GaussChebyshev
- GaussChebyshevLobatto
- GaussLegendre
- GaussLegendreLobatto
- GaussUltraspherical
- GaussUltrasphericalLobatto
domainIt 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 2.BIUNIT, biunit segment , in this caseSIZE(ans, 1)is 2.BARYCENTRIC, in this caseSIZE(ans,1)is 3. This is also the default value.
Examples
- ️܀ Example 1
- Example 2
- ↢
- In this example
ipType=Equidistance
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
integer(i4b) :: iptype = Equidistance
b = RecursiveNode2D(order=0, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
| 0.33333 |
| 0.33333 |
| 0.33333 |
b = RecursiveNode2D(order=1, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
b = RecursiveNode2D(order=2, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
| 0 | 0 | 0 | 0.5 | 0.5 | 1 |
| 0 | 0.5 | 1 | 0 | 0.5 | 0 |
| 1 | 0.5 | 0 | 0.5 | 0 | 0 |
b = RecursiveNode2D(order=3, ipType=ipType)
call Display(MdEncode(transpose(b)), "b=")
b=
| 0 | 0 | 1 |
| 0 | 0.33333 | 0.66667 |
| 0 | 0.66667 | 0.33333 |
| 0 | 1 | 0 |
| 0.33333 | 0 | 0.66667 |
| 0.33333 | 0.33333 | 0.33333 |
| 0.33333 | 0.66667 | 0 |
| 0.66667 | 0 | 0.33333 |
| 0.66667 | 0.33333 | 0 |
| 1 | 0 | 0 |
END PROGRAM main
This example is similar to example 2, but in this case we test domain option.
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
b = RecursiveNode2D(order=3, ipType=Equidistance, domain="Unit")
call Display(MdEncode(transpose(b)), "b=")
b=
| x1 | x2 |
|---|---|
| 0 | 0 |
| 0 | 0.33333 |
| 0 | 0.66667 |
| 0 | 1 |
| 0.33333 | 0 |
| 0.33333 | 0.33333 |
| 0.33333 | 0.66667 |
| 0.66667 | 0 |
| 0.66667 | 0.33333 |
| 1 | 0 |
b = RecursiveNode2D(order=3, ipType=Equidistance, domain="biunit")
call Display(MdEncode(transpose(b)), "b=")
b=
| x1 | x2 |
|---|---|
| -1 | -1 |
| -1 | -0.33333 |
| -1 | 0.33333 |
| -1 | 1 |
| -0.33333 | -1 |
| -0.33333 | -0.33333 |
| -0.33333 | 0.33333 |
| 0.33333 | -1 |
| 0.33333 | -0.33333 |
| 1 | -1 |
b = RecursiveNode2D(order=3, ipType=Equidistance, domain="barycentric")
call Display(MdEncode(transpose(b)), "b=")
b=
| b0 | b1 | b2 |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 0.33333 | 0.66667 |
| 0 | 0.66667 | 0.33333 |
| 0 | 1 | 0 |
| 0.33333 | 0 | 0.66667 |
| 0.33333 | 0.33333 | 0.33333 |
| 0.33333 | 0.66667 | 0 |
| 0.66667 | 0 | 0.33333 |
| 0.66667 | 0.33333 | 0 |
| 1 | 0 | 0 |
b = RecursiveNode2D(order=3, ipType=Equidistance, domain="Equilateral")
call Display(MdEncode(transpose(b)), "b=")
b=
| x1 | x2 |
|---|---|
| -1 | -0.57735 |
| -0.66667 | 9.61481E-17 |
| -0.33333 | 0.57735 |
| 1.11022E-16 | 1.1547 |
| -0.33333 | -0.57735 |
| 0 | 0 |
| 0.33333 | 0.57735 |
| 0.33333 | -0.57735 |
| 0.66667 | 0 |
| 1 | -0.57735 |
END PROGRAM main
- In this example
ipType=GaussLegendreLobatto
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
integer(i4b) :: iptype = GaussLegendreLobatto
b = RecursiveNode2D(order=0, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
| 0.33333 |
| 0.33333 |
| 0.33333 |
b = RecursiveNode2D(order=1, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
b = RecursiveNode2D(order=2, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
| 8.32667E-17 | 0 | 8.32667E-17 | 0.5 | 0.5 | 1 |
| 8.32667E-17 | 0.5 | 1 | 0 | 0.5 | 8.32667E-17 |
| 1 | 0.5 | 8.32667E-17 | 0.5 | 0 | 8.32667E-17 |
b = RecursiveNode2D(order=3, ipType=ipType)
call Display(MdEncode(transpose(b)), "b=")
b=
| -8.32667E-17 | -8.32667E-17 | 1 |
| 4.01682E-17 | 0.27639 | 0.72361 |
| 4.01682E-17 | 0.72361 | 0.27639 |
| -8.32667E-17 | 1 | -8.32667E-17 |
| 0.27639 | 4.01682E-17 | 0.72361 |
| 0.33333 | 0.33333 | 0.33333 |
| 0.27639 | 0.72361 | 4.01682E-17 |
| 0.72361 | 4.01682E-17 | 0.27639 |
| 0.72361 | 0.27639 | 4.01682E-17 |
| 1 | -8.32667E-17 | -8.32667E-17 |
END PROGRAM main