diff --git a/opm/autodiff/FullyImplicitBlackoilSolver.cpp b/opm/autodiff/FullyImplicitBlackoilSolver.cpp index 71d4022cc..b24a46964 100644 --- a/opm/autodiff/FullyImplicitBlackoilSolver.cpp +++ b/opm/autodiff/FullyImplicitBlackoilSolver.cpp @@ -430,6 +430,21 @@ namespace Opm { rq_[ actph ].mflux = upwind.select(b * mob) * head; } + double + FullyImplicitBlackoilSolver::residualNorm() const + { + double r = 0; + for (std::vector::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 , diff --git a/opm/autodiff/FullyImplicitBlackoilSolver.hpp b/opm/autodiff/FullyImplicitBlackoilSolver.hpp index 6c56158b8..ea737df7f 100644 --- a/opm/autodiff/FullyImplicitBlackoilSolver.hpp +++ b/opm/autodiff/FullyImplicitBlackoilSolver.hpp @@ -126,6 +126,9 @@ namespace Opm { const std::vector& kr , const SolutionState& state ); + double + residualNorm() const; + ADB fluidViscosity(const int phase, const ADB& p ,