Use the already queried active phase index directly instead of looking it up each time.

This commit is contained in:
Markus Blatt 2015-01-28 16:40:23 +01:00
parent 622c8825a9
commit 2209170c15

View File

@ -1941,9 +1941,9 @@ namespace {
if (active_[idx]) {
const int pos = pu.phase_pos[idx];
const ADB& tempB = rq_[pos].b;
B.col(pu.phase_pos[idx]) = 1./tempB.value();
R.col(pu.phase_pos[idx]) = residual_.material_balance_eq[pu.phase_pos[idx]].value();
tempV.col(pu.phase_pos[idx]) = R.col(pu.phase_pos[idx]).abs()/pv;
B.col(pos) = 1./tempB.value();
R.col(pos) = residual_.material_balance_eq[pos].value();
tempV.col(pos) = R.col(pos).abs()/pv;
}
}