UnscaledLobattoMonomialExpansionAll
Returns all the monomial expansion of all UnscaledLobatto polynomials.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION UnscaledLobattoMonomialExpansionAll(n) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n
REAL(DFP) :: ans(1:n + 1, 1:n + 1)
END FUNCTION UnscaledLobattoMonomialExpansionAll
END INTERFACE
- n : is the order of the polynomial
- ans(:,i) contains the coefficient of monomials for polynomial order=i-1
for example, n=5, we have the following structure of ans.
P0 | P1 | P2 | P3 | P4 | P5 |
---|---|---|---|---|---|
1 | 0 | -0.5 | -0 | 0.375 | 0 |
0 | 1 | 0 | -1.5 | -0 | 1.875 |
0 | 0 | 1.5 | 0 | -3.75 | -0 |
0 | 0 | 0 | 2.5 | 0 | -8.75 |
0 | 0 | 0 | 0 | 4.375 | 0 |
0 | 0 | 0 | 0 | 0 | 7.875 |
This example shows the usage of UnscaledLobattoMonomialExpansionAll
method.
This routine returns the monomial expansion.
program main
use easifembase
implicit none
integer( i4b ) :: n
real( dfp ), allocatable :: coeff(:, :)
type(string) :: astr
n = 5
coeff=UnscaledLobattoMonomialExpansionAll( n=n )
astr = MdEncode( coeff )
call display( astr%chars(), "" )
end program main
P0 | P1 | P2 | P3 | P4 | P5 |
---|---|---|---|---|---|
0.5 | 0.5 | -0.5 | -0 | 0.125 | 0 |
-0.5 | 0.5 | 0 | -0.5 | -0 | 0.375 |
0 | 0 | 0.5 | 0 | -0.75 | -0 |
0 | 0 | 0 | 0.5 | 0 | -1.25 |
0 | 0 | 0 | 0 | 0.625 | 0 |
0 | 0 | 0 | 0 | 0 | 0.875 |