Skip to content

Commit b766be5

Browse files
hnilbska
authored andcommitted
Changes for more resonable partitioning:
- option to not remove anything from partitioning graph - added possibility for setting overlap - changed export list: need testing in particular in parallel (if it is intended to work there)
1 parent 47db457 commit b766be5

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

opm/grid/CpGrid.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,8 @@ namespace Dune
12751275
bool loadBalance(int overlapLayers=1,
12761276
int partitionMethod = Dune::PartitionMethod::zoltan,
12771277
double imbalanceTol = 1.1,
1278-
int level =-1)
1278+
int level =-1,
1279+
bool addCornerCells = true)
12791280
{
12801281
using std::get;
12811282
return get<0>(scatterGrid(/* edgeWeightMethod = */ defaultTransEdgeWgt,
@@ -1284,7 +1285,7 @@ namespace Dune
12841285
/* possibleFutureConnections = */ {},
12851286
/* serialPartitioning = */ false,
12861287
/* transmissibilities = */ nullptr,
1287-
/* addCornerCells = */ true,
1288+
addCornerCells,
12881289
overlapLayers,
12891290
partitionMethod,
12901291
imbalanceTol,

opm/grid/common/GridPartitioning.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ void addOverlapLayerNoZeroTrans(const CpGrid& grid,
508508
{
509509
// Note: multiple adds for same process are possible
510510
exportList.emplace_back(nb_index, owner, AttributeSet::copy);
511-
exportList.emplace_back(index, cell_part[nb_index], AttributeSet::copy);
511+
// not need or check if
512+
//exportList.emplace_back(index, cell_part[nb_index], AttributeSet::copy);
512513
if ( recursion_deps>0 )
513514
{
514515
// Add another layer

opm/grid/common/ZoltanPartition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ void setDefaultZoltanParameters(Zoltan_Struct* zz) {
286286
Zoltan_Set_Param(zz, "CHECK_GRAPH", "2");
287287
Zoltan_Set_Param(zz,"EDGE_WEIGHT_DIM","0");
288288
Zoltan_Set_Param(zz, "OBJ_WEIGHT_DIM", "0");
289-
Zoltan_Set_Param(zz, "PHG_EDGE_SIZE_THRESHOLD", ".35"); /* 0-remove all, 1-remove none */
289+
Zoltan_Set_Param(zz, "PHG_EDGE_SIZE_THRESHOLD", "1"); /* 0-remove all, 1-remove none */
290290
}
291291

292292

opm/grid/cpgrid/CpGrid.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
226226
// Silence any unused argument warnings that could occur with various configurations.
227227
static_cast<void>(wells);
228228
static_cast<void>(transmissibilities);
229-
static_cast<void>(overlapLayers);
230229
static_cast<void>(method);
231230
static_cast<void>(imbalanceTol);
232231
static_cast<void>(level);
@@ -401,7 +400,7 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
401400
cc,
402401
addCornerCells,
403402
transmissibilities,
404-
1 /*layers*/,
403+
overlapLayers,
405404
level);
406405
// importList contains all the indices that will be here.
407406
auto compareImport = [](const std::tuple<int,int,char,int>& t1,

0 commit comments

Comments
 (0)