diff --git a/ebos/collecttoiorank.hh b/ebos/collecttoiorank.hh index 697411135..56af4433c 100644 --- a/ebos/collecttoiorank.hh +++ b/ebos/collecttoiorank.hh @@ -247,7 +247,7 @@ namespace Ewoms #else int elemIdx = elemMapper.map( element ); #endif - distributedCartesianIndex.push_back( gridManager.cartesianIndex( elemIdx ) ); + distributedCartesianIndex[elemIdx] = gridManager.cartesianIndex( elemIdx ); // only store interior element for collection if( element.partitionType() == Dune :: InteriorEntity )