mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
FIX: provide default uniform scotch weighting (#3063)
- maintains the same code path within scotch
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user