decompositionMethods::scaleWeights: Filter out zero weights

The nWeights argument is now reduced if any of the weights are zero for all
points on all processors and removed.
This commit is contained in:
Henry Weller
2024-06-01 17:27:27 +01:00
parent 544afc98aa
commit 78dbbdd7d3
7 changed files with 126 additions and 46 deletions

View File

@ -236,10 +236,11 @@ public:
//- Convert the given scalar weights to labels
// in the range 0-labelMax/2
// Removes 0 weights and updates nWeights accordingly
static labelList scaleWeights
(
const scalarField& weights,
const label nWeights,
label& nWeights,
const bool distributed = true
);