LagrangeDegree
Returns the polynomial space for constructing the Lagrange polynomials.
A Lagrange polynomial is given by
Here span of is called the LagrangeDegree.
- as are given by first column of ans.
- bs are given by second column of ans.
For example for order = 2, we have the following degrees:
which is representd by:
a | b |
---|---|
0 | 0 |
1 | 0 |
2 | 0 |
0 | 1 |
1 | 1 |
2 | 1 |
0 | 2 |
1 | 2 |
2 | 2 |
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION LagrangeDegree_Quadrangle(order) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
INTEGER(I4B), ALLOCATABLE :: ans(:, :)
END FUNCTION LagrangeDegree_Quadrangle
END INTERFACE
order
Order of Lagrange polynomial
ans
- The first col of
ans
denotes the exponent ofx
- The second col of
ans
denotes the exponent ofy
program main
use easifembase
implicit none
integer( i4b ) :: i1, i2, order
integer( i4b ), allocatable :: ans( :, : )
order=1
ans = LagrangeDegree_Quadrangle( order=order )
call display( mdencode(ans), "ans (order="//tostring(order)//")=" )
call blankLines(nol=2)
order=2
ans = LagrangeDegree_Quadrangle( order=order )
call display( mdencode(ans), "ans (order="//tostring(order)//")=" )
call blankLines(nol=2)
order=3
ans = LagrangeDegree_Quadrangle( order=order )
call display( mdencode(ans), "ans (order="//tostring(order)//")=" )
call blankLines(nol=2)
end program main
See results
ans (order=1)=
a | b |
---|---|
0 | 0 |
1 | 0 |
0 | 1 |
1 | 1 |
ans (order=2)=
a | b |
---|---|
0 | 0 |
1 | 0 |
2 | 0 |
0 | 1 |
1 | 1 |
2 | 1 |
0 | 2 |
1 | 2 |
2 | 2 |
ans (order=3)=
a | b |
---|---|
0 | 0 |
1 | 0 |
2 | 0 |
3 | 0 |
0 | 1 |
1 | 1 |
2 | 1 |
3 | 1 |
0 | 2 |
1 | 2 |
2 | 2 |
3 | 2 |
0 | 3 |
1 | 3 |
2 | 3 |
3 | 3 |