Add more iteration report methods to NewtonSolver.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-05-21 09:09:16 +02:00
parent 603b9657a1
commit cf3719d707
2 changed files with 10 additions and 0 deletions

View File

@ -85,12 +85,20 @@ namespace Opm {
/// Number of linear solver iterations used in all calls to step().
unsigned int linearIterations() const;
/// Number of linear solver iterations used in the last call to step().
unsigned int newtonIterationsLastStep() const;
/// Number of linear solver iterations used in the last call to step().
unsigned int linearIterationsLastStep() const;
private:
// --------- Data members ---------
SolverParameters param_;
PhysicalModel& model_;
unsigned int newtonIterations_;
unsigned int linearIterations_;
unsigned int newtonIterationsLast_;
unsigned int linearIterationsLast_;
// --------- Private methods ---------
enum RelaxType relaxType() const { return param_.relax_type_; }

View File

@ -121,6 +121,8 @@ namespace Opm
linearIterations_ += linearIterations;
newtonIterations_ += iteration;
linearIterationsLast_ = linearIterations;
newtonIterationsLast_ = iteration;
// Do model-specific post-step actions.
model_.afterStep(dt, reservoir_state, well_state);