/** * @file defs.hpp * @author Julian Iseringhausen * @date Tue Apr 5 19:40:03 2011 * * @brief Very basic types get defined here. * * */ #ifndef DEFS_HPP_ #define DEFS_HPP_ #include namespace VMG { /** * Some commands may want to control the control flow of * the command list they belong to. This can be achieved * by returning one of these values. * */ enum Request { Continue, ///< Continue execution normally StopCycleNow, ///< Stop execution of command list immediately StopCycleLater ///< Stop execution of loop after execution of all commands. }; /** * This enum specifies the available boundary conditions. * */ enum BC { Periodic, Dirichlet, Open }; class Boundary { public: Boundary(const BC& boundary_x, const BC& boundary_y, const BC& boundary_z) { bc[0] = boundary_x; bc[1] = boundary_y; bc[2] = boundary_z; } const BC& operator[](const int& index) const {return bc[index];} const BC& X() const {return bc[0];} const BC& Y() const {return bc[1];} const BC& Z() const {return bc[2];} private: BC bc[3]; }; /** * The boundaries at different grid levels may have to * be handled differently. This enum specifies the type * of the grid level. * */ enum BT { LocallyRefined, ///< For adaptive grids. Level is above the finest global grid. GlobalMax, ///< Finest global grid. GlobalCoarsened, ///< Coarse global grid. EmptyGrid, ///< This grid does not contain any data. BTUndefined }; } #endif /* DEFS_HPP_ */