polynomial_functions module reference

Polynomial functions.

More…

Functions/Subroutines

evaluation_polynomial()

Pointwise evaluation of a polynomial in arbitrary units [A] at x.

first_derivative_polynomial()

Calculates the first derivative of a polynomial evaluated in arbitrary units of [A H-1] at a point x.

integration_polynomial()

Exact integration of polynomial of degree npoly in arbitrary units of [A H].

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 in arbitrary units [A] 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, in units that vary with the index k as [A H^(k-1)]

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

  • x :: [in] The position at which to evaluate the polynomial in arbitrary thickness units [H]

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::find_neutral_pos_full mom_neutral_diffusion::find_neutral_pos_linear mom_neutral_diffusion::neutral_diffusion_calc_coeffs mom_neutral_diffusion::neutral_surface_t_eval

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

Calculates the first derivative of a polynomial evaluated in arbitrary units of [A H-1] 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, in units that vary with the index k as [A H^(k-1)]

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

  • x :: [in] The position at which to evaluate the derivative in arbitrary thickness units [H]

Called from:

mom_neutral_diffusion::find_neutral_pos_linear

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

Exact integration of polynomial of degree npoly in arbitrary units of [A H].

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

Parameters:
  • xi0 :: [in] The lower bound of the integral in arbitrary thickness units [H]

  • xi1 :: [in] The upper bound of the integral in arbitrary thickness units [H]

  • coeff :: [in] The coefficients of the polynomial, in units that vary with the index k as [A H^(k-1)]

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