Commit 9afbd680 authored by mattijs's avatar mattijs
Browse files

ENH: cyclicPolyPatch : disable warning about faces not perpendicular to rotation axis

parent dac9c7c4
...@@ -194,8 +194,9 @@ void Foam::cyclicPolyPatch::calcTransforms ...@@ -194,8 +194,9 @@ void Foam::cyclicPolyPatch::calcTransforms
vectorField half0Normals(half0Areas.size()); vectorField half0Normals(half0Areas.size());
vectorField half1Normals(half1Areas.size()); vectorField half1Normals(half1Areas.size());
scalar maxCos = -GREAT; //- Additional warning about faces non-aligned with rotation axis
label maxFacei = -1; //scalar maxCos = -GREAT;
//label maxFacei = -1;
forAll(half0, facei) forAll(half0, facei)
{ {
...@@ -237,32 +238,31 @@ void Foam::cyclicPolyPatch::calcTransforms ...@@ -237,32 +238,31 @@ void Foam::cyclicPolyPatch::calcTransforms
half0Normals[facei] = half0Areas[facei] / magSf; half0Normals[facei] = half0Areas[facei] / magSf;
half1Normals[facei] = half1Areas[facei] / nbrMagSf; half1Normals[facei] = half1Areas[facei] / nbrMagSf;
if (transform_ == ROTATIONAL) //if (transform_ == ROTATIONAL)
{ //{
scalar cos = mag(half0Normals[facei] & rotationAxis_); // scalar cos = mag(half0Normals[facei] & rotationAxis_);
if (cos > maxCos) // if (cos > maxCos)
{ // {
maxCos = cos; // maxCos = cos;
maxFacei = facei; // maxFacei = facei;
} // }
} //}
} }
} }
if (maxCos > sqrt(SMALL)) //if (maxCos > sqrt(SMALL))
{ //{
WarningIn // WarningIn
( // (
"cyclicPolyPatch::calcTransforms()" // "cyclicPolyPatch::calcTransforms()"
) << "on patch " << name() // ) << "on patch " << name()
<< " face:" << maxFacei << " fc:" << half0Ctrs[maxFacei] // << " face:" << maxFacei << " fc:" << half0Ctrs[maxFacei]
<< " is not perpendicular to the rotationAxis." << endl // << " is not perpendicular to the rotationAxis." << endl
<< "This might cause conservation problems" // << "This will cause problems with topology changes." << endl
<< " or problems with geometry or topology changes." << endl // << "rotation axis : " << rotationAxis_ << endl
<< "rotation axis : " << rotationAxis_ << endl // << "face normal : " << half0Normals[maxFacei] << endl
<< "face normal : " << half0Normals[maxFacei] << endl // << "cosine of angle : " << maxCos << endl;
<< "cosine of angle : " << maxCos << endl; //}
}
// Calculate transformation tensors // Calculate transformation tensors
calcTransformTensors calcTransformTensors
......
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