changed: avoid deck usage on non-root processes setting up gravity

this is achieved by using the InitConfig member from EclipseState
instead
This commit is contained in:
Arne Morten Kvarving 2020-01-22 10:31:23 +01:00
parent 8b4c5c81cb
commit 7f9f65811f

View File

@ -666,10 +666,9 @@ public:
// disables gravity, else the standard value of the gravity constant at sea level
// on earth is used
this->gravity_ = 0.0;
const auto& deck = simulator.vanguard().deck();
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity))
this->gravity_[dim - 1] = 9.80665;
if (deck.hasKeyword("NOGRAV"))
if (!eclState.getInitConfig().hasGravity())
this->gravity_[dim - 1] = 0.0;
if (enableTuning_) {