#include <Stencil.h>
Public Member Functions | |
Stencil () | |
Stencil (const Stencil< Function > &model) | |
~Stencil () | |
template<class Init > | |
Stencil (const Init &init) | |
template<int D> | |
Interval< D > | insetDomain (const Interval< D > &domain) |
template<int D, class DT > | |
Interval< D > | inputDomain (const Domain< D, DT > &domain) const |
Function & | function () |
const Function & | function () const |
Array apply | |
template<int D, class T , class E > | |
View1< Stencil< Function > , Array< D, T, E > >::Type_t | operator() (const Array< D, T, E > &expr) const |
template<int D, class T , class E , class Dom > | |
View2< Stencil< Function > , Array< D, T, E >, Dom > ::Type_t | operator() (const Array< D, T, E > &expr, const Dom &domain) const |
Base class for constructing stencil classes. To construct a stencil class using Stencil, define:
class MyStencil
Give it the member function template:
template<class A> T operator()(const A& expr, int, int, ...) const;
The argument 'expr' is the type of the expression the stencil is being applied to. This will generally be some kind of Array. The integer arguments have the location at which the stencil is being applied. (The const is important. The stencil may be passed to the evaluator as a const reference.)
The return type is whatever the stencil outputs. If this is not the same type as the elements of 'expr', you must specialize the Pooma FunctorResult class (see Pooma/FunctorResult.h).
To apply a stencil, create an instance of the Stencil<> class.
Stencil<MyStencil> myStencil;
This class really only does one thing: defines operator()(expr), and operator()(expr,domain). When given an expression it wraps it in a StencilEngine and builds an array with that engine, so that you can write:
b = myStencil(a); b(dom) = myStencil(a,dom);
Stencil< Function >::Stencil | ( | const Stencil< Function > & | model | ) | [inline] |
Stencil< Function >::Stencil | ( | const Init & | init | ) | [inline] |
View1<Stencil<Function>,Array<D,T,E> >::Type_t Stencil< Function >::operator() | ( | const Array< D, T, E > & | expr | ) | const [inline] |
View2<Stencil<Function>,Array<D,T,E>,Dom>::Type_t Stencil< Function >::operator() | ( | const Array< D, T, E > & | expr, | |
const Dom & | domain | |||
) | const [inline] |
References CTAssert.
Interval<D> Stencil< Function >::insetDomain | ( | const Interval< D > & | domain | ) | [inline] |
References Stencil< Function >::function().
Function& Stencil< Function >::function | ( | ) | [inline] |
const Function& Stencil< Function >::function | ( | ) | const [inline] |