Stencil< Function > Class Template Reference

Stencil. More...

#include <Stencil.h>

List of all members.

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


Detailed Description

template<class Function>
class Stencil< Function >

Stencil.

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);
 

Constructor & Destructor Documentation

template<class Function>
Stencil< Function >::Stencil (  )  [inline]

template<class Function>
Stencil< Function >::Stencil ( const Stencil< Function > &  model  )  [inline]

template<class Function>
Stencil< Function >::~Stencil (  )  [inline]

template<class Function>
template<class Init >
Stencil< Function >::Stencil ( const Init &  init  )  [inline]


Member Function Documentation

template<class Function>
template<int D, class T , class E >
View1<Stencil<Function>,Array<D,T,E> >::Type_t Stencil< Function >::operator() ( const Array< D, T, E > &  expr  )  const [inline]

template<class Function>
template<int D, class T , class E , class Dom >
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.

template<class Function>
template<int D>
Interval<D> Stencil< Function >::insetDomain ( const Interval< D > &  domain  )  [inline]

template<class Function>
template<int D, class DT >
Interval<D> Stencil< Function >::inputDomain ( const Domain< D, DT > &  domain  )  const [inline]

template<class Function>
Function& Stencil< Function >::function (  )  [inline]

template<class Function>
const Function& Stencil< Function >::function (  )  const [inline]


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

Generated on Wed Mar 16 06:20:38 2011 for FreePOOMA by  doxygen 1.5.9