transformation shortcut
This commit is contained in:
parent
a3f0b52fd3
commit
05fc4832b2
@ -26,6 +26,7 @@ License
|
|||||||
|
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
#include "FieldM.H"
|
#include "FieldM.H"
|
||||||
|
#include "diagTensor.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * global functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -75,7 +76,8 @@ void Foam::transform
|
|||||||
{
|
{
|
||||||
vector T = tr.t();
|
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);
|
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);
|
TFOR_ALL_F_OP_S_OP_F(vector, rtf, =, vector, T, +, vector, tf);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rtf = vector::zero;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user