| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * @file defs.hpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Tue Apr 5 19:40:03 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief Very basic types get defined here.
|
|---|
| 7 | *
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifndef DEFS_HPP_
|
|---|
| 12 | #define DEFS_HPP_
|
|---|
| 13 |
|
|---|
| 14 | #include <cassert>
|
|---|
| 15 |
|
|---|
| 16 | namespace VMG
|
|---|
| 17 | {
|
|---|
| 18 |
|
|---|
| 19 | /**
|
|---|
| 20 | * Some commands may want to control the control flow of
|
|---|
| 21 | * the command list they belong to. This can be achieved
|
|---|
| 22 | * by returning one of these values.
|
|---|
| 23 | *
|
|---|
| 24 | */
|
|---|
| 25 | enum Request {
|
|---|
| 26 | Continue, ///< Continue execution normally
|
|---|
| 27 | StopCycleNow, ///< Stop execution of command list immediately
|
|---|
| 28 | StopCycleLater ///< Stop execution of loop after execution of all commands.
|
|---|
| 29 | };
|
|---|
| 30 |
|
|---|
| 31 | /**
|
|---|
| 32 | * This enum specifies the available boundary conditions.
|
|---|
| 33 | *
|
|---|
| 34 | */
|
|---|
| 35 | enum BC {
|
|---|
| 36 | Periodic,
|
|---|
| 37 | Dirichlet,
|
|---|
| 38 | Open
|
|---|
| 39 | };
|
|---|
| 40 |
|
|---|
| 41 | class Boundary
|
|---|
| 42 | {
|
|---|
| 43 | public:
|
|---|
| 44 | Boundary(const BC& boundary_x, const BC& boundary_y, const BC& boundary_z)
|
|---|
| 45 | {
|
|---|
| 46 | bc[0] = boundary_x;
|
|---|
| 47 | bc[1] = boundary_y;
|
|---|
| 48 | bc[2] = boundary_z;
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | const BC& operator[](const int& index) const {return bc[index];}
|
|---|
| 52 |
|
|---|
| 53 | const BC& X() const {return bc[0];}
|
|---|
| 54 | const BC& Y() const {return bc[1];}
|
|---|
| 55 | const BC& Z() const {return bc[2];}
|
|---|
| 56 |
|
|---|
| 57 | private:
|
|---|
| 58 | BC bc[3];
|
|---|
| 59 | };
|
|---|
| 60 |
|
|---|
| 61 | /**
|
|---|
| 62 | * The boundaries at different grid levels may have to
|
|---|
| 63 | * be handled differently. This enum specifies the type
|
|---|
| 64 | * of the grid level.
|
|---|
| 65 | *
|
|---|
| 66 | */
|
|---|
| 67 | enum BT {
|
|---|
| 68 | LocallyRefined, ///< For adaptive grids. Level is above the finest global grid.
|
|---|
| 69 | GlobalMax, ///< Finest global grid.
|
|---|
| 70 | GlobalCoarsened, ///< Coarse global grid.
|
|---|
| 71 | EmptyGrid ///< This grid does not contain any data. May be useful for parallelization
|
|---|
| 72 | };
|
|---|
| 73 |
|
|---|
| 74 | }
|
|---|
| 75 |
|
|---|
| 76 | #endif /* DEFS_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.