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
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,7 +92,7 @@ List<Vb::Point> uniformGrid::initialPoints() const
|
||||
scalar pert = randomPerturbationCoeff_*cmptMin(delta);
|
||||
|
||||
// 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++)
|
||||
{
|
||||
|
||||
@ -435,8 +435,10 @@ bool Foam::checkCoupledPoints
|
||||
setPtr->insert(cpp.start()+i);
|
||||
}
|
||||
nErrorFaces++;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
avgMismatch += d;
|
||||
nCoupledPoints++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user