diff --git a/opm/simulators/flow/GenericCpGridVanguard.cpp b/opm/simulators/flow/GenericCpGridVanguard.cpp index 6b2145512..f12760b82 100644 --- a/opm/simulators/flow/GenericCpGridVanguard.cpp +++ b/opm/simulators/flow/GenericCpGridVanguard.cpp @@ -476,7 +476,7 @@ void GenericCpGridVanguard::doCreateGrids_(Eclips if (lgrsSize) { OpmLog::info("\nAdding LGRs to the grid and updating its leaf grid view"); - this->addLgrsUpdateLeafView(lgrs, lgrsSize); + this->addLgrsUpdateLeafView(lgrs, lgrsSize, *(this->grid_)); } #if HAVE_MPI @@ -550,7 +550,9 @@ void GenericCpGridVanguard::doCreateGrids_(Eclips } template -void GenericCpGridVanguard::addLgrsUpdateLeafView(const LgrCollection& lgrCollection, const int lgrsSize) +void GenericCpGridVanguard::addLgrsUpdateLeafView(const LgrCollection& lgrCollection, + const int lgrsSize, + Dune::CpGrid& grid) { std::vector> cells_per_dim_vec; std::vector> startIJK_vec; @@ -569,7 +571,7 @@ void GenericCpGridVanguard::addLgrsUpdateLeafView endIJK_vec.push_back({lgrCarfin.I2()+1, lgrCarfin.J2()+1, lgrCarfin.K2()+1}); lgrName_vec.emplace_back(lgrCarfin.NAME()); } - this->grid_->addLgrsUpdateLeafView(cells_per_dim_vec, startIJK_vec, endIJK_vec, lgrName_vec); + grid.addLgrsUpdateLeafView(cells_per_dim_vec, startIJK_vec, endIJK_vec, lgrName_vec); }; template diff --git a/opm/simulators/flow/GenericCpGridVanguard.hpp b/opm/simulators/flow/GenericCpGridVanguard.hpp index 4fd16aea9..68fdc30ae 100644 --- a/opm/simulators/flow/GenericCpGridVanguard.hpp +++ b/opm/simulators/flow/GenericCpGridVanguard.hpp @@ -209,7 +209,9 @@ protected: void allocCartMapper(); void doCreateGrids_(EclipseState& eclState); - void addLgrsUpdateLeafView(const LgrCollection& lgrCollection, const int lgrsSize); + void addLgrsUpdateLeafView(const LgrCollection& lgrCollection, + const int lgrsSize, + Dune::CpGrid& grid); virtual void allocTrans() = 0; virtual double getTransmissibility(unsigned I, unsigned J) const = 0;