113 #ifndef Foam_coordinateSystem_H 114 #define Foam_coordinateSystem_H 133 class coordinateSystem;
134 class objectRegistry;
136 namespace coordSystem
160 const word& modelType,
232 template<
class Po
intField>
236 template<
class Po
intField>
240 template<
class Po
intField>
244 template<
class RetType,
class Type,
class BinaryOp>
253 template<
class RetType,
class Po
intField,
class Type,
class BinaryOp>
262 template<
class RetType,
class Po
intField,
class Type,
class BinaryOp>
330 return coordinateSystem::New(is);
366 const coordinateRotation& crot
452 (obr,
dict, readOrigin)
464 const word& modelType,
475 const word& modelType,
562 virtual bool valid()
const 583 virtual const coordinateRotation&
rotation()
const 589 virtual const word&
name()
const 595 virtual const string&
note()
const 601 virtual const tensor&
R()
const 628 virtual void rename(
const word& newName)
634 virtual string&
note()
647 virtual void clear();
650 virtual void rotation(autoPtr<coordinateRotation>&& crot);
656 virtual void write(Ostream&
os)
const;
662 virtual void writeEntry(
const word& keyword, Ostream&
os)
const;
776 #undef defineCoordinateSystemTransform 777 #define defineCoordinateSystemTransform(Op, RetType, Type) \ 780 virtual RetType Op(const Type& input) const; \ 783 virtual tmp<Field<RetType>> Op(const UList<Type>& input) const; \ 786 virtual RetType Op(const point& global, const Type& input) const; \ 789 virtual tmp<Field<RetType>> Op \ 791 const UList<point>& global, \ 796 virtual tmp<Field<RetType>> Op \ 798 const pointUIndList& global, \ 803 virtual tmp<Field<RetType>> Op \ 805 const UList<point>& global, \ 806 const UList<Type>& input \ 810 virtual tmp<Field<RetType>> Op \ 812 const pointUIndList& global, \ 813 const UList<Type>& input \ 841 #undef defineCoordinateSystemTransform 850 bool operator!=(
const coordinateSystem& a,
const coordinateSystem&
b);
853 Ostream&
operator<<(Ostream&
os,
const coordinateSystem& csys);
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 ...
virtual scalar invTransform(const scalar &input) const
With constant rotation tensor.
virtual const vector e1() const
The local Cartesian x-axis in global coordinates.
TypeName("coordinateSystem")
Runtime type information.
User specification of a coordinate rotation.
tmp< pointField > invTransformPointImpl(const PointField &global) const
Implementation for transformPosition() methods.
point globalPosition(const point &local) const
From local coordinate position to global (cartesian) position.
tmp< Field< RetType > > oneToManyImpl(const PointField &global, const Type &input, const BinaryOp &bop) const
Use position-dependent transform tensors for single input.
word name_
The name of the coordinate system (optional)
virtual ~coordinateSystem()=default
Destructor.
tmp< Field< RetType > > oneToOneImpl(const PointField &global, const UList< Type > &input, const BinaryOp &bop) const
Use position-dependent transform tensors for multiple inputs.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
declareRunTimeSelectionTable(autoPtr, coordinateSystem, dictionary,(const dictionary &dict, IOobjectOption::readOption readOrigin),(dict, readOrigin))
virtual vector localToGlobal(const vector &local, bool translate) const
From local coordinate system to the global Cartesian system with optional translation for the origin...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual scalar transform(const scalar &input) const
With constant rotation tensor.
const word dictName("faMeshDefinition")
virtual const vector e3() const
The local Cartesian z-axis in global coordinates.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
point origin_
The coordinate system origin.
tmp< tensorField > rotationsImpl(const PointField &global) const
Implementation for R() methods.
virtual void clear()
Reset origin and rotation to an identity coordinateSystem.
Helper for construction of coordinateSystem PtrList.
coordinateSystem()
Default construct. This is an identity coordinate system.
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.
point localPosition(const point &global) const
From global (cartesian) position to local coordinate position.
string note_
An optional note describing the coordinate system.
tmp< pointField > transformPointImpl(const PointField &localCart) const
Implementation for transformPoint() methods.
virtual autoPtr< coordinateSystem > clone() const
Return clone.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from Foam::string.
virtual void rename(const word &newName)
Rename.
static Istream & input(Istream &is, IntRange< T > &range)
point invTransformPoint(const point &global) const
Remove origin offset and inverse transform point.
static const word null
An empty word.
virtual const coordinateRotation & rotation() const
The rotation specification.
static tmp< Field< RetType > > manyTimesImpl(const tensor &tt, const UList< Type > &input, const BinaryOp &bop)
Apply single transform tensor for multiple inputs.
vector localVector(const vector &global) const
From global (cartesian) to local vector components.
virtual symmTensor transformPrincipal(const vector &input) const
With constant rotation tensor.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
autoPtr< coordinateSystem > operator()(Istream &is) const
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 coordinateSystem dummy_
Dummy coordinate system for suppressed manipulation.
vector point
Point is a vector.
virtual const word & name() const
Return the name.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
A coordinate system forward to a global coordinate system that is normally provided by the constant/c...
virtual void writeEntry(Ostream &os) const
Write 'coordinateSystem' dictionary entry.
vector globalVector(const vector &local) const
From local to global (cartesian) vector components.
virtual void write(Ostream &os) const
Write.
virtual bool valid() const
Consider valid if it has a specification.
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.
virtual const vector e2() const
The local Cartesian y-axis in global coordinates.
A class for managing temporary objects.
Registry of regIOobjects.
virtual const string & note() const
Return the optional note.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Tensor of scalars, i.e. Tensor<scalar>.
#define defineCoordinateSystemTransform(Op, RetType, Type)
autoPtr< coordinateRotation > spec_
User specification of the coordinate rotation.
virtual bool uniform() const
True if the rotation tensor is uniform for all locations.
readOption
Enumeration defining read preferences.