Use grid-provided index calculations.

This commit is contained in:
Jørgen Kvalsvik
2016-05-26 10:16:42 +02:00
parent 800b214462
commit c1ea13a550

View File

@@ -432,10 +432,9 @@ void RFT::writeTimeStep( std::vector< std::shared_ptr< const Well > > wells,
const size_t j = size_t( completion->getJ() );
const size_t k = size_t( completion->getK() );
const auto global_index = grid.getGlobalIndex( i, j, k );
const int index = this->global_to_active[ global_index ];
if( index == inactive_index ) continue;
if( !grid.cellActive( i, j, k ) ) continue;
const auto index = grid.activeIndex( i, j, k );
const double depth = grid.getCellDepth( i, j, k );
const double press = !pressure.empty() ? pressure[ index ] : 0.0;
const double satwat = !swat.empty() ? swat[ index ] : 0.0;