Only access globalTransmissibility on IO rank in EclWriter.

For other ranks this will not be available in the future.
This commit is contained in:
Markus Blatt 2019-10-01 22:47:17 +02:00
parent 5812b767ef
commit 39979ad3f7

View File

@ -489,9 +489,10 @@ private:
#endif #endif
const auto& cartesianCellIdx = globalGrid_.globalCell(); const auto& cartesianCellIdx = globalGrid_.globalCell();
const auto* globalTrans = &(simulator_.vanguard().globalTransmissibility()); const EclTransmissibility<TypeTag>* globalTrans;
if (!collectToIORank_.isParallel()) if (!collectToIORank_.isParallel())
{
// in the sequential case we must use the transmissibilites defined by // in the sequential case we must use the transmissibilites defined by
// the problem. (because in the sequential case, the grid manager does // the problem. (because in the sequential case, the grid manager does
// not compute "global" transmissibilities for performance reasons. in // not compute "global" transmissibilities for performance reasons. in
@ -499,6 +500,11 @@ private:
// because this object refers to the distributed grid and we need the // because this object refers to the distributed grid and we need the
// sequential version here.) // sequential version here.)
globalTrans = &simulator_.problem().eclTransmissibilities(); globalTrans = &simulator_.problem().eclTransmissibilities();
}
else
{
globalTrans = &(simulator_.vanguard().globalTransmissibility());
}
auto elemIt = globalGridView.template begin</*codim=*/0>(); auto elemIt = globalGridView.template begin</*codim=*/0>();
const auto& elemEndIt = globalGridView.template end</*codim=*/0>(); const auto& elemEndIt = globalGridView.template end</*codim=*/0>();
@ -588,7 +594,7 @@ private:
ElementMapper globalElemMapper(globalGridView); ElementMapper globalElemMapper(globalGridView);
#endif #endif
const auto* globalTrans = &(simulator_.vanguard().globalTransmissibility()); const EclTransmissibility<TypeTag>* globalTrans;
if (!collectToIORank_.isParallel()) { if (!collectToIORank_.isParallel()) {
// in the sequential case we must use the transmissibilites defined by // in the sequential case we must use the transmissibilites defined by
// the problem. (because in the sequential case, the grid manager does // the problem. (because in the sequential case, the grid manager does
@ -598,6 +604,10 @@ private:
// sequential version here.) // sequential version here.)
globalTrans = &simulator_.problem().eclTransmissibilities(); globalTrans = &simulator_.problem().eclTransmissibilities();
} }
else
{
globalTrans = &(simulator_.vanguard().globalTransmissibility());
}
auto cartDims = simulator_.vanguard().cartesianIndexMapper().cartesianDimensions(); auto cartDims = simulator_.vanguard().cartesianIndexMapper().cartesianDimensions();
auto elemIt = globalGridView.template begin</*codim=*/0>(); auto elemIt = globalGridView.template begin</*codim=*/0>();