LobattoZeros
Returns the zeros of Lobatto polynomials.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE FUNCTION LobattoZeros(n) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n
!! order of Lobatto polynomial, should be greater than equal to 2
REAL(DFP) :: ans(n)
!!
END FUNCTION LobattoZeros
END INTERFACE
This example shows the usage of LobattoZeros
method.
n
should be greater than 2.
program main
use easifembase
implicit none
integer( i4b ) :: n
real( dfp ), allocatable :: pt( : )
type(string) :: msg, astr
n = 2; call callme
-1 | 1 |
n = 3; call callme
Zeros of J(x), n = 3
-1 | 0 | 1 |
n = 4; call callme
Zeros of J(x), n = 4
-1 | -0.44721 | 0.44721 | 1 |
n = 5; call callme
Zeros of J(x), n = 5
-1 | -0.65465 | 4.29344E-17 | 0.65465 | 1 |
contains
subroutine callme
pt = LobattoZeros( n=n )
msg = "Zeros of J(x), n = " &
& // tostring( n )
call display(msg%chars())
astr = MdEncode( pt )
call display( astr%chars(), "" )
end subroutine
end program main