mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: motionSmoother: allow certain tolerance when comparing coupled data
This commit is contained in:
@ -774,7 +774,8 @@ Foam::tmp<Foam::scalarField> Foam::motionSmoother::movePoints
|
|||||||
newPoints,
|
newPoints,
|
||||||
minEqOp<point>(), // combine op
|
minEqOp<point>(), // combine op
|
||||||
vector(GREAT,GREAT,GREAT), // null
|
vector(GREAT,GREAT,GREAT), // null
|
||||||
true // separation
|
true, // separation
|
||||||
|
1E-6*mesh_.bounds().mag()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -925,7 +926,8 @@ bool Foam::motionSmoother::scaleMesh
|
|||||||
totalDisplacement,
|
totalDisplacement,
|
||||||
maxMagEqOp(),
|
maxMagEqOp(),
|
||||||
vector::zero, // null value
|
vector::zero, // null value
|
||||||
false // separation
|
false, // separation
|
||||||
|
1E-6*mesh_.bounds().mag()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,8 @@ class motionSmoother
|
|||||||
const Field<Type>&,
|
const Field<Type>&,
|
||||||
const CombineOp& cop,
|
const CombineOp& cop,
|
||||||
const Type& zero,
|
const Type& zero,
|
||||||
const bool separation
|
const bool separation,
|
||||||
|
const scalar maxMag
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Assemble tensors for multi-patch constraints
|
//- Assemble tensors for multi-patch constraints
|
||||||
|
|||||||
@ -293,6 +293,7 @@ void Foam::motionSmoother::testSyncField
|
|||||||
const CombineOp& cop,
|
const CombineOp& cop,
|
||||||
const Type& zero,
|
const Type& zero,
|
||||||
const bool separation
|
const bool separation
|
||||||
|
const scalar maxMag
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -315,6 +316,7 @@ void Foam::motionSmoother::testSyncField
|
|||||||
forAll(syncedFld, i)
|
forAll(syncedFld, i)
|
||||||
{
|
{
|
||||||
if (syncedFld[i] != fld[i])
|
if (syncedFld[i] != fld[i])
|
||||||
|
if (mag(syncedFld[i] - fld[i]) > maxMag)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user