#ifndef _MYSTENCILS_H_ #define _MYSTENCILS_H_ #include "Pooma/Arrays.h" class StateEquation1 { public: StateEquation1() {} template inline typename A::Element_t operator()(const A& x1 /*, const A& x2 ... */, int i, int j ) const { return 0.25*(x1(i+1, j) + x1(i-1, j) + x1(i, j+1) + x1(i, j-1)) - x1(i, j); // + x2(i,j) / 2 .... } inline int lowerExtent(int) const { return 1; } inline int upperExtent(int) const { return 1; } }; class StateEquation2 { public: StateEquation2() {} template inline typename A::Element_t operator()(const A& x1 /*, const A& x2 ... */, int i, int j ) const { return /* x2(i,j) + */ x1(i, j) /* ... */ ; } inline int lowerExtent(int) const { return 1; } inline int upperExtent(int) const { return 1; } }; #endif //_MYSTENCILS_H_