opm-simulators
BaseAquiferModel.hpp
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
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 2 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  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
27 #ifndef OPM_BASE_AQUIFER_MODEL_HPP
28 #define OPM_BASE_AQUIFER_MODEL_HPP
29 
33 
34 #include <opm/output/data/Aquifer.hpp>
35 
36 #include <stdexcept>
37 
38 namespace Opm {
39 
48 template <class TypeTag>
50 {
53 
54 public:
55  explicit BaseAquiferModel(Simulator& simulator)
56  : simulator_(simulator)
57  {}
58 
64  { }
65 
75  void initFromRestart(const data::Aquifers&)
76  {
77  throw std::logic_error {
78  "Initialization from restart data not supported "
79  "for base aquifer model"
80  };
81  }
82 
86  void beginEpisode()
87  { }
88 
93  { }
94 
99  { }
100 
104  template <class Context>
105  void addToSource(RateVector&,
106  const Context&,
107  unsigned,
108  unsigned) const
109  { }
110 
111 
112  void addToSource(RateVector&,
113  unsigned,
114  unsigned) const
115  { }
116 
117 
125  { }
126 
133  void endTimeStep()
134  { }
135 
140  void endEpisode()
141  { }
142 
147  template <class Restarter>
148  void serialize(Restarter&)
149  { }
150 
155  template <class Restarter>
156  void deserialize(Restarter&)
157  { }
158 
159  data::Aquifers aquiferData() const
160  { return data::Aquifers{}; }
161 
162 protected:
163  Simulator& simulator_;
164 };
165 
166 } // namespace Opm
167 
168 #endif // OPM_BASE_AQUIFER_MODEL_HPP
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(...))
Definition: propertysystem.hh:233
void endIteration()
This method is called after each Newton-Raphson successful iteration.
Definition: BaseAquiferModel.hpp:124
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
void deserialize(Restarter &)
Load the internal state of the aquifer model to disk using an ad-hoc file format. ...
Definition: BaseAquiferModel.hpp:156
void beginTimeStep()
This method is called when a new time step (substep) starts.
Definition: BaseAquiferModel.hpp:92
void serialize(Restarter &)
Write the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:148
Declare the properties used by the infrastructure code of the finite volume discretizations.
void beginIteration()
This method is called before each Newton-Raphson iteration.
Definition: BaseAquiferModel.hpp:98
void beginEpisode()
This method is called when a new episode (report step) starts.
Definition: BaseAquiferModel.hpp:86
void endTimeStep()
This method is called after each successful time step (substep).
Definition: BaseAquiferModel.hpp:133
void addToSource(RateVector &, const Context &, unsigned, unsigned) const
Add the water which enters or leaves the reservoir due to aquifiers.
Definition: BaseAquiferModel.hpp:105
void initialSolutionApplied()
Called once the problem has been fully initialized and the initial condition has been applied...
Definition: BaseAquiferModel.hpp:63
The base class which specifies the API of aquifer models.
Definition: BaseAquiferModel.hpp:49
The Opm property system, traits with inheritance.
void endEpisode()
This method is called once an episode (report step) has been finished successfully.
Definition: BaseAquiferModel.hpp:140
Defines a type tags and some fundamental properties all models.
void initFromRestart(const data::Aquifers &)
Called if aquifers are being initialized from values retrieved from a restart file.
Definition: BaseAquiferModel.hpp:75