Skip to content

Commit 2d439d1

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 209f568 commit 2d439d1

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
@@ -711,7 +711,8 @@ namespace Dune
711711
bool loadBalance(int overlapLayers=1,
712712
int partitionMethod = Dune::PartitionMethod::zoltan,
713713
double imbalanceTol = 1.1,
714-
int level =-1)
714+
int level =-1,
715+
bool addCornerCells = true)
715716
{
716717
using std::get;
717718
return get<0>(scatterGrid(/* edgeWeightMethod = */ defaultTransEdgeWgt,
@@ -720,7 +721,7 @@ namespace Dune
720721
/* possibleFutureConnections = */ {},
721722
/* serialPartitioning = */ false,
722723
/* transmissibilities = */ nullptr,
723-
/* addCornerCells = */ true,
724+
addCornerCells,
724725
overlapLayers,
725726
partitionMethod,
726727
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
@@ -223,7 +223,6 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
223223
// Silence any unused argument warnings that could occur with various configurations.
224224
static_cast<void>(wells);
225225
static_cast<void>(transmissibilities);
226-
static_cast<void>(overlapLayers);
227226
static_cast<void>(method);
228227
static_cast<void>(imbalanceTol);
229228
static_cast<void>(level);
@@ -398,7 +397,7 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
398397
cc,
399398
addCornerCells,
400399
transmissibilities,
401-
1 /*layers*/,
400+
overlapLayers,
402401
level);
403402
// importList contains all the indices that will be here.
404403
auto compareImport = [](const std::tuple<int,int,char,int>& t1,

0 commit comments

Comments
 (0)