UnscaledLobattoMassMatrix
Returns the Mass matrix for UnscaledLobatto polynomials.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION UnscaledLobattoMassMatrix(n) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n
REAL(DFP) :: ans(n + 1, n + 1)
END FUNCTION UnscaledLobattoMassMatrix
END INTERFACE
This example shows the usage of UnscaledLobattoMassMatrix
method.
This routine evaluates mass matrix for lobatto polynomials.
program main
use easifembase
implicit none
integer( i4b ) :: n
real( dfp ), allocatable :: ans(:,:)
type(string) :: astr
n = 0
call callme
0.66667 |
n = 1
call callme
0.66667 | 0.33333 |
0.33333 | 0.66667 |
n = 2
call callme
0.66667 | 0.33333 | -0.33333 |
0.33333 | 0.66667 | -0.33333 |
-0.33333 | -0.33333 | 0.26667 |
n = 3
call callme
0.66667 | 0.33333 | -0.33333 | 6.66667E-02 |
0.33333 | 0.66667 | -0.33333 | -6.66667E-02 |
-0.33333 | -0.33333 | 0.26667 | 0 |
6.66667E-02 | -6.66667E-02 | 0 | 3.80952E-02 |
n = 4
call callme
0.66667 | 0.33333 | -0.33333 | 6.66667E-02 | 0 |
0.33333 | 0.66667 | -0.33333 | -6.66667E-02 | 0 |
-0.33333 | -0.33333 | 0.26667 | 0 | -1.90476E-02 |
6.66667E-02 | -6.66667E-02 | 0 | 3.80952E-02 | 0 |
0 | 0 | -1.90476E-02 | 0 | 1.26984E-02 |
contains
subroutine callme
ans= UnscaledLobattoMassMatrix( n=n )
astr = MdEncode(ans)
CALL Display( "UnscaledLobatto mass matrix = " )
CALL Display(astr, "" )
call blanklines(nol=2)
end subroutine callme
end program main