Cyclic merge tolerance fixes
This commit is contained in:
parent
3a9ca0ed43
commit
76b74622f9
4 changed files with 14 additions and 27 deletions
|
@ -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
|
Foam::label Foam::cyclicPolyPatch::findMaxArea
|
||||||
|
@ -390,7 +384,7 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
||||||
|
|
||||||
// Check max distance between face centre and
|
// Check max distance between face centre and
|
||||||
// transformed face centre
|
// transformed face centre
|
||||||
if (maxRelDistance > sqrt(areaMatchTol))
|
if (maxRelDistance > sqrt(polyPatch::matchTol_))
|
||||||
{
|
{
|
||||||
SeriousErrorIn
|
SeriousErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -208,14 +208,6 @@ public:
|
||||||
TypeName("cyclic");
|
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
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
|
|
|
@ -103,13 +103,6 @@ class polyPatch
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected static data
|
|
||||||
|
|
||||||
//- Relative tolerance (for geometric matching). Is factor of
|
|
||||||
// maximum edge length per face.
|
|
||||||
static const scalar matchTol_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
// The polyPatch geometry initialisation is called by polyBoundaryMesh
|
// The polyPatch geometry initialisation is called by polyBoundaryMesh
|
||||||
|
@ -230,9 +223,17 @@ public:
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("patch");
|
TypeName("patch");
|
||||||
|
|
||||||
|
// Static data
|
||||||
|
|
||||||
//- Debug switch to disallow the use of genericPolyPatch
|
//- Debug switch to disallow the use of genericPolyPatch
|
||||||
static int disallowGenericPolyPatch;
|
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
|
// Declare run-time constructor selection tables
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
mag(magFa[facei] - magFa[facei + sizeby2])/avFa
|
mag(magFa[facei] - magFa[facei + sizeby2])/avFa
|
||||||
> cyclicPolyPatch::areaMatchTol
|
> polyPatch::matchTol_
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Found error. Look for largest matching error
|
// Found error. Look for largest matching error
|
||||||
|
@ -81,7 +81,7 @@ void cyclicFvPatch::makeWeights(scalarField& w) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for error in matching
|
// Check for error in matching
|
||||||
if (maxMatchError > cyclicPolyPatch::areaMatchTol)
|
if (maxMatchError > polyPatch::matchTol_)
|
||||||
{
|
{
|
||||||
scalar avFa = (magFa[errorFace] + magFa[errorFace + sizeby2])/2.0;
|
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
|
<< 100*mag(magFa[errorFace] - magFa[errorFace + sizeby2])/avFa
|
||||||
<< "% -- possible face ordering problem." << nl
|
<< "% -- possible face ordering problem." << nl
|
||||||
<< "Cyclic area match tolerance = "
|
<< "Cyclic area match tolerance = "
|
||||||
<< cyclicPolyPatch::areaMatchTol << " patch: " << name()
|
<< polyPatch::matchTol_ << " patch: " << name()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue