Skip to content
Snippets Groups Projects
Commit 05fc4832 authored by mattijs's avatar mattijs
Browse files

transformation shortcut

parent a3f0b52f
No related merge requests found
...@@ -26,6 +26,7 @@ License ...@@ -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 ...@@ -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 ...@@ -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;
}
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment