functionObjects/forces: correct upper-limit for bins
This commit is contained in:
parent
3f322e8b90
commit
10cbc85bb5
1 changed files with 1 additions and 1 deletions
|
|
@ -375,7 +375,7 @@ void Foam::forces::applyBins
|
|||
|
||||
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_[1][bini] += fT[i];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue