mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: additional protection against zero-sized graph offset lists
- for metis-like graphs there is no guarantee that a zero-sized graph
has an offsets list with size 1 or size 0, so always use
numCells = max(0, xadj.size()-1)
this was already done in most places, but missed in the
decomposeGeneral method
STYLE: use sumOp<label>() instead of plusOp<label>()
This commit is contained in:
committed by
Andrew Heather
parent
e11fde900c
commit
0867816490
@ -208,8 +208,8 @@ bool setField
|
||||
|
||||
doCorrectBoundaryConditions(ctrl.correctBCs, output);
|
||||
|
||||
const label numTotal = returnReduce(output.size(), plusOp<label>());
|
||||
reduce(numValuesChanged, plusOp<label>());
|
||||
const label numTotal = returnReduce(output.size(), sumOp<label>());
|
||||
reduce(numValuesChanged, sumOp<label>());
|
||||
|
||||
if (numValuesChanged == numTotal)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user