From 39979ad3f7fae4c9ae29d98c0e2b709e7408413a Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Tue, 1 Oct 2019 22:47:17 +0200 Subject: [PATCH] Only access globalTransmissibility on IO rank in EclWriter. For other ranks this will not be available in the future. --- ebos/eclwriter.hh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index f07e55b5e..dfa99dab9 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -489,9 +489,10 @@ private: #endif const auto& cartesianCellIdx = globalGrid_.globalCell(); - const auto* globalTrans = &(simulator_.vanguard().globalTransmissibility()); + const EclTransmissibility* globalTrans; if (!collectToIORank_.isParallel()) + { // in the sequential case we must use the transmissibilites defined by // the problem. (because in the sequential case, the grid manager does // 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 // sequential version here.) globalTrans = &simulator_.problem().eclTransmissibilities(); + } + else + { + globalTrans = &(simulator_.vanguard().globalTransmissibility()); + } auto elemIt = globalGridView.template begin(); const auto& elemEndIt = globalGridView.template end(); @@ -588,7 +594,7 @@ private: ElementMapper globalElemMapper(globalGridView); #endif - const auto* globalTrans = &(simulator_.vanguard().globalTransmissibility()); + const EclTransmissibility* globalTrans; if (!collectToIORank_.isParallel()) { // in the sequential case we must use the transmissibilites defined by // the problem. (because in the sequential case, the grid manager does @@ -598,6 +604,10 @@ private: // sequential version here.) globalTrans = &simulator_.problem().eclTransmissibilities(); } + else + { + globalTrans = &(simulator_.vanguard().globalTransmissibility()); + } auto cartDims = simulator_.vanguard().cartesianIndexMapper().cartesianDimensions(); auto elemIt = globalGridView.template begin();