transformation shortcut

This commit is contained in:
mattijs 2008-11-25 19:48:19 +00:00
parent a3f0b52fd3
commit 05fc4832b2

View File

@ -26,6 +26,7 @@ License
#include "transformField.H"
#include "FieldM.H"
#include "diagTensor.H"
// * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * //
@ -75,7 +76,8 @@ void Foam::transform
{
vector T = tr.t();
if (mag(tr.r().w()) > SMALL)
// Check if any rotation
if (mag(tr.r().R() - I) > SMALL)
{
transform(rtf, tr.r(), tf);
@ -90,6 +92,10 @@ void Foam::transform
{
TFOR_ALL_F_OP_S_OP_F(vector, rtf, =, vector, T, +, vector, tf);
}
else
{
rtf = vector::zero;
}
}
}