evalute first derivative monomial polynomial (c_1+c_2x+c_3x^2) -> (c_2+2c_3x+3c_4x^2 ...
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nCoefs |
number of coefficients |
||
| real(kind=wp), | intent(in) | :: | Coefs(nCoefs) |
coefficients |
||
| real(kind=wp), | intent(in) | :: | x |
evaluation position |
PURE FUNCTION Eval1DPoly_deriv(nCoefs,Coefs,x) ! MODULES IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES INTEGER, INTENT(IN) :: nCoefs !! number of coefficients REAL(wp), INTENT(IN) :: Coefs(nCoefs) !! coefficients REAL(wp), INTENT(IN) :: x !! evaluation position !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES REAL(wp) :: Eval1DPoly_deriv !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES INTEGER :: i !=================================================================================================================================== Eval1DPoly_deriv=0. DO i=nCoefs,2,-1 Eval1DPoly_deriv=Eval1DPoly_deriv*x+REAL(i-1,wp)*Coefs(i) END DO END FUNCTION Eval1DPoly_deriv