Commit 94bec509 authored by mattijs's avatar mattijs
Browse files

acos bounds

parent c350f695
......@@ -68,7 +68,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
scalar magS = mag(s);
scalar cosDDotS =
Foam::acos((d & s)/(mag(d)*magS + VSMALL))
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
*180.0/mathematicalConstant::pi;
result[own[faceI]] = max(cosDDotS, result[own[faceI]]);
......@@ -94,7 +94,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
scalar magS = mag(s);
scalar cosDDotS =
Foam::acos((d & s)/(mag(d)*magS + VSMALL))
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
*180.0/mathematicalConstant::pi;
result[faceCells[faceI]] = max(cosDDotS, result[faceCells[faceI]]);
......@@ -209,7 +209,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
scalar magS = mag(s);
scalar cosDDotS =
Foam::acos((d & s)/(mag(d)*magS + VSMALL))
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
*180.0/mathematicalConstant::pi;
result[faceI] = cosDDotS;
......@@ -235,7 +235,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
scalar magS = mag(s);
scalar cosDDotS =
Foam::acos((d & s)/(mag(d)*magS + VSMALL))
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
*180.0/mathematicalConstant::pi;
result[globalFaceI++] = cosDDotS;
......
Supports Markdown
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