Skip to content

Commit 70ac419

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 769359e commit 70ac419

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
@@ -1244,7 +1244,8 @@ namespace Dune
12441244
bool loadBalance(int overlapLayers=1,
12451245
int partitionMethod = Dune::PartitionMethod::zoltan,
12461246
double imbalanceTol = 1.1,
1247-
int level =-1)
1247+
int level =-1,
1248+
bool addCornerCells = true)
12481249
{
12491250
using std::get;
12501251
return get<0>(scatterGrid(/* edgeWeightMethod = */ defaultTransEdgeWgt,
@@ -1253,7 +1254,7 @@ namespace Dune
12531254
/* possibleFutureConnections = */ {},
12541255
/* serialPartitioning = */ false,
12551256
/* transmissibilities = */ nullptr,
1256-
/* addCornerCells = */ true,
1257+
addCornerCells,
12571258
overlapLayers,
12581259
partitionMethod,
12591260
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)