RecursiveNode1D
Returns the barycentric coordinates of recursive nodes on the line.
Interface
INTERFACE
MODULE FUNCTION RecursiveNode1D(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
CHARACTER(*), OPTIONAL, INTENT(IN) :: domain
!! unit (0,1)
!! biunit (-1, 1)
!! equilateral
REAL(DFP), ALLOCATABLE :: ans(:, :)
!! barycentric coordinates, in xiJ format
!! size(ans,1) = 2 corresponding to b0 and b1
!! size(ans,2) total number of points
END FUNCTION RecursiveNode1D
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 1.BIUNIT
, biunit segment , in this caseSIZE(ans, 1)
is 1.BARYCENTRIC
, in this caseSIZE(ans,1)
is 2.
- ️܀ Example 1
- Example 2
- Example 3
- ↢
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
b = RecursiveNode1D(order=0, ipType=Equidistance)
call Display(MdEncode(b), "b="//char_lf)
b = RecursiveNode1D(order=1, ipType=Equidistance)
call Display(MdEncode(b), "b="//char_lf)
b = RecursiveNode1D(order=2, ipType=Equidistance)
call Display(MdEncode(b), "b="//char_lf)
b = RecursiveNode1D(order=3, ipType=Equidistance)
call Display(MdEncode(b), "b="//char_lf)
END PROGRAM main
Order 0
b =
0.5 |
0.5 |
Order 1
b =
0 | 1 |
1 | 0 |
Order 2
b =
0 | 0.5 | 1 |
1 | 0.5 | 0 |
Order 3
b =
0 | 0.33333 | 0.66667 | 1 |
1 | 0.66667 | 0.33333 | 0 |
This example is similar to example 1, but in this case we test domain option.
PROGRAM main
use easifemBase
real( DFP ), allocatable :: b( :, : )
b = RecursiveNode1D(order=3, ipType=Equidistance, &
& domain="Unit")
call Display(b, "b Unit=")
b = RecursiveNode1D(order=3, ipType=Equidistance, &
& domain="Biunit")
call Display(b, "b BiUnit=")
b = RecursiveNode1D(order=3, ipType=Equidistance, &
& domain="Barycentric")
call Display(b, "b Barycentric=")
b = RecursiveNode1D(order=3, ipType=Equidistance, &
& domain="Equilateral")
call Display(b, "b Equilateral=")
END PROGRAM main
See results
b Unit=
----------------------------------
0.00000 0.33333 0.66667 1.00000
b BiUnit=
--------------------------------------
-1.00000 -0.33333 0.33333 1.00000
b Barycentric=
----------------------------------
0.00000 0.33333 0.66667 1.00000
1.00000 0.66667 0.33333 0.00000
b Equilateral=
--------------------------------------
-1.00000 -0.33333 0.33333 1.00000
- In this example
ipType=GaussLegendreLobatto
PROGRAM main
use easifemBase
real(DFP), allocatable :: b( :, : )
integer(i4b), parameter :: ipType=GaussLegendreLobatto
b = RecursiveNode1D(order=0, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
0.5 |
0.5 |
b = RecursiveNode1D(order=1, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
0 | 1 |
1 | 0 |
b = RecursiveNode1D(order=2, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
1.11022E-16 | 0.5 | 1 |
1 | 0.5 | 1.11022E-16 |
b = RecursiveNode1D(order=4, ipType=ipType)
call Display(MdEncode(b), "b="//char_lf)
b=
-1.11022E-16 | 0.17267 | 0.5 | 0.82733 | 1 |
1 | 0.82733 | 0.5 | 0.17267 | -1.11022E-16 |
END PROGRAM main