P1M_functions module reference

Linear interpolation functions

Functions/Subroutines

P1M_interpolation

Linearly interpolate between edge values

P1M_boundary_extrapolation

Interpolation by linear polynomials within boundary cells

Detailed Description

Date of creation: 2008.06.09 L. White

This module contains p1m (linear) interpolation routines.

p1m interpolation is performed by estimating the edge values and linearly interpolating between them.

Once the edge values are estimated, the limiting process takes care of ensuring that (1) edge values are bounded by neighboring cell averages and (2) discontinuous edge values are averaged in order to provide a fully continuous interpolant throughout the domain. This last step is essential for the regridding problem to yield a unique solution. Also, a routine is provided that takes care of linear extrapolation within the boundary cells.

Functions/Subroutine Documentation

subroutine P1M_interpolation(N, h, u, edge_values, ppoly_coef, h_neglect, answer_date)

Linearly interpolate between edge values

The resulting piecewise interpolant is stored in 'ppoly'. See 'ppoly.F90' for a definition of this structure.

The edge values MUST have been estimated prior to calling this routine.

The estimated edge values must be limited to ensure monotonicity of the interpolant. We also make sure that edge values are NOT discontinuous.

It is assumed that the size of the array 'u' is equal to the number of cells defining 'grid' and 'ppoly'. No consistency check is performed here.

Parameters
  • N [in]

    Number of cells

  • h [in]

    cell widths (size N) [H]

  • u [in]

    cell average properties (size N) [A]

  • edge_values [inout]

    Potentially modified edge values [A]

  • ppoly_coef [inout]

    Potentially modified piecewise polynomial coefficients, mainly [A]

  • h_neglect [in]

    A negligibly small width [H]

  • answer_date [in]

    The vintage of the expressions to use

Callees call graph
Callees of p1m_functions::p1m_interpolation calls cluster_p1m_functions P1M_functions cluster_regrid_edge_values regrid_edge_values p1m_functions::p1m_interpolation P1M_interpolation regrid_edge_values::average_discontinuous_edge_values average_discontinuous_edge_values p1m_functions::p1m_interpolation->regrid_edge_values::average_discontinuous_edge_values regrid_edge_values::bound_edge_values bound_edge_values p1m_functions::p1m_interpolation->regrid_edge_values::bound_edge_values
Text view
Callers call graph
Callers of p1m_functions::p1m_interpolation calls cluster_p1m_functions P1M_functions cluster_regrid_interp regrid_interp p1m_functions::p1m_interpolation P1M_interpolation regrid_interp::regridding_set_ppolys regridding_set_ppolys regrid_interp::regridding_set_ppolys->p1m_functions::p1m_interpolation
Text view
subroutine P1M_boundary_extrapolation(N, h, u, edge_values, ppoly_coef)

Interpolation by linear polynomials within boundary cells

The left and right edge values in the left and right boundary cells, respectively, are estimated using a linear extrapolation within the cells.

It is assumed that the size of the array 'u' is equal to the number of cells defining 'grid' and 'ppoly'. No consistency check is performed here.

Parameters
  • N [in]

    Number of cells

  • h [in]

    cell widths (size N) [H]

  • u [in]

    cell averages (size N) [A]

  • edge_values [inout]

    edge values of piecewise polynomials [A]

  • ppoly_coef [inout]

    coefficients of piecewise polynomials, mainly [A]

Callers call graph
Callers of p1m_functions::p1m_boundary_extrapolation calls cluster_p1m_functions P1M_functions cluster_regrid_interp regrid_interp p1m_functions::p1m_boundary_extrapolation P1M_boundary_extrapolation regrid_interp::regridding_set_ppolys regridding_set_ppolys regrid_interp::regridding_set_ppolys->p1m_functions::p1m_boundary_extrapolation
Text view
API generated with Flint · Rendered from reStructuredText