38namespace coordinateRotations
55void Foam::coordinateRotations::axisAngle::checkSpec()
57 if (
mag(angle_) < VSMALL ||
mag(axis_) < SMALL)
73 if (
mag(angle) < VSMALL ||
mag(axis) < SMALL)
112 degrees_(crot.degrees_)
155 dict.get<scalar>(
"angle"),
156 dict.getOrDefault(
"degrees", true)
172 return rotation(axis_, angle_, degrees_);
178 os <<
"rotation axis: " << axis_
179 <<
" angle(" << (degrees_ ?
"deg" :
"rad") <<
"): " << angle_;
189 os.beginBlock(keyword);
191 os.writeEntry(
"type",
type());
192 os.writeEntry(
"axis", axis_);
193 os.writeEntry(
"angle", angle_);
196 os.writeEntry(
"degrees",
"false");
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const SphericalTensor I
User specification of a coordinate rotation.
A coordinateRotation specified by a rotation axis and a rotation angle about that axis.
axisAngle()
Default construct. Axis = Z, angle = 0.
virtual void writeEntry(const word &keyword, Ostream &os) const
Write dictionary entry.
virtual void clear()
Reset specification.
virtual const coordinateRotation & rotation() const
The rotation specification.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
Extracts the components of elements of a field and outputs the result into new fields,...
Quaternion class used to perform rotations in 3D space.
tensor R() const
The rotation tensor corresponding to the quaternion.
A class for handling words, derived from Foam::string.
#define defineTypeName(Type)
Define the typeName.
OBJstream os(runTime.globalPath()/outputName)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
Unit conversion functions.