Loading...
Searching...
No Matches
BaseAquiferModel.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_BASE_AQUIFER_MODEL_HPP
#define OPM_BASE_AQUIFER_MODEL_HPP
#include <opm/models/discretization/common/fvbaseproperties.hh>
#include <opm/models/utils/basicproperties.hh>
#include <opm/models/utils/propertysystem.hh>
#include <opm/output/data/Aquifer.hpp>
#include <stdexcept>
namespace Opm {
template <class TypeTag>
class BaseAquiferModel
{
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
public:
explicit BaseAquiferModel(Simulator& simulator)
: simulator_(simulator)
{}
void initialSolutionApplied()
{ }
void initFromRestart(const data::Aquifers&)
{
throw std::logic_error {
"Initialization from restart data not supported "
"for base aquifer model"
};
}
void beginEpisode()
{ }
void beginTimeStep()
{ }
void beginIteration()
{ }
template <class Context>
void addToSource(RateVector&,
const Context&,
unsigned,
unsigned) const
{ }
void addToSource(RateVector&,
unsigned,
unsigned) const
{ }
void endIteration()
{ }
void endTimeStep()
{ }
void endEpisode()
{ }
template <class Restarter>
void serialize(Restarter&)
{ }
template <class Restarter>
void deserialize(Restarter&)
{ }
data::Aquifers aquiferData() const
{ return data::Aquifers{}; }
protected:
Simulator& simulator_;
};
} // namespace Opm
#endif // OPM_BASE_AQUIFER_MODEL_HPP
basicproperties.hh
Defines a type tags and some fundamental properties all models.
Opm::BaseAquiferModel::endEpisode
void endEpisode()
This method is called once an episode (report step) has been finished successfully.
Definition BaseAquiferModel.hpp:140
Opm::BaseAquiferModel::serialize
void serialize(Restarter &)
Write the internal state of the aquifer model to disk using an ad-hoc file format.
Definition BaseAquiferModel.hpp:148
Opm::BaseAquiferModel::beginEpisode
void beginEpisode()
This method is called when a new episode (report step) starts.
Definition BaseAquiferModel.hpp:86
Opm::BaseAquiferModel::beginIteration
void beginIteration()
This method is called before each Newton-Raphson iteration.
Definition BaseAquiferModel.hpp:98
Opm::BaseAquiferModel::addToSource
void addToSource(RateVector &, const Context &, unsigned, unsigned) const
Add the water which enters or leaves the reservoir due to aquifiers.
Definition BaseAquiferModel.hpp:105
Opm::BaseAquiferModel::initialSolutionApplied
void initialSolutionApplied()
Called once the problem has been fully initialized and the initial condition has been applied.
Definition BaseAquiferModel.hpp:63
Opm::BaseAquiferModel::beginTimeStep
void beginTimeStep()
This method is called when a new time step (substep) starts.
Definition BaseAquiferModel.hpp:92
Opm::BaseAquiferModel::endTimeStep
void endTimeStep()
This method is called after each successful time step (substep).
Definition BaseAquiferModel.hpp:133
Opm::BaseAquiferModel::endIteration
void endIteration()
This method is called after each Newton-Raphson successful iteration.
Definition BaseAquiferModel.hpp:124
Opm::BaseAquiferModel::initFromRestart
void initFromRestart(const data::Aquifers &)
Called if aquifers are being initialized from values retrieved from a restart file.
Definition BaseAquiferModel.hpp:75
Opm::BaseAquiferModel::deserialize
void deserialize(Restarter &)
Load the internal state of the aquifer model to disk using an ad-hoc file format.
Definition BaseAquiferModel.hpp:156
fvbaseproperties.hh
Declare the properties used by the infrastructure code of the finite volume discretizations.
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::GetPropType
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
propertysystem.hh
The Opm property system, traits with inheritance.