globalIndexAndTransform: Correction to handle rotation around a non-zero centre
This commit is contained in:
@ -96,8 +96,10 @@ Foam::label Foam::globalIndexAndTransform::matchTransform
|
|||||||
{
|
{
|
||||||
// Test the inverse transform differences too
|
// Test the inverse transform differences too
|
||||||
|
|
||||||
|
const transformer testInvTransform = inv(testTransform);
|
||||||
|
|
||||||
vectorDiff =
|
vectorDiff =
|
||||||
mag(refTransform.t() + testTransform.t())
|
mag(refTransform.t() - testInvTransform.t())
|
||||||
/(maxVectorMag + vSmall)
|
/(maxVectorMag + vSmall)
|
||||||
/tolerance;
|
/tolerance;
|
||||||
|
|
||||||
@ -106,7 +108,7 @@ Foam::label Foam::globalIndexAndTransform::matchTransform
|
|||||||
if (refTransform.transforms() || testTransform.transforms())
|
if (refTransform.transforms() || testTransform.transforms())
|
||||||
{
|
{
|
||||||
tensorDiff =
|
tensorDiff =
|
||||||
mag(refTransform.T() - testTransform.T().T())
|
mag(refTransform.T() - testInvTransform.T())
|
||||||
/sqrt(3.0)
|
/sqrt(3.0)
|
||||||
/tolerance;
|
/tolerance;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user