keep the unity of the API.

This commit is contained in:
Liu Ming 2016-06-21 08:36:15 +08:00
parent b14ebe7616
commit d13d21231d
2 changed files with 10 additions and 1 deletions

View File

@ -219,6 +219,8 @@ namespace {
const double r0 = residualNorm();
const double r_polymer = residual_.material_balance_eq[2].value().matrix().lpNorm<Eigen::Infinity>();
int it = 0;
// this solver does not solve well equations first.
wellIterations_ = 0;
std::cout << "\nIteration Residual Polymer Res\n"
<< std::setw(9) << it << std::setprecision(9)
<< std::setw(18) << r0 << std::setprecision(9)
@ -242,7 +244,7 @@ namespace {
newtonIterations_ += 1;
std::cout << std::setw(9) << it << std::setprecision(9)
<< std::setw(18) << r << std::setprecision(9)
<< std::setw(18) << rr_polymer << std::endl;
<< std::setw(18) << rr_polymer << std::endl;
}
if (resTooLarge) {
@ -267,6 +269,11 @@ namespace {
return linearIterations_;
}
int FullyImplicitCompressiblePolymerSolver::wellIterations() const
{
return wellIterations_;
}
FullyImplicitCompressiblePolymerSolver::ReservoirResidualQuant::ReservoirResidualQuant()
: accum(2, ADB::null())
, mflux( ADB::null())

View File

@ -88,6 +88,7 @@ namespace Opm {
int nonlinearIterations() const;
int linearIterations() const;
int wellIterations() const;
/// Not used by this class except to satisfy interface requirements.
typedef parameter::ParameterGroup SolverParameters;
@ -159,6 +160,7 @@ namespace Opm {
unsigned int newtonIterations_;
unsigned int linearIterations_;
unsigned int wellIterations_;
// Private methods.
SolutionState