Skip to content

Commit 4cda2d1

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 6651530 commit 4cda2d1

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

opm/grid/CpGrid.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,10 +1218,10 @@ namespace Dune
12181218
/// \param overlapLayers The number of layers of cells of the overlap region (default: 1).
12191219
/// \param partitionMethod The method used to partition the grid, one of Dune::PartitionMethod
12201220
/// \warning May only be called once.
1221-
bool loadBalance(int overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltan, double imbalanceTol = 1.1)
1221+
bool loadBalance(int overlapLayers=1, int partitionMethod = Dune::PartitionMethod::zoltan, double imbalanceTol = 1.1, bool addCorners = true)
12221222
{
12231223
using std::get;
1224-
return get<0>(scatterGrid(defaultTransEdgeWgt, false, nullptr, {}, false, nullptr, true, overlapLayers, partitionMethod, imbalanceTol));
1224+
return get<0>(scatterGrid(defaultTransEdgeWgt, false, nullptr, {}, false, nullptr, addCorners, overlapLayers, partitionMethod, imbalanceTol));
12251225
}
12261226

12271227
// loadbalance is not part of the grid interface therefore we skip it.

opm/grid/common/GridPartitioning.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ void addOverlapLayer(const CpGrid& grid, int index, const CpGrid::Codim<0>::Enti
391391
{
392392
// Note: multiple adds for same process are possible
393393
exportList.emplace_back(nb_index, owner, AttributeSet::copy);
394-
exportList.emplace_back(index, cell_part[nb_index], AttributeSet::copy);
394+
// not need or check if
395+
//exportList.emplace_back(index, cell_part[nb_index], AttributeSet::copy);
395396
if ( recursion_deps>0 )
396397
{
397398
// 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
225225
// Silence any unused argument warnings that could occur with various configurations.
226226
static_cast<void>(wells);
227227
static_cast<void>(transmissibilities);
228-
static_cast<void>(overlapLayers);
228+
//static_cast<void>(overlapLayers);
229229
static_cast<void>(method);
230230
static_cast<void>(imbalanceTol);
231231

@@ -375,7 +375,7 @@ CpGrid::scatterGrid(EdgeWeightMethod method,
375375

376376
// first create the overlap
377377
auto noImportedOwner = addOverlapLayer(*this, computedCellPart, exportList, importList, cc, addCornerCells,
378-
transmissibilities);
378+
transmissibilities, overlapLayers);
379379
// importList contains all the indices that will be here.
380380
auto compareImport = [](const std::tuple<int,int,char,int>& t1,
381381
const std::tuple<int,int,char,int>&t2)

0 commit comments

Comments
 (0)