polynomials_m Module

Contains functionality related to polynomials, such as evaluation and derivates. Polynomials are represented by their coeffcients given as arrays.



Interfaces

public interface polyval

  • private pure function polyval_1d(polycoeff, x)

    Evaluate a 1D polynomial p given by its coefficients array at position x

    Arguments

    Type IntentOptional Attributes Name
    real(kind=FP), intent(in), contiguous, dimension(:) :: polycoeff

    Polynomial coefficients

    real(kind=FP), intent(in) :: x

    Point where to evaluate the polynomial

    Return Value real(kind=fp)

  • private pure function polyval_2d(polycoeff, x, y)

    Evaluate a 2D polynomial p given by its coefficients c_{n,m} array at position (x,y) p(x,y) = \sum_{n,m} c_{n,m} * x^n * y^m = \sum_{m} y^m * ( \sum_{n} c_{n,m} * x^n )

    Arguments

    Type IntentOptional Attributes Name
    real(kind=FP), intent(in), contiguous, dimension(:,:) :: polycoeff

    Polynomial coefficients

    real(kind=FP), intent(in) :: x

    Point x-coordinate where to evaluate the polynomial

    real(kind=FP), intent(in) :: y

    Point y-coordinate where to evaluate the polynomial

    Return Value real(kind=fp)


Functions

public pure function polyder(poly) result(dpoly)

Returns the derivative of a 1D polynomial given by its coefficients array

Arguments

Type IntentOptional Attributes Name
real(kind=FP), intent(in), contiguous, dimension(:) :: poly

Polynomial coefficients

Return Value real(kind=FP), dimension(:), allocatable

Polynomial coefficients of the derivative