LegendreGradientEvalAll
Evaluate gradient of Legendre polynomials.
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION LegendreGradientEvalAll(n, x) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n
REAL(DFP), INTENT(IN) :: x
REAL(DFP) :: ans(1:n + 1)
END FUNCTION LegendreGradientEvalAll
END INTERFACE
program main
use easifembase
implicit none
integer( i4b ) :: n
real( dfp ), allocatable :: ans( :, : ), x( : )
type(string) :: astr
x = [-1.0, 0.0, 1.0]
n = 3
ans= LegendreGradientEvalAll( n=n, x=x )
astr = MdEncode( ans )
call display( astr%chars(), "" )
end program main
dP0 | dP1 | dP2 | dP3 |
---|---|---|---|
0 | 1 | -3 | 6 |
0 | 1 | 0 | -1.5 |
0 | 1 | 3 | 6 |
Interface 2
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION LegendreGradientEvalAll(n, x) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n
REAL(DFP), INTENT(IN) :: x(:)
REAL(DFP) :: ans(1:SIZE(x), 1:n + 1)
END FUNCTION LegendreGradientEvalAll
END INTERFACE
program main
use easifembase
implicit none
integer( i4b ) :: n
real( dfp ), allocatable :: ans( : ), x
type(string) :: astr
x = -1.0_DFP
n = 3
ans= LegendreGradientEvalAll( n=n, x=x )
astr = MdEncode( ans )
call display( astr%chars(), "" )
end program main
P0 | P1 | P2 | P3 |
---|---|---|---|
0 | 1 | -3 | 6 |