Chebyshev1GradientEvalAll
Evaluate gradient of Chebyshev1 polynomials.
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
  MODULE PURE FUNCTION Chebyshev1GradientEvalAll(n, x) RESULT(ans)
    INTEGER(I4B), INTENT(IN) :: n
    REAL(DFP), INTENT(IN) :: x
    REAL(DFP) :: ans(1:n + 1)
  END FUNCTION Chebyshev1GradientEvalAll
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 = 4; call callme
| dP0 | dP1 | dP2 | dP3 | dP4 | 
|---|---|---|---|---|
| 0 | 1 | -4 | 9 | -16 | 
| 0 | 1 | 0 | -3 | 0 | 
| 0 | 1 | 4 | 9 | 16 | 
contains
subroutine callme
  ans= Chebyshev1GradientEvalAll( n=n, x=x )
  astr = MdEncode( ans )
  call display( astr%chars(), "" )
end subroutine callme
end program main
Interface 2
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
  MODULE PURE FUNCTION Chebyshev1GradientEvalAll(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 Chebyshev1GradientEvalAll
END INTERFACE
program main
  use easifembase
  implicit none
  integer( i4b ) :: n
  real( dfp ), allocatable :: ans( : ), x
  type(string) :: astr
  x = 0.5_DFP
  n = 4
  ans= Chebyshev1GradientEvalAll( n=n, x=x )
  astr = MdEncode( ans )
  call display( astr%chars(), "" )
end program main
| P0 | P1 | P2 | P3 | P4 | 
|---|---|---|---|---|
| 0 | 1 | 2 | 0 | -4 |