FIX: provide default uniform scotch weighting (#3063)

- maintains the same code path within scotch
This commit is contained in:
Mark Olesen
2023-12-20 11:44:55 +01:00
parent 7d9bba67c1
commit 88be9ef5c6
2 changed files with 28 additions and 0 deletions

View File

@ -295,6 +295,25 @@ Foam::label Foam::ptscotchDecomp::decompose
velotab.resize(1, 1);
}
}
else
{
// HACK: specify uniform weights
// - seems that scotch takes different code paths internally
// if weights are not specified (issue #3063)
if (numCells > 0)
{
velotab.resize(numCells);
}
else
{
// Locally zero cells but not globally.
// Provide some size to avoid null pointer.
velotab.resize(1);
}
velotab = static_cast<SCOTCH_Num>(1);
}
//

View File

@ -267,6 +267,15 @@ Foam::label Foam::scotchDecomp::decomposeSerial
}
}
}
else
{
// HACK: specify uniform weights
// - seems that scotch takes different code paths internally
// if weights are not specified (issue #3063)
velotab.resize(numCells);
velotab = static_cast<SCOTCH_Num>(1);
}
//