/** * @file level_operator.hpp * @author Julian Iseringhausen * @date Mon Apr 18 12:59:28 2011 * * @brief VMG::LevelOperator * */ #ifndef LEVEL_OPERATOR_HPP_ #define LEVEL_OPERATOR_HPP_ #include "base/object.hpp" #include "base/stencil.hpp" namespace VMG { class Grid; class Multigrid; class LevelOperator : public Object { public: LevelOperator(const Stencil& operatorRestrict_, const Stencil& operatorProlongate_) : operatorRestrict(operatorRestrict_), operatorProlongate(operatorProlongate_) {} void Restrict(Multigrid& sol, Multigrid& rhs); void Prolongate(Multigrid& sol, Multigrid& rhs); protected: virtual void Restrict(Grid& sol_f, Grid& rhs_f, Grid& sol_c, Grid& rhs_c) = 0; virtual void Prolongate(Grid& sol_f, Grid& rhs_f, Grid& sol_c, Grid& rhs_c) = 0; Stencil& OperatorRestrict() {return operatorRestrict;} Stencil& OperatorProlongate() {return operatorProlongate;} private: Stencil operatorRestrict, operatorProlongate; }; } #endif