mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #143 from blattms/collecttoiorank-fixes-2
localIndexMaps in CollectToIORank need to be lists of interior element indices.
This commit is contained in:
commit
626db3a0fa
@ -120,7 +120,6 @@ namespace Ewoms
|
||||
indexMap.resize( localSize );
|
||||
for( size_t i=0; i<localSize; ++i )
|
||||
{
|
||||
assert( localIndexMap_[ i ] != -1 );
|
||||
const int id = distributedGlobalIndex_[ localIndexMap_[ i ] ];
|
||||
indexMap[ i ] = globalPosition_[ id ] ;
|
||||
#ifndef NDEBUG
|
||||
@ -230,11 +229,10 @@ namespace Ewoms
|
||||
|
||||
localIndexMap_.clear();
|
||||
const size_t gridSize = gridManager.grid().size( 0 );
|
||||
localIndexMap_.resize( gridSize, -1 );
|
||||
localIndexMap_.reserve( gridSize );
|
||||
|
||||
// store the local Cartesian index
|
||||
IndexMapType distributedCartesianIndex;
|
||||
int interiorElementIdx = 0;
|
||||
distributedCartesianIndex.resize(gridSize, -1);
|
||||
|
||||
auto localView = gridManager.grid().leafGridView();
|
||||
@ -252,7 +250,7 @@ namespace Ewoms
|
||||
// only store interior element for collection
|
||||
if( element.partitionType() == Dune :: InteriorEntity )
|
||||
{
|
||||
localIndexMap_[elemIdx] = interiorElementIdx++;
|
||||
localIndexMap_.push_back( elemIdx );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user