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:
Bård Skaflestad 2014-05-27 13:39:11 +02:00
parent 390bb2b3f1
commit 13d3a42448

View File

@ -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;