Skip to content
Snippets Groups Projects
Commit 11e3740f authored by Henry's avatar Henry
Browse files

Improved test to avoid /0

parent d7fd117b
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -289,11 +289,15 @@ void Foam::MPPICCloud<CloudType>::info()
forAll(this->mesh().cells(), cellI)
{
const label n = this->cellOccupancy()[cellI].size();
const scalar nPack = n*alphaMax/alpha()[cellI];
if (n > 0 && nPack < nMin)
if (n > 0)
{
nMin = nPack;
const scalar nPack = n*alphaMax/alpha()[cellI];
if (nPack < nMin)
{
nMin = nPack;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment