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{
53
54public:
55 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
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
134 { }
135
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
162protected:
163 Simulator& simulator_;
164};
165
166} // namespace Opm
167
168#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:140
void serialize(Restarter &)
Write the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:148
void beginEpisode()
This method is called when a new episode (report step) starts.
Definition: BaseAquiferModel.hpp:86
void beginIteration()
This method is called before each Newton-Raphson iteration.
Definition: BaseAquiferModel.hpp:98
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
void beginTimeStep()
This method is called when a new time step (substep) starts.
Definition: BaseAquiferModel.hpp:92
void endTimeStep()
This method is called after each successful time step (substep).
Definition: BaseAquiferModel.hpp:133
void endIteration()
This method is called after each Newton-Raphson successful iteration.
Definition: BaseAquiferModel.hpp:124
data::Aquifers aquiferData() const
Definition: BaseAquiferModel.hpp:159
void initFromRestart(const data::Aquifers &)
Called if aquifers are being initialized from values retrieved from a restart file.
Definition: BaseAquiferModel.hpp:75
Simulator & simulator_
Definition: BaseAquiferModel.hpp:163
void addToSource(RateVector &, unsigned, unsigned) const
Definition: BaseAquiferModel.hpp:112
BaseAquiferModel(Simulator &simulator)
Definition: BaseAquiferModel.hpp:55
void deserialize(Restarter &)
Load the internal state of the aquifer model to disk using an ad-hoc file format.
Definition: BaseAquiferModel.hpp:156
Declare the properties used by the infrastructure code of the finite volume discretizations.
Definition: blackoilboundaryratevector.hh:37
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:235
The Opm property system, traits with inheritance.