Merge pull request #5829 from aritorto/addGridArgument

Add grid argument to recycle code
This commit is contained in:
Markus Blatt 2024-12-20 20:03:16 +01:00 committed by GitHub
commit e667efe522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View File

@ -476,7 +476,7 @@ void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(Eclips
if (lgrsSize) if (lgrsSize)
{ {
OpmLog::info("\nAdding LGRs to the grid and updating its leaf grid view"); 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 #if HAVE_MPI
@ -550,7 +550,9 @@ void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::doCreateGrids_(Eclips
} }
template<class ElementMapper, class GridView, class Scalar> template<class ElementMapper, class GridView, class Scalar>
void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::addLgrsUpdateLeafView(const LgrCollection& lgrCollection, const int lgrsSize) void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::addLgrsUpdateLeafView(const LgrCollection& lgrCollection,
const int lgrsSize,
Dune::CpGrid& grid)
{ {
std::vector<std::array<int,3>> cells_per_dim_vec; std::vector<std::array<int,3>> cells_per_dim_vec;
std::vector<std::array<int,3>> startIJK_vec; std::vector<std::array<int,3>> startIJK_vec;
@ -569,7 +571,7 @@ void GenericCpGridVanguard<ElementMapper,GridView,Scalar>::addLgrsUpdateLeafView
endIJK_vec.push_back({lgrCarfin.I2()+1, lgrCarfin.J2()+1, lgrCarfin.K2()+1}); endIJK_vec.push_back({lgrCarfin.I2()+1, lgrCarfin.J2()+1, lgrCarfin.K2()+1});
lgrName_vec.emplace_back(lgrCarfin.NAME()); 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<class ElementMapper, class GridView, class Scalar> template<class ElementMapper, class GridView, class Scalar>

View File

@ -209,7 +209,9 @@ protected:
void allocCartMapper(); void allocCartMapper();
void doCreateGrids_(EclipseState& eclState); 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 void allocTrans() = 0;
virtual double getTransmissibility(unsigned I, unsigned J) const = 0; virtual double getTransmissibility(unsigned I, unsigned J) const = 0;