Proto
Functions
Stencil Library

Functions

static InterpStencil< T > Proto::InterpStencil< T >::PiecewiseConstant (Point a_ratio)
 Piecewise Constant Interpolation. More...
 
static InterpStencil< T > Proto::InterpStencil< T >::PiecewiseLinear (Point a_ratio)
 Piecewise Linear Interpolation. More...
 
static InterpStencil< T > Proto::InterpStencil< T >::Quadratic (int a_ratio)
 Piecewise Linear Interpolation. More...
 
static InterpStencil< T > Proto::InterpStencil< T >::Build (int a_shiftMax, Box a_shiftKernel, int a_order, int a_refRatio)
 Build General High-Order Interpolation Stencil. More...
 
static InterpStencil< T > Proto::InterpStencil< T >::Build (std::vector< Point > &a_shifts, int a_maxOrder, int a_refRatio)
 Build General High-Order Interpolation Stencil. More...
 
static InterpStencil< T > Proto::InterpStencil< T >::Build (std::vector< Point > &a_shifts, const std::vector< Point > &a_orders, int a_refRatio)
 Build General High-Order Interpolation Stencil. More...
 

Stencil Library

static Stencil< T > Proto::Stencil< T >::Derivative (int a_n, int a_dir=0, 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 >::CellToEdge (int a_dir, int a_order=4)
 Stencil Library: Cell to Edge Deconvolution. More...
 
static Stencil< T > Proto::Stencil< T >::DiffCellToEdge (int a_dir, int a_order=4)
 Stencil Library: Cell to Edge Differentiation. More...
 
static Stencil< T > Proto::Stencil< T >::EdgeToCell (int a_dir, int a_order=4)
 Stencil Library: Edge to Cell Convolution. More...
 
static Stencil< T > Proto::Stencil< T >::CellToEdgeL (int a_dir, int a_order=5)
 Stencil Library: Downwind Cell to Edge Deconvolution. More...
 
static Stencil< T > Proto::Stencil< T >::CellToEdgeH (int a_dir, int a_order=5)
 Stencil Library: Upwind Cell to Edge Deconvolution. More...
 
static Stencil< T > Proto::Stencil< T >::AvgDown (int a_refRatio=2)
 Stencil Library: Simple Average. More...
 
static Stencil< T > Proto::Stencil< T >::AvgDownEdge (int a_dir, int a_refRatio=2)
 Stencil Library: Simple Average over an Edge. More...
 
static Stencil< T > Proto::Stencil< T >::FluxDivergence (int a_dir)
 Stencil Library: Flux Divergence. More...
 

Detailed Description

Function Documentation

◆ AvgDown()

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

Stencil Library: Simple Average.

Averages data from a refined grid onto a coarsened grid. Refinement is assumed to be isotropic.

Parameters
a_refRatio(Optional) Refinement of source data relative to destination (default: 2)

◆ AvgDownEdge()

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

Stencil Library: Simple Average over an Edge.

Averages data from a refined grid onto a coarsened grid. Refinement is assumed to be isotropic.

Parameters
a_refRatio(Optional) Refinement of source data relative to destination (default: 2)

◆ Build() [1/3]

template<class T >
InterpStencil< T > Proto::InterpStencil< T >::Build ( int  a_shiftMax,
Box  a_shiftKernel,
int  a_order,
int  a_refRatio 
)
inlinestatic

Build General High-Order Interpolation Stencil.

Parameters
a_shiftMaxMaximum distance of "steps" a shift is allowed to be from the center of the stencil (e.g. the point (2,2,1) is 2+2+1 = 5 "steps" from the center point (0,0,0))
a_shiftKernelBox containing all allowable shifts in the stencil. Effectively defines the span.
a_orderOrder of polynomial fit (e.g. 2 for quadratic)
a_refRatioDesired ratio of interpolation. Must be a power of 2

◆ Build() [2/3]

template<class T >
InterpStencil< T > Proto::InterpStencil< T >::Build ( std::vector< Point > &  a_shifts,
int  a_maxOrder,
int  a_refRatio 
)
inlinestatic

Build General High-Order Interpolation Stencil.

Parameters
a_shiftsDesired shifts of the stencil IGNORING THE CENTER (which will always be included) (e.g. the 5-Point Laplacian stencil has the shifts (1,0), (-1,0), (0, 1), and (0,-1) but NOT (0,0))
a_maxOrderHighest desired order of Polynomial interpolant. Choosing Y here will use all the terms for the DIM dimensional polynomial of order Y.
a_refRatioDesired ratio of interpolation. Must be a power of 2

◆ Build() [3/3]

template<class T >
InterpStencil< T > Proto::InterpStencil< T >::Build ( std::vector< Point > &  a_shifts,
const std::vector< Point > &  a_orders,
int  a_refRatio 
)
inlinestatic

Build General High-Order Interpolation Stencil.

Parameters
a_shiftsDesired shifts of the stencil IGNORING THE CENTER (which will always be included) (e.g. the 5-Point Laplacian stencil has the shifts (1,0), (-1,0), (0, 1), and (0,-1) but NOT (0,0))
a_ordersPolynomial exponents in vector form. (1,2,3) translates to x*y^2*z^3 and so on. DO include (0,...,0) here if desired.
a_refRatioDesired ratio of interpolation. Must be a power of 2

◆ CellToEdge()

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

Stencil Library: Cell to Edge Deconvolution.

Interpolates values averaged at cell i to exact values at the cell boundary i-1/2. For interpolation to upper edges (boundary at i+1/2), call Stencil::invert(dir) on the output.

◆ CellToEdgeH()

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

Stencil Library: Upwind Cell to Edge Deconvolution.

DEPRECATED. USE CELLTOEDGE Interpolates values averaged at cell i to exact values at cell boundary i-1/2 using upwind data.

Parameters
a_dirAxis to interpolate along
a_orderOrder of accuracy (default: 5, supported: 5)

◆ CellToEdgeL()

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

Stencil Library: Downwind Cell to Edge Deconvolution.

DEPRECATED. USE CELLTOEDGE Interpolates values averaged at cell i to exact values at cell boundary i-1/2 using downwind data.

Parameters
a_dirAxis to interpolate along
a_order(Optional) Order of accuracy (default: 5, supported: 5)

◆ Derivative()

template<typename T >
Stencil< T > Proto::Stencil< T >::Derivative ( int  a_n,
int  a_dir = 0,
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. first derivative, third deriative etc.)
a_dir(Optional) Direciton of derivative. An unsigned int in [0,DIM). Default 0
a_order(Optional) Order of accuracy. An unsigned int >= 2. Maximum accuracy depends on a_n. Default 2.

◆ DiffCellToEdge()

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

Stencil Library: Cell to Edge Differentiation.

Computes the derivative to the desired order in the desired direction on the cell boundary 1-1/2.

◆ EdgeToCell()

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

Stencil Library: Edge to Cell Convolution.

DEPRECATED. USE CELLTOEDGE Interpolates values averaged at cell i to exact values at the cell boundary i+1/2.

Parameters
a_dirAxis to interpolate along
a_order(Optional) Order of accuracy (default: 4, supported: 4)

◆ FluxDivergence()

template<typename T >
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 lower flux is stored in cell i.

Parameters
a_dirAxis to difference along.

◆ Laplacian()

template<typename T >
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 >
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)

◆ PiecewiseConstant()

template<class T >
InterpStencil< T > Proto::InterpStencil< T >::PiecewiseConstant ( Point  a_ratio)
inlinestatic

Piecewise Constant Interpolation.

Parameters
a_ratioAnisotropic destination refinement

◆ PiecewiseLinear()

template<class T >
InterpStencil< T > Proto::InterpStencil< T >::PiecewiseLinear ( Point  a_ratio)
inlinestatic

Piecewise Linear Interpolation.

Parameters
a_ratioAnisotropic destination refinement

◆ Quadratic()

template<class T >
InterpStencil< T > Proto::InterpStencil< T >::Quadratic ( int  a_ratio)
inlinestatic

Piecewise Linear Interpolation.

Computed based on tensor products of 1 dimensional interpolations.

Parameters
a_ratioIsotropic destination refinement