Skip to content

Commit f421c30

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 4de5582 commit f421c30

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

opm/grid/CpGrid.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,8 @@ namespace Dune
712712
bool loadBalance(int overlapLayers=1,
713713
int partitionMethod = Dune::PartitionMethod::zoltan,
714714
double imbalanceTol = 1.1,
715-
int level =-1)
715+
int level =-1,
716+
bool addCornerCells = true)
716717
{
717718
using std::get;
718719
return get<0>(scatterGrid(/* edgeWeightMethod = */ defaultTransEdgeWgt,
@@ -721,7 +722,7 @@ namespace Dune
721722
/* possibleFutureConnections = */ {},
722723
/* serialPartitioning = */ false,
723724
/* transmissibilities = */ nullptr,
724-
/* addCornerCells = */ true,
725+
addCornerCells,
725726
overlapLayers,
726727
partitionMethod,
727728
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)