mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
Fix phase property references
Methods 'computeRelperm()' and 'computePressures()' *always* return a three-element vector of phase properties. We must therefore translate to canonical phase indices before indexing into the results.
This commit is contained in:
parent
390bb2b3f1
commit
13d3a42448
@ -711,7 +711,7 @@ namespace {
|
|||||||
const std::vector<ADB> kr = computeRelPerm(state);
|
const std::vector<ADB> kr = computeRelPerm(state);
|
||||||
const std::vector<ADB> pressures = computePressures(state);
|
const std::vector<ADB> pressures = computePressures(state);
|
||||||
for (int phaseIdx = 0; phaseIdx < fluid_.numPhases(); ++phaseIdx) {
|
for (int phaseIdx = 0; phaseIdx < fluid_.numPhases(); ++phaseIdx) {
|
||||||
computeMassFlux(phaseIdx, transi, kr[phaseIdx], pressures[phaseIdx], state);
|
computeMassFlux(phaseIdx, transi, kr[canph_[phaseIdx]], pressures[canph_[phaseIdx]], state);
|
||||||
// std::cout << "===== kr[" << phase << "] = \n" << std::endl;
|
// std::cout << "===== kr[" << phase << "] = \n" << std::endl;
|
||||||
// std::cout << kr[phase];
|
// std::cout << kr[phase];
|
||||||
// std::cout << "===== rq_[" << phase << "].mflux = \n" << std::endl;
|
// std::cout << "===== rq_[" << phase << "].mflux = \n" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user