SpatialOps
SpatialOps::OneSidedStencil2< OpDir, Offset > Struct Template Reference

Support for one-sided stencils. More...

#include <OneSidedOperatorTypes.h>

Public Types

typedef OpDir DirT
 The orientation of the stencil (IndexTriplet)
 

Detailed Description

template<typename OpDir, typename Offset = IndexTriplet<0,0,0>>
struct SpatialOps::OneSidedStencil2< OpDir, Offset >

Support for one-sided stencils.

Template Parameters
OpDirthe unit vector (a IndexTriplet) that indicates the direction of offset for the stencil.
Offset(optional) the offset for the stencil. <0,0,0> (default) results in a one-sided stencil that computes into the first stencil point. <1,0,0> would offset the stencil so that it effectively computes into the <-1,0,0> point.
Example:
This code describes a 2-point stencil oriented in the (+x) direction.
OneSidedStencil2< IndexTriplet<1,0,0> >
It would look something like this:
        1 2 3
Read :  o o o
Write:  o
Example:
This code describes a 2-point stencil oriented in the (-x) direction that is offset in the (-x) direction.
OneSidedStencil2< IndexTriplet<-1,0,0>, IndexTriplet<-1,0,0> >
It would look something like this:
       n-2 n-1  n
Read :  o   o
Write:          o

Definition at line 66 of file OneSidedOperatorTypes.h.


The documentation for this struct was generated from the following file: