mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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;
|
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
|
ADB
|
||||||
FullyImplicitBlackoilSolver::fluidViscosity(const int phase,
|
FullyImplicitBlackoilSolver::fluidViscosity(const int phase,
|
||||||
const ADB& p ,
|
const ADB& p ,
|
||||||
|
@ -126,6 +126,9 @@ namespace Opm {
|
|||||||
const std::vector<ADB>& kr ,
|
const std::vector<ADB>& kr ,
|
||||||
const SolutionState& state );
|
const SolutionState& state );
|
||||||
|
|
||||||
|
double
|
||||||
|
residualNorm() const;
|
||||||
|
|
||||||
ADB
|
ADB
|
||||||
fluidViscosity(const int phase,
|
fluidViscosity(const int phase,
|
||||||
const ADB& p ,
|
const ADB& p ,
|
||||||
|
Loading…
Reference in New Issue
Block a user