FlowBCManager.hpp
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_FLOWBCMANAGER_HEADER_INCLUDED
21 #define OPM_FLOWBCMANAGER_HEADER_INCLUDED
22 
23 #include <opm/core/pressure/flow_bc.h>
24 
25 struct UnstructuredGrid;
26 
27 namespace Opm
28 {
29 
35  {
36  public:
39  FlowBCManager();
40 
43 
46  void clear();
47 
58  void append(const FlowBCType type,
59  const int face,
60  const double value);
61 
63  enum Side { Xmin, Xmax, Ymin, Ymax, Zmin, Zmax };
64 
71  void pressureSide(const UnstructuredGrid& grid,
72  const Side side,
73  const double pressure);
74 
85  void fluxSide(const UnstructuredGrid& grid,
86  const Side side,
87  const double flux);
88 
92  const FlowBoundaryConditions* c_bcs() const;
93 
94  private:
95  // Disable copying and assignment.
96  FlowBCManager(const FlowBCManager& other);
97  FlowBCManager& operator=(const FlowBCManager& other);
98  // The managed struct.
100  };
101 
102 } // namespace Opm
103 
104 #endif // OPM_FLOWBCMANAGER_HEADER_INCLUDED
Side
Defines the canonical sides for logical cartesian grids.
Definition: FlowBCManager.hpp:63
void fluxSide(const UnstructuredGrid &grid, const Side side, const double flux)
Add BC_FLUX_TOTVOL boundary conditions to all faces on a given side.
Definition: FlowBCManager.cpp:116
const FlowBoundaryConditions * c_bcs() const
Access the managed boundary conditions.
Definition: FlowBCManager.cpp:145
Definition: flow_bc.h:39
Definition: AnisotropicEikonal.cpp:446
This class manages a FlowBoundaryConditions struct in the sense that it encapsulates creation and des...
Definition: FlowBCManager.hpp:34
FlowBCManager()
Default constructor sets up empty boundary conditions.
Definition: FlowBCManager.cpp:41
void append(const FlowBCType type, const int face, const double value)
Append a single boundary condition.
Definition: FlowBCManager.cpp:76
void clear()
Remove all appended BCs.
Definition: FlowBCManager.cpp:60
~FlowBCManager()
Destructor.
Definition: FlowBCManager.cpp:52
void pressureSide(const UnstructuredGrid &grid, const Side side, const double pressure)
Add BC_PRESSURE boundary conditions to all faces on a given side.
Definition: FlowBCManager.cpp:93