polynomial_functions module reference

Polynomial functions.

More…

Functions/Subroutines

evaluation_polynomial()

Pointwise evaluation of a polynomial at x.

first_derivative_polynomial()

Calculates the first derivative of a polynomial evaluated at a point x.

integration_polynomial()

Exact integration of polynomial of degree npoly.

Detailed Description

Date of creation: 2008.06.12 L. White.

This module contains routines that handle polynomials.

Function/Subroutine Documentation

function polynomial_functions/evaluation_polynomial(coeff, ncoef, x) [real]

Pointwise evaluation of a polynomial at x.

The polynomial is defined by the coefficients contained in the array of the same name, as follows: C(1) + C(2)x + C(3)x^2 + C(4)x^3 + … where C refers to the array ‘coeff’. The number of coefficients is given by ncoef and x is the coordinate where the polynomial is to be evaluated.

Parameters
  • coeff :: [in] The coefficients of the polynomial

  • ncoef :: [in] The number of polynomial coefficients

  • x :: [in] The position at which to evaluate the polynomial

Called from

regrid_edge_values::edge_slopes_implicit_h3 regrid_edge_values::edge_values_explicit_h4 regrid_edge_values::edge_values_implicit_h4 regrid_edge_values::edge_values_implicit_h6 mom_neutral_diffusion::neutral_diffusion_calc_coeffs

function polynomial_functions/first_derivative_polynomial(coeff, ncoef, x) [real]

Calculates the first derivative of a polynomial evaluated at a point x.

The polynomial is defined by the coefficients contained in the array of the same name, as follows: C(1) + C(2)x + C(3)x^2 + C(4)x^3 + … where C refers to the array ‘coeff’. The number of coefficients is given by ncoef and x is the coordinate where the polynomial’s derivative is to be evaluated.

Parameters
  • coeff :: [in] The coefficients of the polynomial

  • ncoef :: [in] The number of polynomial coefficients

  • x :: [in] The position at which to evaluate the derivative

function polynomial_functions/integration_polynomial(xi0, xi1, Coeff, npoly) [real]

Exact integration of polynomial of degree npoly.

The array of coefficients (Coeff) must be of size npoly+1.

Parameters
  • xi0 :: [in] The lower bound of the integral

  • xi1 :: [in] The lower bound of the integral

  • coeff :: [in] The coefficients of the polynomial

  • npoly :: [in] The degree of the polynomial