All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
SimulatorIncompTwophase.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_SIMULATORINCOMPTWOPHASE_HEADER_INCLUDED
21 #define OPM_SIMULATORINCOMPTWOPHASE_HEADER_INCLUDED
22 
23 #include <memory>
24 #include <vector>
25 #include <iostream>
26 
27 struct UnstructuredGrid;
28 struct Wells;
29 struct FlowBoundaryConditions;
30 
31 namespace Opm
32 {
33  class ParameterGroup;
34  class IncompPropertiesInterface;
35  class RockCompressibility;
36  class WellsManager;
37  class LinearSolverInterface;
38  class SimulatorTimer;
39  class TwophaseState;
40  class WellState;
41  struct SimulatorReport;
42  struct Event;
43 
46  {
47  public:
72  SimulatorIncompTwophase(const ParameterGroup& param,
73  const UnstructuredGrid& grid,
74  const IncompPropertiesInterface& props,
75  const RockCompressibility* rock_comp_props,
76  WellsManager& wells_manager,
77  const std::vector<double>& src,
78  const FlowBoundaryConditions* bcs,
79  LinearSolverInterface& linsolver,
80  const double* gravity);
81 
89  SimulatorReport run(SimulatorTimer& timer,
90  TwophaseState& state,
91  WellState& well_state);
92 
120  Event& timestep_completed ();
121 
134  void sync ();
135 
136  private:
137  struct Impl;
138  // Using shared_ptr instead of unique_ptr since unique_ptr requires complete type for Impl.
139  std::shared_ptr<Impl> pimpl_;
140  };
141 
142 } // namespace Opm
143 
144 #endif // OPM_SIMULATORINCOMPTWOPHASE_HEADER_INCLUDED
SimulatorIncompTwophase(const ParameterGroup &param, const UnstructuredGrid &grid, const IncompPropertiesInterface &props, const RockCompressibility *rock_comp_props, WellsManager &wells_manager, const std::vector< double > &src, const FlowBoundaryConditions *bcs, LinearSolverInterface &linsolver, const double *gravity)
Initialise from parameters and objects to observe.
Definition: SimulatorIncompTwophase.cpp:119
Class collecting all necessary components for a two-phase simulation.
Definition: SimulatorIncompTwophase.hpp:45
void sync()
Notify the simulator that a callback has an interest in reading for reporting purposes the contents o...
Definition: SimulatorIncompTwophase.cpp:150
SimulatorReport run(SimulatorTimer &timer, TwophaseState &state, WellState &well_state)
Run the simulation.
Definition: SimulatorIncompTwophase.cpp:136
Definition: SimulatorIncompTwophase.cpp:68
Definition: SimulatorTimer.hpp:34