restructure if

This commit is contained in:
Cintia Goncalves Machado
2020-11-24 09:05:18 +01:00
parent 82c8201f00
commit f0ba56652e

View File

@@ -2123,11 +2123,10 @@ namespace Opm
for (int component = 0; component < num_comp; ++component) {
mix[component] = std::fabs(q_out_perf[perf*num_comp + component]/tot_surf_rate);
}
} else {
std::fill(mix.begin(), mix.end(), 0.0);
if (num_comp == 1){
} else if (num_comp == 1) {
mix[num_comp-1] = 1.0;
} else {
std::fill(mix.begin(), mix.end(), 0.0);
// No flow => use well specified fractions for mix.
if (this->isInjector()) {
switch (this->wellEcl().injectorType()) {
@@ -2166,7 +2165,6 @@ namespace Opm
}
}
}
// Compute volume ratio.
x = mix;