globalIndexAndTransform: Correction to handle rotation around a non-zero centre

This commit is contained in:
Will Bainbridge
2020-01-27 17:06:39 +00:00
parent 55b982eeea
commit 6e32ca010a

View File

@ -96,8 +96,10 @@ Foam::label Foam::globalIndexAndTransform::matchTransform
{
// Test the inverse transform differences too
const transformer testInvTransform = inv(testTransform);
vectorDiff =
mag(refTransform.t() + testTransform.t())
mag(refTransform.t() - testInvTransform.t())
/(maxVectorMag + vSmall)
/tolerance;
@ -106,7 +108,7 @@ Foam::label Foam::globalIndexAndTransform::matchTransform
if (refTransform.transforms() || testTransform.transforms())
{
tensorDiff =
mag(refTransform.T() - testTransform.T().T())
mag(refTransform.T() - testInvTransform.T())
/sqrt(3.0)
/tolerance;
}