6 dictArgList(transformationString, simpleTransformations, transformations);
10 if (transformations[i].first() ==
"translate")
12 const vector v(IStringStream(transformations[i].second())());
15 else if (transformations[i].first() ==
"rotate")
17 Pair<vector> n1n2(IStringStream(transformations[i].second())());
19 n1n2[0] /=
mag(n1n2[0]);
20 n1n2[1] /=
mag(n1n2[1]);
26 else if (transformations[i].first() ==
"Rx")
30 readScalar(IStringStream(transformations[i].second())())
34 else if (transformations[i].first() ==
"Ry")
38 readScalar(IStringStream(transformations[i].second())())
42 else if (transformations[i].first() ==
"Rz")
46 readScalar(IStringStream(transformations[i].second())())
50 else if (transformations[i].first() ==
"Ra")
52 IStringStream istr(transformations[i].second());
57 else if (transformations[i].first() ==
"scale")
59 const vector v(IStringStream(transformations[i].second())());
61 transformer::scaling(
diagTensor(v.x(), v.y(), v.z()))
68 <<
"Unknown transformation " << transformations[i].first()
DiagTensor< scalar > diagTensor
A scalar version of the templated DiagTensor.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Vector< scalar > vector
A scalar version of the templated Vector.
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from unit vector n1 to n2.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
tensor Ry(const scalar &omega)
Rotational transformation tensor about the y-axis by omega radians.
tensor Rz(const scalar &omega)
Rotational transformation tensor about the z-axis by omega radians.
dimensioned< scalar > mag(const dimensioned< Type > &)
tensor Ra(const vector &a, const scalar omega)
Rotational transformation tensor about axis a by omega radians.
List< wordRe > wordReList
A List of wordRe (word or regular expression)
Foam::argList args(argc, argv)
void printUsage() const
Print usage.
tensor Rx(const scalar &omega)
Rotational transformation tensor about the x-axis by omega radians.