112#ifndef Foam_coordinateSystem_H
113#define Foam_coordinateSystem_H
132class coordinateSystem;
178 template<
class Po
intField>
182 template<
class Po
intField>
186 template<
class Po
intField>
190 template<
class RetType,
class Type,
class BinaryOp>
199 template<
class RetType,
class Po
intField,
class Type,
class BinaryOp>
208 template<
class RetType,
class Po
intField,
class Type,
class BinaryOp>
446 virtual bool valid()
const
479 virtual const string&
note()
const
485 virtual const tensor&
R()
const
518 virtual string&
note()
531 virtual void clear();
660#undef defineCoordinateSystemTransform
661#define defineCoordinateSystemTransform(Op, RetType, Type) \
664 virtual RetType Op(const Type& input) const; \
667 virtual tmp<Field<RetType>> Op(const UList<Type>& input) const; \
670 virtual RetType Op(const point& global, const Type& input) const; \
673 virtual tmp<Field<RetType>> Op \
675 const UList<point>& global, \
680 virtual tmp<Field<RetType>> Op \
682 const pointUIndList& global, \
687 virtual tmp<Field<RetType>> Op \
689 const UList<point>& global, \
690 const UList<Type>& input \
694 virtual tmp<Field<RetType>> Op \
696 const pointUIndList& global, \
697 const UList<Type>& input \
725 #undef defineCoordinateSystemTransform
734bool operator!=(
const coordinateSystem& a,
const coordinateSystem&
b);
737Ostream&
operator<<(Ostream&
os,
const coordinateSystem& csys);
#define R(A, B, C, D, E, F, K, M)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A List with indirect addressing. Like IndirectList but does not store addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A coordinate system forward to a global coordinate system that is normally provided by the constant/c...
User specification of a coordinate rotation.
Base class for coordinate system specification, the default coordinate system type is cartesian .
virtual const word & name() const
Return the name.
vector globalVector(const vector &local) const
From local to global (cartesian) vector components.
virtual bool uniform() const
True if the rotation tensor is uniform for all locations.
static autoPtr< coordinateSystem > New(word modelType, const objectRegistry &obr, const dictionary &dict)
virtual const coordinateRotation & rotation() const
The rotation specification.
tmp< pointField > globalPosition(const pointField &local) const
From local coordinate position to global (cartesian) position.
virtual const vector e2() const
The local Cartesian y-axis in global coordinates.
tmp< tensorField > rotationsImpl(const PointField &global) const
Implementation for R() methods.
string note_
An optional note describing the coordinate system.
void operator=(const coordinateSystem &csys)
Copy assignment.
virtual string & note()
Edit access to optional note.
virtual bool valid() const
Consider valid if it has a specification.
tmp< pointField > invTransformPointImpl(const PointField &global) const
Implementation for transformPosition() methods.
virtual vector globalToLocal(const vector &global, bool translate) const
point globalPosition(const point &local) const
From local coordinate position to global (cartesian) position.
point invTransformPoint(const point &global) const
Remove origin offset and inverse transform point.
virtual vector localToGlobal(const vector &local, bool translate) const
word name_
The name of the coordinate system (optional)
point localPosition(const point &global) const
From global (cartesian) position to local coordinate position.
declareRunTimeSelectionTable(autoPtr, coordinateSystem, dictionary,(const dictionary &dict),(dict))
virtual scalar invTransform(const scalar &input) const
With constant rotation tensor.
tmp< Field< RetType > > oneToOneImpl(const PointField &global, const UList< Type > &input, const BinaryOp &bop) const
Use position-dependent transform tensors for multiple inputs.
static coordinateSystem dummy_
Dummy coordinate system for suppressed manipulation.
tensor rot_
The rotation tensor.
virtual scalar transform(const scalar &input) const
With constant rotation tensor.
virtual const point & origin() const
Return origin.
virtual ~coordinateSystem()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, coordinateSystem, registry,(const objectRegistry &obr, const dictionary &dict),(obr, dict))
void assign(const dictionary &dict)
Assign from dictionary content.
static tmp< Field< RetType > > manyTimesImpl(const tensor &tt, const UList< Type > &input, const BinaryOp &bop)
Apply single transform tensor for multiple inputs.
TypeName("coordinateSystem")
Runtime type information.
autoPtr< coordinateRotation > spec_
User specification of the coordinate rotation.
virtual const string & note() const
Return the optional note.
tmp< vectorField > globalVector(const vectorField &local) const
From local to global (cartesian) vector components.
vector localVector(const vector &global) const
From global (cartesian) to local vector components.
tmp< Field< RetType > > oneToManyImpl(const PointField &global, const Type &input, const BinaryOp &bop) const
Use position-dependent transform tensors for single input.
virtual const tensor & R() const
Return const reference to the rotation tensor.
virtual point & origin()
Edit access to origin.
coordinateSystem()
Default construct. This is an identity coordinate system.
virtual void writeEntry(Ostream &os) const
Write 'coordinateSystem' dictionary entry.
virtual symmTensor transformPrincipal(const vector &input) const
With constant rotation tensor.
virtual void rename(const word &newName)
Rename.
virtual const vector e1() const
The local Cartesian x-axis in global coordinates.
tmp< vectorField > localVector(const vectorField &global) const
From global (cartesian) to local vector components.
virtual const vector e3() const
The local Cartesian z-axis in global coordinates.
tmp< pointField > localPosition(const pointField &global) const
From global (cartesian) position to local coordinate position.
virtual void clear()
Reset origin and rotation to an identity coordinateSystem.
virtual autoPtr< coordinateSystem > clone() const
Return clone.
point transformPoint(const point &localCart) const
Transform point and add origin offset.
point origin_
The coordinate system origin.
tmp< pointField > transformPointImpl(const PointField &localCart) const
Implementation for transformPoint() methods.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Registry of regIOobjects.
Tensor of scalars, i.e. Tensor<scalar>.
A class for managing temporary objects.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
#define defineCoordinateSystemTransform(Op, RetType, Type)
OBJstream os(runTime.globalPath()/outputName)
const word dictName("faMeshDefinition")
bool operator!=(const eddy &a, const eddy &b)
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
static Istream & input(Istream &is, IntRange< T > &range)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
Helper for construction of coordinateSystem PtrList.
autoPtr< coordinateSystem > operator()(Istream &is) const
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.