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:
dr-robertk 2017-04-03 16:30:33 +02:00 committed by GitHub
commit 626db3a0fa

View File

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