source: src/base/defs.hpp@ 716da7

Last change on this file since 716da7 was 716da7, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Fix energy calculation.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1729 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 1.5 KB
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
16namespace 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 */
25enum 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 */
35enum BC {
36 Periodic,
37 Dirichlet,
38 Open
39};
40
41class Boundary
42{
43public:
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
57private:
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 */
67enum 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.
72 BTUndefined
73};
74
75}
76
77#endif /* DEFS_HPP_ */
Note: See TracBrowser for help on using the repository browser.