mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-01 12:06:54 -06:00
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:
parent
cf1885fb04
commit
3a31a1a61f
@ -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 ,
|
||||
|
@ -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 ,
|
||||
|
Loading…
Reference in New Issue
Block a user