Skip to content

Commit 6d9d7e4

Browse files
committed
WIP Neighbor cornres, do not break old tests
1 parent cf0057b commit 6d9d7e4

6 files changed

Lines changed: 504 additions & 572 deletions

File tree

opm/grid/cpgrid/CpGrid.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,9 @@ bool CpGrid::refineAndUpdateGrid(bool throwOnFailure,
20062006
std::vector<Opm::Lgr::CellRefinementBoundaryInfo> cellRefinements(currentLeafData().size(0)); // if a cell has been refined, then
20072007
// its cell-refinement info is stored in gridCellRefinements[ element.index() ]
20082008

2009+
std::vector<Opm::Lgr::BoundaryInfo> boundaryInfoCellRefs(currentLeafData().size(0)); // if a cell has been refined, then
2010+
2011+
bool withoutFaults = true;
20092012
// Ignore marked aquifer cells/connections in globalRefine()/adapt(); throw in addLgrsUpdateLeafView()/autoRef().
20102013
Opm::Lgr::filterMarkedAquiferCellsAndConnections(*this, throwOnFailure);
20112014
Opm::Lgr::refineAndProvideMarkedRefinedRelations( *this,
@@ -2028,7 +2031,9 @@ bool CpGrid::refineAndUpdateGrid(bool throwOnFailure,
20282031
preAdapt_level_to_leaf_cells_vec,
20292032
/* Additional parameters */
20302033
cells_per_dim_vec,
2031-
cellRefinements);
2034+
cellRefinements,
2035+
boundaryInfoCellRefs,
2036+
withoutFaults);
20322037

20332038
#if HAVE_MPI
20342039
auto global_markedElem_count = comm().sum(markedElem_count);
@@ -2099,7 +2104,9 @@ bool CpGrid::refineAndUpdateGrid(bool throwOnFailure,
20992104
cornerInMarkedElemWithEquivRefinedCorner,
21002105
faceInMarkedElemAndRefinedFaces,
21012106
cells_per_dim_vec,
2102-
cellRefinements);
2107+
cellRefinements,
2108+
boundaryInfoCellRefs,
2109+
withoutFaults);
21032110

21042111
// --- Adapted corners and PreAdapt corners relations ---
21052112
std::map<std::array<int,2>,int> elemLgrAndElemLgrCorner_to_adaptedCorner;
@@ -2119,7 +2126,9 @@ bool CpGrid::refineAndUpdateGrid(bool throwOnFailure,
21192126
vanishedRefinedCorner_to_itsLastAppearance,
21202127
faceInMarkedElemAndRefinedFaces,
21212128
cells_per_dim_vec,
2122-
cellRefinements);
2129+
cellRefinements,
2130+
boundaryInfoCellRefs,
2131+
withoutFaults);
21232132

21242133
// FACES
21252134
// Stablish relationships between PreAdapt faces and refined or adapted ones ---

0 commit comments

Comments
 (0)