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
38namespace Opm {
39
48template <class TypeTag>
50{
54
55public:
56 explicit BaseAquiferModel(Simulator& simulator)
57 : simulator_(simulator)
58 {}
59
65 { }
66
76 void initFromRestart(const data::Aquifers&)
77 {
78 throw std::logic_error {
79 "Initialization from restart data not supported "
80 "for base aquifer model"
81 };
82 }
83
88 { }
89
94 { }
95
100 { }
101
105 template <class Context>
106 void addToSource(RateVector&,
107 const Context&,
108 unsigned,
109 unsigned) const
110 { }
111
112
113 void addToSource(RateVector&,
114 unsigned,
115 unsigned) const
116 { }
117
118 Scalar cachedConnectionInfluxRate(unsigned) const
119 { return Scalar{0}; }
120
128 { }
129
137 { }
138
144 { }
145
150 template <class Restarter>
151 void serialize(Restarter&)
152 { }
153
158 template <class Restarter>
159 void deserialize(Restarter&)
160 { }
161
162 data::Aquifers aquiferData() const
163 { return data::Aquifers{}; }
164
165protected:
166 Simulator& simulator_;
167};
168
169} // namespace Opm
170
171#endif // OPM_BASE_AQUIFER_MODEL_HPP
Defines a type tags and some fundamental properties all models.
The base class which specifies the API of aquifer models.
Definition: BaseAquiferModel.hpp:50
void endEpisode()
This method is called once an episode (report step) has been finished successfully.
Definition: BaseAquiferModel.hpp:143
void serialize(Restarter &)
Write the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:151
void beginEpisode()
This method is called when a new episode (report step) starts.
Definition: BaseAquiferModel.hpp:87
void beginIteration()
This method is called before each Newton-Raphson iteration.
Definition: BaseAquiferModel.hpp:99
void addToSource(RateVector &, const Context &, unsigned, unsigned) const
Add the water which enters or leaves the reservoir due to aquifiers.
Definition: BaseAquiferModel.hpp:106
void initialSolutionApplied()
Called once the problem has been fully initialized and the initial condition has been applied.
Definition: BaseAquiferModel.hpp:64
void beginTimeStep()
This method is called when a new time step (substep) starts.
Definition: BaseAquiferModel.hpp:93
void endTimeStep()
This method is called after each successful time step (substep).
Definition: BaseAquiferModel.hpp:136
void endIteration()
This method is called after each Newton-Raphson successful iteration.
Definition: BaseAquiferModel.hpp:127
Scalar cachedConnectionInfluxRate(unsigned) const
Definition: BaseAquiferModel.hpp:118
data::Aquifers aquiferData() const
Definition: BaseAquiferModel.hpp:162
void initFromRestart(const data::Aquifers &)
Called if aquifers are being initialized from values retrieved from a restart file.
Definition: BaseAquiferModel.hpp:76
Simulator & simulator_
Definition: BaseAquiferModel.hpp:166
void addToSource(RateVector &, unsigned, unsigned) const
Definition: BaseAquiferModel.hpp:113
BaseAquiferModel(Simulator &simulator)
Definition: BaseAquiferModel.hpp:56
void deserialize(Restarter &)
Load the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:159
Declare the properties used by the infrastructure code of the finite volume discretizations.
Definition: blackoilbioeffectsmodules.hh:45
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
The Opm property system, traits with inheritance.