Skip to content
Snippets Groups Projects
Commit 62524b14 authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: protected division - fixes #3084

parent a46b310f
No related merge requests found
......@@ -123,13 +123,13 @@ bool Foam::polyMesh::checkFaceOrthogonality
reduce(severeNonOrth, sumOp<label>());
reduce(errorNonOrth, sumOp<label>());
const scalar maxNonOrth = radToDeg(::acos(clamp(minDDotS, -1, 1)));
const scalar aveNonOrth = radToDeg(::acos(clamp(sumDDotS/nSummed, -1, 1)));
dictionary& meshDict = const_cast<dictionary&>(data().meshDict());
if (nSummed > 0)
{
scalar maxNonOrth = radToDeg(::acos(clamp(minDDotS, -1, 1)));
scalar aveNonOrth = radToDeg(::acos(clamp(sumDDotS/nSummed, -1, 1)));
meshDict.set("maxNonOrth", maxNonOrth);
meshDict.set("aveNonOrth", aveNonOrth);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment