Make CollectDataIORank::localIndexMap_ as map from element to interior element index.

Previously it was an identity map.
This commit is contained in:
Markus Blatt
2017-01-18 11:16:14 +01:00
parent 0aa4b668a9
commit b61ff14eb0

View File

@@ -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++;
}
}