Cyclic merge tolerance fixes

This commit is contained in:
Hrvoje Jasak 2011-07-04 22:46:44 +01:00
parent 3a9ca0ed43
commit 76b74622f9
4 changed files with 14 additions and 27 deletions

View file

@ -60,12 +60,6 @@ const NamedEnum<cyclicPolyPatch::transformType, 3>
}
const Foam::scalar Foam::cyclicPolyPatch::areaMatchTol
(
debug::tolerances("cyclicMatchTol", 1e-4)
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::label Foam::cyclicPolyPatch::findMaxArea
@ -390,7 +384,7 @@ void Foam::cyclicPolyPatch::calcTransforms()
// Check max distance between face centre and
// transformed face centre
if (maxRelDistance > sqrt(areaMatchTol))
if (maxRelDistance > sqrt(polyPatch::matchTol_))
{
SeriousErrorIn
(

View file

@ -208,14 +208,6 @@ public:
TypeName("cyclic");
// Static data
//- Relative tolerance (for geometric matching only).
// Calculated as a factor of maximum edge length per face.
// HJ, 21/Dec/2006
static const scalar areaMatchTol;
// Constructors
//- Construct from components

View file

@ -103,13 +103,6 @@ class polyPatch
protected:
// Protected static data
//- Relative tolerance (for geometric matching). Is factor of
// maximum edge length per face.
static const scalar matchTol_;
// Protected Member Functions
// The polyPatch geometry initialisation is called by polyBoundaryMesh
@ -230,9 +223,17 @@ public:
//- Runtime type information
TypeName("patch");
// Static data
//- Debug switch to disallow the use of genericPolyPatch
static int disallowGenericPolyPatch;
//- Relative tolerance (for geometric matching)
// Calculated as a factor of maximum edge length per face.
// HJ, 21/Dec/2006
static const scalar matchTol_;
// Declare run-time constructor selection tables

View file

@ -59,7 +59,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
if
(
mag(magFa[facei] - magFa[facei + sizeby2])/avFa
> cyclicPolyPatch::areaMatchTol
> polyPatch::matchTol_
)
{
// Found error. Look for largest matching error
@ -81,7 +81,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
}
// Check for error in matching
if (maxMatchError > cyclicPolyPatch::areaMatchTol)
if (maxMatchError > polyPatch::matchTol_)
{
scalar avFa = (magFa[errorFace] + magFa[errorFace + sizeby2])/2.0;
@ -91,7 +91,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
<< 100*mag(magFa[errorFace] - magFa[errorFace + sizeby2])/avFa
<< "% -- possible face ordering problem." << nl
<< "Cyclic area match tolerance = "
<< cyclicPolyPatch::areaMatchTol << " patch: " << name()
<< polyPatch::matchTol_ << " patch: " << name()
<< abort(FatalError);
}
}