ENH: motionSmoother: allow certain tolerance when comparing coupled data

This commit is contained in:
mattijs
2010-05-12 15:53:36 +01:00
parent 322ccff48f
commit 9331bd89fa
3 changed files with 8 additions and 3 deletions

View File

@ -774,7 +774,8 @@ Foam::tmp<Foam::scalarField> Foam::motionSmoother::movePoints
newPoints,
minEqOp<point>(), // combine op
vector(GREAT,GREAT,GREAT), // null
true // separation
true, // separation
1E-6*mesh_.bounds().mag()
);
}
@ -925,7 +926,8 @@ bool Foam::motionSmoother::scaleMesh
totalDisplacement,
maxMagEqOp(),
vector::zero, // null value
false // separation
false, // separation
1E-6*mesh_.bounds().mag()
);
}

View File

@ -208,7 +208,8 @@ class motionSmoother
const Field<Type>&,
const CombineOp& cop,
const Type& zero,
const bool separation
const bool separation,
const scalar maxMag
) const;
//- Assemble tensors for multi-patch constraints

View File

@ -293,6 +293,7 @@ void Foam::motionSmoother::testSyncField
const CombineOp& cop,
const Type& zero,
const bool separation
const scalar maxMag
) const
{
if (debug)
@ -315,6 +316,7 @@ void Foam::motionSmoother::testSyncField
forAll(syncedFld, i)
{
if (syncedFld[i] != fld[i])
if (mag(syncedFld[i] - fld[i]) > maxMag)
{
FatalErrorIn
(