/** * @file interface.hpp * @author Julian Iseringhausen * @date Mon Apr 18 12:56:05 2011 * * @brief VMG::Interface * */ #ifndef INTERFACE_HPP_ #define INTERFACE_HPP_ #include #include "base/object.hpp" #include "grid/grid_properties.hpp" namespace VMG { class Grid; class Multigrid; class Interface : public Object { public: Interface(const Boundary& boundary, const int& levelMin, const int& levelMax, const Vector& box_offset, const vmg_float box_size, int coarseningSteps=0, vmg_float alpha=1.6) : bc(boundary), levelMin(levelMin), levelMax(levelMax) { InitInterface(box_offset, box_size, coarseningSteps, alpha); } virtual ~Interface() {} virtual void ImportRightHandSide(Multigrid& grid) = 0; virtual void ExportSolution(Grid& grid) = 0; const std::vector& Global() const {return global;} const std::vector& Extent() const {return extent;} const GlobalIndices& Global(const int& level) const { return global[levelMax - level]; } const SpatialExtent& Extent(const int& level) const { return extent[levelMax - level]; } const Boundary& BoundaryConditions() const {return bc;} const int& MinLevel() const {return levelMin;} const int& MaxLevel() const {return levelMax;} private: void InitInterface(const Vector& box_offset, const vmg_float& box_end, const int& coarseningSteps, const vmg_float& alpha); std::vector global; std::vector extent; Boundary bc; int levelMin, levelMax; }; } #endif /* INTERFACE_HPP_ */