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