57 inline bool ignoreOutputCoordType(
const std::string& modelType)
62 || modelType == Foam::coordSystem::cartesian::typeName
63 || modelType == Foam::coordinateSystem::typeName
84 && (
dict.dictName() == coordinateSystem::typeName)
96 const auto finder =
dict.csearchCompat
98 "rotation", {{
"coordinateRotation", 1806}},
113 const word rotationType(finder->get<
word>());
141 spec_(new coordinateRotations::
identity()),
163 spec_(csys.spec_.clone()),
164 origin_(csys.origin_),
173 spec_(
std::move(csys.spec_)),
174 origin_(
std::move(csys.origin_)),
175 rot_(
std::move(csys.rot_)),
176 name_(
std::move(csys.name_)),
177 note_(
std::move(csys.note_))
205 spec_(csys.spec_.clone()),
206 origin_(csys.origin_),
257 spec_(new coordinateRotations::axes(axis, dirn)),
322 return rotationsImpl(global);
331 return rotationsImpl(global);
337 const point& localCart
415 spec_.reset(std::move(crot));
435 if (!ignoreOutputCoordType(
type()))
440 os <<
"origin: " << origin_ <<
' ';
447 writeEntry(coordinateSystem::typeName,
os);
458 const bool subDict = !keyword.empty();
465 if (!ignoreOutputCoordType(
type()))
499 rotation(csys.
spec_.clone());
511 name_ = std::move(csys.
name_);
512 note_ = std::move(csys.
note_);
513 spec_ = std::move(csys.
spec_);
virtual vector globalToLocal(const vector &global, bool translate) const
From global Cartesian system to the local coordinate system with optional translation for the origin...
Base class for coordinate system specification, the default coordinate system type is cartesian ...
User specification of a coordinate rotation.
word name_
The name of the coordinate system (optional)
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
virtual Ostream & write(const char c) override
Write character.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
virtual vector localToGlobal(const vector &local, bool translate) const
From local coordinate system to the global Cartesian system with optional translation for the origin...
const word dictName("faMeshDefinition")
point origin_
The coordinate system origin.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Macros for easy insertion into run-time selection tables.
virtual void clear()
Reset origin and rotation to an identity coordinateSystem.
coordinateSystem()
Default construct. This is an identity coordinate system.
An identity coordinateRotation.
virtual const point & origin() const
Return origin.
virtual const tensor & R() const
Return const reference to the rotation tensor.
point transformPoint(const point &localCart) const
Transform point and add origin offset.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
string note_
An optional note describing the coordinate system.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
static const Identity< scalar > I
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from Foam::string.
virtual Ostream & endBlock()
Write end block group.
point invTransformPoint(const point &global) const
Remove origin offset and inverse transform point.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
virtual const coordinateRotation & rotation() const
The rotation specification.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
static readOption lazierRead(readOption opt) noexcept
Downgrade readOption optional (LAZY_READ), leaves NO_READ intact.
void assign(const dictionary &dict, IOobjectOption::readOption readOrigin=IOobjectOption::MUST_READ)
Assign from dictionary content with specified read handling of the 'origin' entry.
tensor rot_
The rotation tensor.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
static const SphericalTensor I
static coordinateSystem dummy_
Dummy coordinate system for suppressed manipulation.
#define R(A, B, C, D, E, F, K, M)
A coordinateRotation specified using global axes.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
virtual void writeEntry(Ostream &os) const
Write 'coordinateSystem' dictionary entry.
virtual void write(Ostream &os) const
Write.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
virtual tensor R() const =0
Calculate and return the rotation tensor.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
bool operator!=(const eddy &a, const eddy &b)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void operator=(const coordinateSystem &csys)
Copy assignment.
A class for managing temporary objects.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
Tensor of scalars, i.e. Tensor<scalar>.
autoPtr< coordinateRotation > spec_
User specification of the coordinate rotation.
static autoPtr< coordinateRotation > New(const word &modelType, const dictionary &dict)
Select construct the specified coordinate rotation type.
static constexpr const zero Zero
Global zero (0)
readOption
Enumeration defining read preferences.