Implement residualNorm() for reservoir part.

This is a prerequisite to having a working Newton loop.

This is a forward-port of commit 604f866.
This commit is contained in:
Bård Skaflestad 2013-05-24 11:38:17 +02:00
parent cf1885fb04
commit 3a31a1a61f
2 changed files with 18 additions and 0 deletions

View File

@ -430,6 +430,21 @@ namespace Opm {
rq_[ actph ].mflux = upwind.select(b * mob) * head;
}
double
FullyImplicitBlackoilSolver::residualNorm() const
{
double r = 0;
for (std::vector<ADB>::const_iterator
b = residual_.reservoir.begin(),
e = residual_.reservoir.end();
b != e; ++b)
{
r = std::max(r, (*b).value().matrix().norm());
}
return r;
}
ADB
FullyImplicitBlackoilSolver::fluidViscosity(const int phase,
const ADB& p ,

View File

@ -126,6 +126,9 @@ namespace Opm {
const std::vector<ADB>& kr ,
const SolutionState& state );
double
residualNorm() const;
ADB
fluidViscosity(const int phase,
const ADB& p ,