Output rates for present phases

This commit is contained in:
Anders Matheson 2016-09-19 16:43:41 +02:00
parent 9d991292be
commit 0ac0c97612

View File

@ -230,10 +230,15 @@ namespace Opm
const auto& wv = this->wellRates();
data::Rates wellrates;
if( np == 3 ) {
/* only write if 3-phase solution */
if( np > 0 ) {
wellrates.set( rt::wat, wv[ wellrate_index + 0 ] );
}
if( np > 1 ) {
wellrates.set( rt::oil, wv[ wellrate_index + 1 ] );
}
if( np > 2 ) {
wellrates.set( rt::gas, wv[ wellrate_index + 2 ] );
}