mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects/forces: correct upper-limit for bins
This commit is contained in:
@ -375,7 +375,7 @@ void Foam::forces::applyBins
|
|||||||
|
|
||||||
forAll(dd, i)
|
forAll(dd, i)
|
||||||
{
|
{
|
||||||
label bini = min(max(floor(dd[i]/binDx_), 0), force_[0].size());
|
label bini = min(max(floor(dd[i]/binDx_), 0), force_[0].size() - 1);
|
||||||
|
|
||||||
force_[0][bini] += fN[i];
|
force_[0][bini] += fN[i];
|
||||||
force_[1][bini] += fT[i];
|
force_[1][bini] += fT[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user