Make iteration counts signed integers.

Generated warning when compared to the minimum int in well iteration count.
This commit is contained in:
Atgeirr Flø Rasmussen
2016-06-30 15:31:07 +02:00
parent c7e6070d31
commit 895a1de3fc
2 changed files with 18 additions and 18 deletions

View File

@@ -103,22 +103,22 @@ namespace Opm {
WellState& well_state);
/// Number of nonlinear solver iterations used in all calls to step().
unsigned int nonlinearIterations() const;
int nonlinearIterations() const;
/// Number of linear solver iterations used in all calls to step().
unsigned int linearIterations() const;
int linearIterations() const;
/// Number of well iterations used in all calls to step().
unsigned int wellIterations() const;
int wellIterations() const;
/// Number of nonlinear solver iterations used in the last call to step().
unsigned int nonlinearIterationsLastStep() const;
int nonlinearIterationsLastStep() const;
/// Number of linear solver iterations used in the last call to step().
unsigned int linearIterationsLastStep() const;
int linearIterationsLastStep() const;
/// Number of well iterations used in the last call to step().
unsigned int wellIterationsLastStep() const;
int wellIterationsLastStep() const;
/// Reference to physical model.
const PhysicalModel& model() const;
@@ -155,12 +155,12 @@ namespace Opm {
// --------- Data members ---------
SolverParameters param_;
std::unique_ptr<PhysicalModel> model_;
unsigned int nonlinearIterations_;
unsigned int linearIterations_;
unsigned int wellIterations_;
unsigned int nonlinearIterationsLast_;
unsigned int linearIterationsLast_;
unsigned int wellIterationsLast_;
int nonlinearIterations_;
int linearIterations_;
int wellIterations_;
int nonlinearIterationsLast_;
int linearIterationsLast_;
int wellIterationsLast_;
};
} // namespace Opm

View File

@@ -45,19 +45,19 @@ namespace Opm
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::nonlinearIterations() const
int NonlinearSolver<PhysicalModel>::nonlinearIterations() const
{
return nonlinearIterations_;
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::linearIterations() const
int NonlinearSolver<PhysicalModel>::linearIterations() const
{
return linearIterations_;
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::wellIterations() const
int NonlinearSolver<PhysicalModel>::wellIterations() const
{
return wellIterations_;
}
@@ -75,19 +75,19 @@ namespace Opm
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::nonlinearIterationsLastStep() const
int NonlinearSolver<PhysicalModel>::nonlinearIterationsLastStep() const
{
return nonlinearIterationsLast_;
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::linearIterationsLastStep() const
int NonlinearSolver<PhysicalModel>::linearIterationsLastStep() const
{
return linearIterationsLast_;
}
template <class PhysicalModel>
unsigned int NonlinearSolver<PhysicalModel>::wellIterationsLastStep() const
int NonlinearSolver<PhysicalModel>::wellIterationsLastStep() const
{
return wellIterationsLast_;
}