mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make CollectDataIORank::localIndexMap_ as map from element to interior element index.
Previously it was an identity map.
This commit is contained in:
@@ -120,6 +120,7 @@ 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
|
||||
@@ -227,6 +228,7 @@ namespace Ewoms
|
||||
|
||||
// store the local Cartesian index
|
||||
IndexMapType distributedCartesianIndex;
|
||||
int interiorElementIdx = 0;
|
||||
distributedCartesianIndex.resize(gridSize, -1);
|
||||
|
||||
auto localView = gridManager.grid().leafGridView();
|
||||
@@ -244,7 +246,7 @@ namespace Ewoms
|
||||
// only store interior element for collection
|
||||
if( element.partitionType() == Dune :: InteriorEntity )
|
||||
{
|
||||
localIndexMap_[elemIdx] = elemIdx;
|
||||
localIndexMap_[elemIdx] = interiorElementIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user