mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Prevent overflow on integer multiplication
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,7 @@ List<Vb::Point> uniformGrid::initialPoints() const
|
|||||||
scalar pert = randomPerturbationCoeff_*cmptMin(delta);
|
scalar pert = randomPerturbationCoeff_*cmptMin(delta);
|
||||||
|
|
||||||
// Initialise points list
|
// Initialise points list
|
||||||
DynamicList<Vb::Point> initialPoints(ni*nj*nk/10);
|
DynamicList<Vb::Point> initialPoints(scalar(ni)*nj*nk/10);
|
||||||
|
|
||||||
for (label i = 0; i < ni; i++)
|
for (label i = 0; i < ni; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -435,8 +435,10 @@ bool Foam::checkCoupledPoints
|
|||||||
setPtr->insert(cpp.start()+i);
|
setPtr->insert(cpp.start()+i);
|
||||||
}
|
}
|
||||||
nErrorFaces++;
|
nErrorFaces++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
avgMismatch += d;
|
avgMismatch += d;
|
||||||
nCoupledPoints++;
|
nCoupledPoints++;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user