Skip to content

Commit 5d6fa6f

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 d5b3c7e commit 5d6fa6f

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
@@ -705,7 +705,8 @@ namespace Dune
705705
bool loadBalance(int overlapLayers=1,
706706
int partitionMethod = Dune::PartitionMethod::zoltan,
707707
double imbalanceTol = 1.1,
708-
int level =-1)
708+
int level =-1,
709+
bool addCornerCells = true)
709710
{
710711
using std::get;
711712
return get<0>(scatterGrid(/* edgeWeightMethod = */ defaultTransEdgeWgt,
@@ -714,7 +715,7 @@ namespace Dune
714715
/* possibleFutureConnections = */ {},
715716
/* serialPartitioning = */ false,
716717
/* transmissibilities = */ nullptr,
717-
/* addCornerCells = */ true,
718+
addCornerCells,
718719
overlapLayers,
719720
partitionMethod,
720721
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
@@ -227,7 +227,6 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
227227
// Silence any unused argument warnings that could occur with various configurations.
228228
static_cast<void>(wells);
229229
static_cast<void>(transmissibilities);
230-
static_cast<void>(overlapLayers);
231230
static_cast<void>(method);
232231
static_cast<void>(imbalanceTol);
233232
static_cast<void>(level);
@@ -402,7 +401,7 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
402401
cc,
403402
addCornerCells,
404403
transmissibilities,
405-
1 /*layers*/,
404+
overlapLayers,
406405
level);
407406
// importList contains all the indices that will be here.
408407
auto compareImport = [](const std::tuple<int,int,char,int>& t1,

0 commit comments

Comments
 (0)