namespace p1m_functions¶
Overview¶
Linear interpolation functions. More…
namespace p1m_functions { // global functions subroutine, public p1m_interpolation( N N, h h, u u, ppoly_E ppoly_E, ppoly_coef ppoly_coef, h_neglect h_neglect ); subroutine, public p1m_boundary_extrapolation(N N, h h, u u, ppoly_E ppoly_E, ppoly_coef ppoly_coef); } // namespace p1m_functions
Detailed Documentation¶
Linear interpolation functions.
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.
Global Functions¶
subroutine, public p1m_interpolation( N N, h h, u u, ppoly_E ppoly_E, ppoly_coef ppoly_coef, h_neglect h_neglect )
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 |
Number of cells |
h |
cell widths (size N) |
u |
cell average properties (size N) |
ppoly_e |
Potentially modified edge values, with the same units as u. |
ppoly_coef |
Potentially modified piecewise polynomial coefficients, mainly with the same units as u. |
h_neglect |
A negligibly small width in the same units as h. |
subroutine, public p1m_boundary_extrapolation( N N, h h, u u, ppoly_E ppoly_E, ppoly_coef 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 |
Number of cells |
h |
cell widths (size N) |
u |
cell averages (size N) |
ppoly_e |
edge values of piecewise polynomials, with the same units as u. |
ppoly_coef |
coefficients of piecewise polynomials, mainly with the same units as u. |