Proto
Data Structures | Functions
Stencil Operations
Collaboration diagram for Stencil Operations:

Data Structures

class  Proto::Shift
 Stencil Shift. More...
 
class  Proto::BoxData< T, C, MEMTYPE, D, E >
 Multidimensional Rectangular Array. More...
 
class  Proto::LazyStencil< T, C, MEMTYPE, D, E >
 An Unevaluated Stencil Operation. More...
 
struct  Proto::Stencil< T >::coeff_holder
 
class  Proto::Stencil< T >
 A Linear Stencil Operation. More...
 
class  Proto::InterpStencil< T >
 Interpolation Stencil. More...
 
struct  Proto::sIndexer3< T, C >
 

Functions

template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
void Proto::Stencil< T >::apply (const BoxData< T, C, MEMTYPE, D, E > &a_src, BoxData< T, C, MEMTYPE, D, E > &a_dest, const Box &a_bx, bool a_initToZero=false, const T a_scale=1) const
 Apply Stencil Helper function. More...
 
 Proto::InterpStencil< T >::InterpStencil (int a_ratio)
 Isotropic Constructor. More...
 
 Proto::InterpStencil< T >::InterpStencil (Point a_ratio)
 Anisotropic Constructor. More...
 
void Proto::InterpStencil< T >::define (Point a_ratio)
 Define. More...
 
Stencil< T > & Proto::InterpStencil< T >::operator() (Point a_p)
 Get Read-Write Stencil Subcomponent. More...
 
const Stencil< T > & Proto::InterpStencil< T >::get (Point a_p) const
 Get Read-Only Stencil Subcomponent. More...
 
Box Proto::InterpStencil< T >::span ()
 Span. More...
 
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::InterpStencil< T >::operator() (const BoxData< T, C, MEMTYPE, D, E > &a_src, T a_scale=1) const
 Lazy Apply. More...
 
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::InterpStencil< T >::operator() (const BoxData< T, C, MEMTYPE, D, E > &a_src, Box a_box, T a_scale=1) const
 Lazy Apply. More...
 
Box Proto::InterpStencil< T >::kernel () const
 Return Shift Kernel.
 
Point Proto::InterpStencil< T >::ratio () const
 Return Destination Refinement Ratio.
 
std::vector< Stencil< T > >::iterator Proto::InterpStencil< T >::begin ()
 Iterate Over Stencil Components.
 
std::vector< Stencil< T > >::iterator Proto::InterpStencil< T >::end ()
 Iterate Over Stencil Components.
 
bool Proto::InterpStencil< T >::empty ()
 Empty Query.
 
unsigned long long int Proto::InterpStencil< T >::size () const
 Size Query. More...
 
double Proto::fineCoef (Point p, Point s, double h, int refRatio)
 

Non-Member Functions

template<typename T >
Stencil< T > Proto::operator* (T a_coef, Shift a_shift)
 Coefficient Shift Product "Constructor". More...
 
template<typename T >
Stencil< T > Proto::operator* (T a_coef, const Stencil< T > a_stencil)
 Scalar Multiplication of Stencil Coefficients. More...
 
template<typename T , unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
BoxData< T, C, MEMTYPE, D, E > & Proto::operator|= (BoxData< T, C, MEMTYPE, D, E > &a_dest, LazyStencil< T, C, MEMTYPE, D, E > &&a_op)
 Application by Replacement. More...
 
template<class T , unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
BoxData< T, C, MEMTYPE, D, E > & Proto::operator+= (BoxData< T, C, MEMTYPE, D, E > &a_dest, LazyStencil< T, C, MEMTYPE, D, E > &&a_op)
 Application by Increment. More...
 

Constructors

 Proto::Shift::Shift ()
 Default Constructor.
 
 Proto::Shift::Shift (const Point &a_pt)
 Point Constructor. More...
 
template<typename... vals>
 Proto::Shift::Shift (vals... args)
 Variadic Constructor. More...
 

Methods

static Shift Proto::Shift::Basis (int a_dir, int a_scale=1)
 Basis Shift. More...
 
static Shift Proto::Shift::Zeros ()
 Zero Shift. More...
 
static Shift Proto::Shift::Ones (int a_scale=1)
 Unit Shift. More...
 
PointProto::Shift::shift ()
 Get Shift Point.
 
template<typename T >
Stencil< T > Proto::Shift::operator* (T a_coef) const
 Scalar Multiplication. More...
 
Shift Proto::Shift::operator* (const Shift &a_shift) const
 Convolution. More...
 
int & Proto::Shift::operator[] (int a_dir)
 Componentwise Access.
 

Constructors

 Proto::Stencil< T >::Stencil ()
 Default Constructor.
 
 Proto::Stencil< T >::Stencil (Shift a_shift, T a_coef, Point a_destRefratio=Point::Ones(), Point a_destShift=Point::Zeros(), Point a_srcRefratio=Point::Ones())
 General Constructor. More...
 

Operators

Stencil< T > Proto::Stencil< T >::operator* (const Stencil< T > &a_stencil) const
 Stencil Composition. More...
 
Stencil< T > Proto::Stencil< T >::operator* (const T a_coef) const
 Scalar Multiplication. More...
 
void Proto::Stencil< T >::operator*= (const Stencil< T > &a_stencil)
 In Place Stencil Composition. More...
 
void Proto::Stencil< T >::operator*= (const T a_coef)
 In Place Scalar Multiplication.
 
Stencil< T > Proto::Stencil< T >::operator+ (const Stencil< T > &a_stencil) const
 Stencil Addition. More...
 
Stencil< T > Proto::Stencil< T >::operator- (const Stencil< T > &a_stencil) const
 Stencil Subtraction (Convenience) More...
 
void Proto::Stencil< T >::operator+= (const Stencil< T > &a_stencil)
 In Place Stencil Addition. More...
 
void Proto::Stencil< T >::operator-= (const Stencil< T > &a_stencil)
 In Place Stencil Subtraction. More...
 

Accessors and Queries

bool Proto::Stencil< T >::operator== (Stencil< T > &a_stencil) const
 
bool Proto::Stencil< T >::operator!= (Stencil< T > &a_stencil) const
 Inquality Operator. More...
 
const std::vector< T > & Proto::Stencil< T >::coefs () const
 Get Vector of Coefficients. More...
 
const T * Proto::Stencil< T >::devCoefs () const
 Get Vector of Coefficients. More...
 
const PointProto::Stencil< T >::devOffsets () const
 Get Vector of Offsets. More...
 
const std::vector< Point > & Proto::Stencil< T >::offsets () const
 Get Vector of Offsets. More...
 
unsigned long long int Proto::Stencil< T >::size () const
 Size. More...
 
Box Proto::Stencil< T >::span () const
 Span. More...
 
Point Proto::Stencil< T >::spanPoint () const
 Span. More...
 
Point Proto::Stencil< T >::ghost () const
 Ghost. More...
 
PointProto::Stencil< T >::srcRatio ()
 Get Source Refinement Ratio. More...
 
const PointProto::Stencil< T >::srcRatio () const
 Get Source Refinement Ratio (Const)
 
PointProto::Stencil< T >::destRatio ()
 Get Destination Refinement Ratio. More...
 
const PointProto::Stencil< T >::destRatio () const
 Get Destination Refinement Ratio (Const)
 
PointProto::Stencil< T >::destShift ()
 Get Destination Shift. More...
 
const PointProto::Stencil< T >::destShift () const
 Get Destination Shift (Const)
 

Stencil Binding and Application

template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::Stencil< T >::operator() (const BoxData< T, C, MEMTYPE, D, E > &a_src, T a_scale=1) const
 Operate on BoxData. More...
 
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::Stencil< T >::operator() (const BoxData< T, C, MEMTYPE, D, E > &a_src, Box a_box, T a_scale=1) const
 Operate on BoxData (Overload with Box Input) More...
 

Utility

void Proto::Stencil< T >::invert (int a_dir)
 Invert Stencil. More...
 
void Proto::Stencil< T >::transpose (unsigned char a, unsigned char b)
 Transpose Stencil. More...
 
Box Proto::Stencil< T >::indexRange (Box a_domain) const
 Get Max Index Range. More...
 
Box Proto::Stencil< T >::indexDomain (Box a_range) const
 Get Max Index Domain. More...
 
Box Proto::Stencil< T >::range (Box a_domain) const
 Get Max Range Box. More...
 
Box Proto::Stencil< T >::domain (Box a_range) const
 Get Min Domain Box. More...
 
Proto::Stencil< T >::diagonalValue () const
 Get Diagonal Value. More...
 
void Proto::Stencil< T >::print () const
 Print. More...
 

Detailed Description

Function Documentation

◆ apply()

template<typename T >
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
void Proto::Stencil< T >::apply ( const BoxData< T, C, MEMTYPE, D, E > &  a_src,
BoxData< T, C, MEMTYPE, D, E > &  a_dest,
const Box a_bx,
bool  a_initToZero = false,
const T  a_scale = 1 
) const

Apply Stencil Helper function.

Manually appy *this to a source and destination BoxData in a functional programming style. Not recommended for public use, but useful for debugging in some cases.

Parameters
a_srcSource data
a_destOutput data
a_bxIteration box for this computation. Can be created with indexDomain or indexRange functions.
a_replace(Optional) If true, zero out the data in a_dest and replace with the computation result. If true, solution will be added to existing data. Default false.
a_scale(Optional) Scale the computation by some value.

◆ Basis()

static Shift Proto::Shift::Basis ( int  a_dir,
int  a_scale = 1 
)
inlinestatic

Basis Shift.

Shortcut for Shift(Point::Basis(...))

Parameters
a_dirDirection of basis vector in [0,DIM)
a_scale(OptionL) Amount to scale the basis vector by. (Default 1).

◆ coefs()

template<typename T>
const std::vector<T>& Proto::Stencil< T >::coefs ( ) const
inline

Get Vector of Coefficients.

Returned vector is read-only. Ordering corresponds to the output of Stencil::offsets()

◆ define()

template<class T>
void Proto::InterpStencil< T >::define ( Point  a_ratio)
inline

Define.

Builds an InterpStencil with a destination refinement a_ratio.

Parameters
a_ratiodestination refinement

◆ destRatio()

template<typename T>
Point& Proto::Stencil< T >::destRatio ( )
inline

Get Destination Refinement Ratio.

returned reference is mutable. Use this function to set the destination refinement ratio of custom Stencils

◆ destShift()

template<typename T>
Point& Proto::Stencil< T >::destShift ( )
inline

Get Destination Shift.

returned reference is mutable. Use this function to set the destination shift of custom Stencils

◆ devCoefs()

template<typename T>
const T* Proto::Stencil< T >::devCoefs ( ) const
inline

Get Vector of Coefficients.

Returned vector is read-only. Ordering corresponds to the output of Stencil::offsets()

◆ devOffsets()

template<typename T>
const Point* Proto::Stencil< T >::devOffsets ( ) const
inline

Get Vector of Offsets.

Returned vector is read-only. Ordering corresponds to the output of Stencil::coefs()

◆ diagonalValue()

template<typename T >
T Proto::Stencil< T >::diagonalValue ( ) const

Get Diagonal Value.

Returns the coefficient multiplying the identity shift (0,0,...,0)

◆ domain()

template<typename T >
Box Proto::Stencil< T >::domain ( Box  a_range) const
inline

Get Min Domain Box.

Given a range, compute the smallest associated physical domain, taking refinement AND destination shifting into account. The output of this function is NOT a valid input for a Stencil operation when refinement is present. Thisfunction is best used for defining input BoxData when the output range is known.

Parameters
a_rangeA computational range

◆ fineCoef()

double Proto::fineCoef ( Point  p,
Point  s,
double  h,
int  refRatio 
)
inline

Returns <x^p> over the fine cell s with coarse spacing h

◆ get()

template<class T>
const Stencil<T>& Proto::InterpStencil< T >::get ( Point  a_p) const
inline

Get Read-Only Stencil Subcomponent.

Returns a const reference to the Stencil associated with the destShift a_p.

Parameters
a_pA destination shift in [(0,...,0), (destRatio-1,...,destRatio-1)]

◆ ghost()

template<typename T >
Point Proto::Stencil< T >::ghost ( ) const
inline

Ghost.

An alias for spanPoint.

◆ indexDomain()

template<typename T >
Box Proto::Stencil< T >::indexDomain ( Box  a_range) const
inline

Get Max Index Domain.

Given a domain, compute the largest possible iteration Box, taking source / destination refinement into account. The output of this function is always a valid input for a Stencil operation. For Stencils without source or destination refinement, this function is identical to Stencil::domain.

Parameters
a_rangeA computational range

◆ indexRange()

template<typename T >
Box Proto::Stencil< T >::indexRange ( Box  a_domain) const
inline

Get Max Index Range.

Given a domain, compute the largest possible iteration Box, taking source/ destination refinement into account. For Stencils without source or destination refinement, this function is identical to Stencil::range.

Parameters
a_domainA computational domain

◆ InterpStencil() [1/2]

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

Isotropic Constructor.

Builds an InterpStencil assuming a destination refinement of a_ratio in all directions.

Parameters
a_ratiodestination refinement

◆ InterpStencil() [2/2]

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

Anisotropic Constructor.

Builds an InterpStencil with a destination refinement of a_ratio;

Parameters
a_ratiodestination refinement

◆ invert()

template<typename T >
void Proto::Stencil< T >::invert ( int  a_dir)
inline

Invert Stencil.

Inverts the coefficients of this stencil across a given dimension.

◆ offsets()

template<typename T>
const std::vector<Point>& Proto::Stencil< T >::offsets ( ) const
inline

Get Vector of Offsets.

Returned vector is read-only. Ordering corresponds to the output of Stencil::coefs()

◆ Ones()

static Shift Proto::Shift::Ones ( int  a_scale = 1)
inlinestatic

Unit Shift.

Shortcut for Shift(Point::Ones(...))

Parameters
a_scale(Optional) Used to scale the default output of (1,1,...,1).

◆ operator!=()

template<typename T>
bool Proto::Stencil< T >::operator!= ( Stencil< T > &  a_stencil) const
inline

Inquality Operator.

Parameters
a_stencilAnother Stencil

◆ operator()() [1/5]

template<typename T >
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::Stencil< T >::operator() ( const BoxData< T, C, MEMTYPE, D, E > &  a_src,
a_scale = 1 
) const
inline

Operate on BoxData.

Operate *this on a BoxData. This function works in tandem with the namespace-defined operators += and |=. See the example in the description of Stencil.

Parameters
a_scrSource BoxData
a_scale(Optional) Scale the output of the Stencil operation.

◆ operator()() [2/5]

template<typename T >
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::Stencil< T >::operator() ( const BoxData< T, C, MEMTYPE, D, E > &  a_src,
Box  a_box,
a_scale = 1 
) const
inline

Operate on BoxData (Overload with Box Input)

Operate *this on a BoxData. This function works in tandem with the namespace-defined operators += and |=. See the example in the description of Stencil.

Parameters
a_scrSource BoxData
a_boxConfinement Box. Must be a subset of the allowable range of *this
a_scale(Optional) Scale the output of the Stencil operation.

◆ operator()() [3/5]

template<class T>
Stencil<T>& Proto::InterpStencil< T >::operator() ( Point  a_p)
inline

Get Read-Write Stencil Subcomponent.

Returns a reference to the Stencil associated with the destShift a_p.

Parameters
a_pA destination shift in [(0,...,0), (destRatio-1,...,destRatio-1)]

◆ operator()() [4/5]

template<class T >
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::InterpStencil< T >::operator() ( const BoxData< T, C, MEMTYPE, D, E > &  a_src,
a_scale = 1 
) const
inline

Lazy Apply.

Gathers inputs for the composite Stencil operation and stores them in an intermediate LazyStencil to be consumed by a left hand side operator ("=", "|=", or "+="). The syntax is intentionally identical to that used by Stencil.

Parameters
a_srcSource data
a_scale(Optional) value to scale the output of *this by.

◆ operator()() [5/5]

template<class T >
template<unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
LazyStencil< T, C, MEMTYPE, D, E > Proto::InterpStencil< T >::operator() ( const BoxData< T, C, MEMTYPE, D, E > &  a_src,
Box  a_box,
a_scale = 1 
) const
inline

Lazy Apply.

Gathers inputs for the composite Stencil operation and stores them in an intermediate LazyStencil to be consumed by a left hand side operator ("=", "|=", or "+="). The syntax is intentionally identical to that used by Stencil. Explicitly defining a Box input is not recommended unless absolutely necessary.

Parameters
a_srcSource data
a_boxIteration box
a_scale(Optional) value to scale the output of *this by.

◆ operator*() [1/6]

template<typename T >
Stencil<T> Proto::Shift::operator* ( a_coef) const
inline

Scalar Multiplication.

Generates a Stencil<T> from the product of a scalar T coefficient and a Shift. This operator is what allows for a fluid Stencil construction syntax:

Example:

// DIM == 1
Stencil<double> = 1.0*Shift(-1) - 2.0*Shift(0) + 1.0*Shift(1);

◆ operator*() [2/6]

Shift Proto::Shift::operator* ( const Shift a_shift) const
inline

Convolution.

The product of two Shift objects is defined as their sum.

◆ operator*() [3/6]

template<typename T >
Stencil< T > Proto::Stencil< T >::operator* ( const Stencil< T > &  a_stencil) const

Stencil Composition.

The product of two Stencils is defined as the composition of the two.

Parameters
a_stencilAnother Stencil

◆ operator*() [4/6]

template<typename T >
Stencil< T > Proto::Stencil< T >::operator* ( const T  a_coef) const

Scalar Multiplication.

The product of a Stencil S and a coefficient v of type T results in the scaling of all the coefficients of S by v.

Parameters
a_coefScaling coefficient

◆ operator*() [5/6]

template<typename T >
Stencil<T> Proto::operator* ( a_coef,
Shift  a_shift 
)
inline

Coefficient Shift Product "Constructor".

Syntactical sugar that allows a Stencil to be constructed with coef*Shift(Point) syntax

Example:

Stencil<double> S = 3.7*Shift(Point::Basis(0));

◆ operator*() [6/6]

template<typename T >
Stencil<T> Proto::operator* ( a_coef,
const Stencil< T >  a_stencil 
)
inline

Scalar Multiplication of Stencil Coefficients.

Allows for pre multiplication by a T scalar

◆ operator*=()

template<typename T >
void Proto::Stencil< T >::operator*= ( const Stencil< T > &  a_stencil)

In Place Stencil Composition.

Parameters
a_stencilAnother Stencil

◆ operator+()

template<class T >
Stencil< T > Proto::Stencil< T >::operator+ ( const Stencil< T > &  a_stencil) const

Stencil Addition.

Adding two Stencils results in a new Stencil which is the union of the coefficent-Shift pairs of the inputs. If the two input Stencils share a common Shift, the associated coefficients will be added together.

Parameters
a_stencilAnother Stencil

◆ operator+=() [1/2]

template<class T >
void Proto::Stencil< T >::operator+= ( const Stencil< T > &  a_stencil)

In Place Stencil Addition.

Parameters
a_stencilAnother Stencil

◆ operator+=() [2/2]

template<class T , unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
BoxData< T, C, MEMTYPE, D, E > & Proto::operator+= ( BoxData< T, C, MEMTYPE, D, E > &  a_dest,
LazyStencil< T, C, MEMTYPE, D, E > &&  a_op 
)

Application by Increment.

Applies a LazyStencil and replaces a subset of a_dest with the result:

Usage:

Stencil<double> S;
BoxData<double> Src;
Box computeBox;
// define S, computeBox and initialize Src
BoxData<double> Dest += S(Src, computeBox);

See the main documentation for Stencil for additional examples

Parameters
a_destDestination array
a_opUncomputed Stencil operation

◆ operator-()

template<class T >
Stencil< T > Proto::Stencil< T >::operator- ( const Stencil< T > &  a_stencil) const

Stencil Subtraction (Convenience)

Equivalent to adding a_stencil*(-1)

Parameters
a_stencilAnother Stencil

◆ operator-=()

template<class T >
void Proto::Stencil< T >::operator-= ( const Stencil< T > &  a_stencil)

In Place Stencil Subtraction.

Parameters
a_stencilAnother Stencil

◆ operator==()

template<typename T >
bool Proto::Stencil< T >::operator== ( Stencil< T > &  a_stencil) const
inline

Equality Operator

Equality between Stencils is determined by value

Parameters
a_stencilAnother Stencil

◆ operator|=()

template<typename T , unsigned int C, MemType MEMTYPE, unsigned char D, unsigned char E>
BoxData< T, C, MEMTYPE, D, E > & Proto::operator|= ( BoxData< T, C, MEMTYPE, D, E > &  a_dest,
LazyStencil< T, C, MEMTYPE, D, E > &&  a_op 
)
inline

Application by Replacement.

Applies a LazyStencil and replaces a subset of a_dest with the result:

Usage:

Stencil<double> S;
BoxData<double> Src;
Box computeBox;
// define S, computeBox and initialize Src
BoxData<double> Dest |= S(Src, computeBox);

See the main documentation for Stencil for additional examples

Parameters
a_destDestination array
a_opUncomputed Stencil operation

◆ print()

template<typename T >
void Proto::Stencil< T >::print ( ) const
inline

Print.

Print *this to the command line. Useful for debugging.

◆ range()

template<typename T >
Box Proto::Stencil< T >::range ( Box  a_domain) const
inline

Get Max Range Box.

Given a domain, compute the largest associated physical range, taking refinement AND destination shifting into account. The output of this function is NOT a valid input for a Stencil operation when refinement is present. This function is best used for defining output BoxData when the input domain is known.

Parameters
a_domainA computational domain

◆ Shift() [1/2]

Proto::Shift::Shift ( const Point a_pt)
inlineexplicit

Point Constructor.

Builds a Shift from a Point

Parameters
a_ptPoint to base this Shift on

◆ Shift() [2/2]

template<typename... vals>
Proto::Shift::Shift ( vals...  args)
inlineexplicit

Variadic Constructor.

More or less identical to the variadic Point constructor. Builds a Shift using the first DIM arguments and ignores the rest.

Parameters
argsAt least DIM int arguments, the first DIM of which define *this

◆ size() [1/2]

template<typename T>
unsigned long long int Proto::Stencil< T >::size ( ) const
inline

Size.

Defined as the number of coefficient-offset pairs in the stencil

◆ size() [2/2]

template<class T>
unsigned long long int Proto::InterpStencil< T >::size ( ) const
inline

Size Query.

Returns the number of Stencil components in *this.

◆ span() [1/2]

template<typename T>
Box Proto::Stencil< T >::span ( ) const
inline

Span.

Returns a Box which bounds all offsets in *this. Useful for automated ghost-cell checks.

Example:

//DIM = 2
using namespace Proto;
Stencil<T> S = 1.0*Shift(0,-1) +
2.0*Shift(0,2) +
3.0*Shift(1,3);
std::cout << S.span() << std::endl; //prints [(-1,0), (2,3)]

◆ span() [2/2]

template<class T>
Box Proto::InterpStencil< T >::span ( )
inline

Span.

Computes the composite span of all Stencils in the InterpStencil

◆ spanPoint()

template<typename T >
Point Proto::Stencil< T >::spanPoint ( ) const
inline

Span.

Returns the span as a Point. Useful when interested only in isotropic ghost regions. this computation will always allow for at least the correct number of ghost cells, and will overestimate in the case of non-isotropic spans.

◆ srcRatio()

template<typename T>
Point& Proto::Stencil< T >::srcRatio ( )
inline

Get Source Refinement Ratio.

returned reference is mutable. Use this function to set the source refinement ratio of custom Stencils

◆ Stencil()

template<typename T >
Proto::Stencil< T >::Stencil ( Shift  a_shift,
a_coef,
Point  a_destRefratio = Point::Ones(),
Point  a_destShift = Point::Zeros(),
Point  a_srcRefratio = Point::Ones() 
)

General Constructor.

Creates a Stencil with a single shift and coefficent.

Not recommended for public use; see the Stencil class documentation for examples of how to build a Stencil with Shift - coefficient syntax.

Parameters
a_shiftShift of this operation
a_coefCoefficient of this operation
a_destRefratio(Optional) Destination refinement ratio. Defaults to (1,...,1) (no refinement)
a_destShift(Optional) Destination shift. Defaults to (0,...,0) (no shift)
a_srcRefratio(Optional) Source refinement ratio. Defaults to (1,...,1) (no refinement)

◆ transpose()

template<typename T >
void Proto::Stencil< T >::transpose ( unsigned char  a,
unsigned char  b 
)
inline

Transpose Stencil.

Transposes *this across two directions in [0,DIM). After transpose, coefficients associated with the offset (a,...,b,...) will be associated instead with (b,...,a,...)

◆ Zeros()

static Shift Proto::Shift::Zeros ( )
inlinestatic

Zero Shift.

Shortcut for Shift(Point::Zeros())