BlackoilAquiferModel: move the function bodies to the _impl.hpp file

... to make it more consistent with the existing code.
This commit is contained in:
Andreas Lauser 2018-11-01 15:19:33 +01:00
parent 6a929ca797
commit 848a65c1c8
2 changed files with 68 additions and 39 deletions

View File

@ -44,50 +44,19 @@ namespace Opm {
public:
explicit BlackoilAquiferModel(Simulator& simulator);
void initialSolutionApplied()
{
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer) {
aquifer->initialSolutionApplied();
}
}
void beginEpisode()
{ }
void beginTimeStep()
{
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer) {
aquifer->beginTimeStep();
}
}
void beginIteration()
{ }
void initialSolutionApplied();
void beginEpisode();
void beginTimeStep();
void beginIteration();
// add the water rate due to aquifers to the source term.
template <class Context>
void addToSource(RateVector& rates,
const Context& context,
unsigned spaceIdx,
unsigned timeIdx) const
{
for (auto& aquifer: aquifers_) {
aquifer.addToSource(rates, context, spaceIdx, timeIdx);
}
}
void endIteration()
{ }
void endTimeStep()
{
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer) {
aquifer->endTimeStep();
}
}
void endEpisode()
{ }
unsigned timeIdx) const;
void endIteration();
void endTimeStep();
void endEpisode();
protected:
// --------- Types ---------

View File

@ -9,6 +9,66 @@ namespace Opm {
init();
}
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::initialSolutionApplied()
{
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer) {
aquifer->initialSolutionApplied();
}
}
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::beginEpisode()
{ }
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::beginTimeStep()
{
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer) {
aquifer->beginTimeStep();
}
}
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::beginIteration()
{ }
template<typename TypeTag>
template <class Context>
void
BlackoilAquiferModel<TypeTag>::addToSource(RateVector& rates,
const Context& context,
unsigned spaceIdx,
unsigned timeIdx) const
{
for (auto& aquifer: aquifers_) {
aquifer.addToSource(rates, context, spaceIdx, timeIdx);
}
}
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::endIteration()
{ }
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::endTimeStep()
{
for (auto aquifer = aquifers_.begin(); aquifer != aquifers_.end(); ++aquifer) {
aquifer->endTimeStep();
}
}
template<typename TypeTag>
void
BlackoilAquiferModel<TypeTag>::endEpisode()
{ }
// Initialize the aquifers in the deck
template<typename TypeTag>
void