diff --git a/opm/simulators/flow/CpGridVanguard.hpp b/opm/simulators/flow/CpGridVanguard.hpp index 0bece90db5..8cf1980de5 100644 --- a/opm/simulators/flow/CpGridVanguard.hpp +++ b/opm/simulators/flow/CpGridVanguard.hpp @@ -272,12 +272,11 @@ public: this->updateGridView_(); this->updateCellDepths_(); this->updateCellThickness_(); - } - if (this->grid_->comm().size()>1) { - // Add LGRs and update the leaf grid view in the global (undistributed) simulation grid. - // Purpose: To enable synchronization of cell ids in 'serial mode', - // we rely on the "parent-to-children" cell id mapping. - if (const auto& lgrs = this->eclState().getLgrs(); lgrs.size() > 0) { + + if (this->grid_->comm().size()>1) { + // Add LGRs and update the leaf grid view in the global (undistributed) simulation grid. + // Purpose: To enable synchronization of cell ids in 'serial mode', + // we rely on the "parent-to-children" cell id mapping. OpmLog::info("\nAdding LGRs to the global view and updating its leaf grid view"); this->grid_->switchToGlobalView(); this->addLgrsUpdateLeafView(lgrs, lgrs.size(), *this->grid_);