Proto  3.2
Stencil Library

Stencil Library

static Stencil< T > Proto::Stencil< T >::Identity ()
 
static Stencil< T > Proto::Stencil< T >::Derivative (int a_n, int a_dir, int a_order=2)
 Stencil Library: Derivative. More...
 
static Stencil< T > Proto::Stencil< T >::Laplacian ()
 Stencil Library: Laplacian. More...
 
static Stencil< T > Proto::Stencil< T >::LaplacianFace (int a_dir, int a_order=2)
 Stencil Library: Perpendicular Laplacian. More...
 
static Stencil< T > Proto::Stencil< T >::CellToFace (int a_dir, Side::LoHiSide a_side=Side::Lo, int a_order=4)
 Stencil Library: Cell to Face Interpolation. More...
 
static Stencil< T > Proto::Stencil< T >::DiffCellToFace (int a_dir, Side::LoHiSide a_side=Side::Lo, int a_order=4)
 Stencil Library: Cell to Face Differentiation. More...
 
static Stencil< T > Proto::Stencil< T >::CellToFaceL (int a_dir, int a_order=4)
 Stencil Library: Upwind Cell to Face Interpolation. More...
 
static Stencil< T > Proto::Stencil< T >::CellToFaceH (int a_dir, int a_order=4)
 Stencil Library: Upwind Cell to Face Interpolation. More...
 
static Stencil< T > Proto::Stencil< T >::AvgDown (int a_refRatio)
 Stencil Library: Simple Average. More...
 
static Stencil< T > Proto::Stencil< T >::AvgDown (Point a_refRatio)
 Stencil Library: Anisotropic Average. More...
 
static Stencil< T > Proto::Stencil< T >::Sum (int a_refRatio)
 Stencil Library: Sum. More...
 
static Stencil< T > Proto::Stencil< T >::Sum (Point a_refRatio)
 Stencil Library: Sum. More...
 
static Stencil< T > Proto::Stencil< T >::AvgDownFace (int a_normDir, Side::LoHiSide a_side, int a_refRatio)
 Stencil Library: Simple Average over a Face. More...
 
static Stencil< T > Proto::Stencil< T >::AvgDownFace (int a_dir, Side::LoHiSide a_side, Point a_refRatio)
 Stencil Library: Simple Average over a Face. More...
 
static Stencil< T > Proto::Stencil< T >::FluxDivergence (int a_dir)
 Stencil Library: Flux Divergence. More...
 
static Stencil< T > Proto::Stencil< T >::faceToCell (int a_dir, int a_order=4)
 Interpolate from face average to cell average. More...
 
static Stencil< T > Proto::Stencil< T >::cornersToFaces (int a_dir, int a_order=4)
 Interpolate from corners to face average. More...
 
static Stencil< T > Proto::Stencil< T >::CornersToCells (int a_order=4)
 Interpolate from corners to cell average. More...
 

Detailed Description

Function Documentation

◆ Identity()

template<typename T>
static Stencil<T> Proto::Stencil< T >::Identity ( )
inlinestatic

◆ Derivative()

template<typename T>
static Stencil<T> Proto::Stencil< T >::Derivative ( int  a_n,
int  a_dir,
int  a_order = 2 
)
static

Stencil Library: Derivative.

Built in implementation of compact differentiation stencils. Includes derivatives of order n >= 1 and accuracy m >= 2 where n + m <= 14.

Parameters
a_nDegree of derivative (e.g. nth derivative.)
a_dirCoordinate of differentiation. Must be in [0,DIM)
a_order(Optional) Order of accuracy. An unsigned int >= 2. Maximum accuracy depends on a_n. (Default: 2)

◆ Laplacian()

template<typename T>
static Stencil<T> Proto::Stencil< T >::Laplacian ( )
static

Stencil Library: Laplacian.

Built in implementation of the 2nd order 2*DIM + 1 point Laplace operator.

◆ LaplacianFace()

template<typename T>
static Stencil<T> Proto::Stencil< T >::LaplacianFace ( int  a_dir,
int  a_order = 2 
)
static

Stencil Library: Perpendicular Laplacian.

Built in implementation of Laplacian perpendicular to direction dir

Parameters
a_dirNormal direction
a_order(Optional) Order of accuracy (default: 2 | supported: 2)

◆ CellToFace()

template<typename T>
static Stencil<T> Proto::Stencil< T >::CellToFace ( int  a_dir,
Side::LoHiSide  a_side = Side::Lo,
int  a_order = 4 
)
static

Stencil Library: Cell to Face Interpolation.

Interpolates cell averaged values to face averaged values. The a_side controls if the face averaged output is on the upper or lower face of the cell at the center of the stencil. For finer control of the Stencil's centering, see the functions CellToFaceL and CelltoFaceH.

Parameters
a_dirCoordinate direction in [0, DIM)
a_sideUpper or lower side (Side::Hi or Side::Lo) (default: Side::Lo)
a_order(Optional) Order of accuracy. Valid values (default 4 | supported: 4, 5)

◆ DiffCellToFace()

template<typename T>
static Stencil<T> Proto::Stencil< T >::DiffCellToFace ( int  a_dir,
Side::LoHiSide  a_side = Side::Lo,
int  a_order = 4 
)
static

Stencil Library: Cell to Face Differentiation.

Computes the normal derivative of a cell-averaged quantity as a face-averaged quantity.

Parameters
dirCoordinate direction in [0, DIM)
sideUpper or lower side (Side::Hi or Side::Lo) (default: Side::Lo)
order(Optional) Order of accuracy. Valid values (default 4 | supported: 4, 5)

◆ CellToFaceL()

template<typename T>
static Stencil<T> Proto::Stencil< T >::CellToFaceL ( int  a_dir,
int  a_order = 4 
)
static

Stencil Library: Upwind Cell to Face Interpolation.

Interpolates cell averaged values to face averaged values. The a_side controls if the face averaged output is on the upper or lower face of the cell at the center of the stencil. For even orders, this function is identical to CellToFace. For odd orders, the stencil is upwinded

Example Stencil Footprints:

// Legend | o: center stencil weight | ^: output location | x: other stencil weights
auto S4L = CellToFaceL(0, Side::Lo, 4);
// Footprint:
// | x | x | o | x |
// ^
auto S5L = CellToFaceL(0, Side::Lo, 5);
// Footprint:
// | x | x | x | o | x |
// ^
Parameters
dirCoordinate direction in [0, DIM)
order(Optional) Order of accuracy. ( default: 4 | supported: 4, 5 )

◆ CellToFaceH()

template<typename T>
static Stencil<T> Proto::Stencil< T >::CellToFaceH ( int  a_dir,
int  a_order = 4 
)
static

Stencil Library: Upwind Cell to Face Interpolation.

Interpolates cell averaged values to face averaged values. The a_side controls if the face averaged output is on the upper or lower face of the cell at the center of the stencil. For even orders, this function is identical to CellToFace. For odd orders, the Stencil is downwinded.

Example Stencil Footprints:

// Legend | o: center stencil weight | ^: output location | x: other stencil weights
auto S4L = CellToFaceH(0, Side::Lo, 4);
// Footprint:
// | x | x | o | x |
// ^
auto S5L = CellToFaceH(0, Side::Lo, 5);
// Footprint:
// | x | x | o | x | x |
// ^
Parameters
dirCoordinate direction in [0, DIM)
order(Optional) Order of accuracy. ( default: 4 | supported: 4, 5 )

◆ AvgDown() [1/2]

template<typename T>
static Stencil<T> Proto::Stencil< T >::AvgDown ( int  a_refRatio)
static

Stencil Library: Simple Average.

Averages data from a refined grid onto a coarsened grid. Refinement is assumed to be isotropic. Source data is refined relative to the destination data by a_refRatio

Parameters
a_refRatioRefinement ratio.

◆ AvgDown() [2/2]

template<typename T>
static Stencil<T> Proto::Stencil< T >::AvgDown ( Point  a_refRatio)
static

Stencil Library: Anisotropic Average.

Anisotropic overload of AvgDown.

Parameters
a_refRatioRefinement ratio

◆ Sum() [1/2]

template<typename T>
static Stencil<T> Proto::Stencil< T >::Sum ( int  a_refRatio)
static

Stencil Library: Sum.

Undivided average (e.g. the sum of all elements). Source data is refined relative to the destination data by a_refRatio

Parameters
a_refRatioRefinement ratio

◆ Sum() [2/2]

template<typename T>
static Stencil<T> Proto::Stencil< T >::Sum ( Point  a_refRatio)
static

Stencil Library: Sum.

Anisotropic overload of Sum.

Parameters
a_refRatioRefinement ratio

◆ AvgDownFace() [1/2]

template<typename T>
static Stencil<T> Proto::Stencil< T >::AvgDownFace ( int  a_normDir,
Side::LoHiSide  a_side,
int  a_refRatio 
)
static

Stencil Library: Simple Average over a Face.

Averaging operation between face-averaged data sets with normal a_normDir.

Parameters
a_normDirNormal coordinate direction
a_sideCell side to average over
a_refRatioNon-normal coordinate refinement ratios

◆ AvgDownFace() [2/2]

template<typename T>
static Stencil<T> Proto::Stencil< T >::AvgDownFace ( int  a_dir,
Side::LoHiSide  a_side,
Point  a_refRatio 
)
static

Stencil Library: Simple Average over a Face.

Averaging operation between face-averaged data sets with normal a_normDir.

Parameters
a_normDirNormal coordinate direction
a_sideCell side to average over
a_refRatioNon-normal coordinate refinement ratios

◆ FluxDivergence()

template<typename T>
static Stencil<T> Proto::Stencil< T >::FluxDivergence ( int  a_dir)
static

Stencil Library: Flux Divergence.

Simple flux differencing stencil: OUT(i) = IN(i+1) - IN(i) Assumes the low-side fluxes are stored in cell i.

Parameters
a_dirCoordinate axis in the flux normal direction.

◆ faceToCell()

template<typename T>
static Stencil<T> Proto::Stencil< T >::faceToCell ( int  a_dir,
int  a_order = 4 
)
static

Interpolate from face average to cell average.

◆ cornersToFaces()

template<typename T>
static Stencil<T> Proto::Stencil< T >::cornersToFaces ( int  a_dir,
int  a_order = 4 
)
static

Interpolate from corners to face average.

◆ CornersToCells()

template<typename T>
static Stencil<T> Proto::Stencil< T >::CornersToCells ( int  a_order = 4)
static

Interpolate from corners to cell average.