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)
459 template<
class Derived>
471 const word& modelType,
483 const word& modelType,
494 const word& modelType,
581 virtual bool good()
const {
return bool(
spec_); }
584 virtual bool uniform()
const {
return true; }
587 virtual bool valid()
const {
return this->
good(); }
599 virtual const coordinateRotation&
rotation()
const 605 virtual const word&
name()
const 611 virtual const string&
note()
const 617 virtual const tensor&
R()
const 644 virtual void rename(
const word& newName)
650 virtual string&
note()
663 virtual void clear();
666 virtual void rotation(autoPtr<coordinateRotation>&& crot);
672 virtual void write(Ostream&
os)
const;
678 virtual void writeEntry(
const word& keyword, Ostream&
os)
const;
792 #undef defineCoordinateSystemTransform 793 #define defineCoordinateSystemTransform(Op, RetType, Type) \ 796 virtual RetType Op(const Type& input) const; \ 799 virtual tmp<Field<RetType>> Op(const UList<Type>& input) const; \ 802 virtual RetType Op(const point& global, const Type& input) const; \ 805 virtual tmp<Field<RetType>> Op \ 807 const UList<point>& global, \ 812 virtual tmp<Field<RetType>> Op \ 814 const pointUIndList& global, \ 819 virtual tmp<Field<RetType>> Op \ 821 const UList<point>& global, \ 822 const UList<Type>& input \ 826 virtual tmp<Field<RetType>> Op \ 828 const pointUIndList& global, \ 829 const UList<Type>& input \ 857 #undef defineCoordinateSystemTransform 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.
static autoPtr< coordinateSystem > Clone(const Derived &csys)
Clone a coordinate system.
virtual void clear()
Reset origin and rotation to an identity coordinateSystem.
virtual bool good() const
Consider good if it has a specification.
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.
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...
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
Same as good() - 2023-07.
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.