Add non-const overload of model().

This commit is contained in:
Atgeirr Flø Rasmussen 2015-12-01 14:16:11 +01:00
parent 6fed5a50c3
commit fab64f5afb
2 changed files with 9 additions and 0 deletions

View File

@ -100,6 +100,9 @@ namespace Opm {
/// Reference to physical model.
const PhysicalModel& model() const;
/// Mutable reference to physical model.
PhysicalModel& model();
/// Detect oscillation or stagnation in a given residual history.
void detectOscillations(const std::vector<std::vector<double>>& residual_history,
const int it, bool& oscillate, bool& stagnate) const;

View File

@ -60,6 +60,12 @@ namespace Opm
return *model_;
}
template <class PhysicalModel>
PhysicalModel& NonlinearSolver<PhysicalModel>::model()
{
return *model_;
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::nonlinearIterationsLastStep() const
{