coordinateSystem.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2018-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Namespace
28  Foam::coordSystem
29 
30 Description
31  Namespace for coordinate systems.
32 
33 Class
34  Foam::coordinateSystem
35 
36 Description
37  Base class for coordinate system specification,
38  the default coordinate system type is
39  \link coordSystem::cartesian cartesian \endlink.
40 
41  All systems are defined by an origin point and a coordinate rotation
42  By default, the \link coordinateRotations::axes axes \endlink
43  specification can be used directly as part of the
44  coordinate system specification. For example,
45 
46  \verbatim
47  coordinateSystem
48  {
49  origin (0 0 0);
50  e1 (0 1 0);
51  e3 (1 0 0);
52  }
53  \endverbatim
54 
55  However, a more verbose format with rotation provided as a dictionary entry
56  is possible:
57  \verbatim
58  coordinateSystem
59  {
60  type cartesian;
61  origin (0 0 0);
62  rotation
63  {
64  type axes;
65  e1 (0 1 0);
66  e3 (1 0 0);
67  }
68  }
69  \endverbatim
70 
71  It also also possible to use the compact (single-dictionary) form
72  and specific a different type of rotation:
73  \verbatim
74  coordinateSystem
75  {
76  type cartesian;
77  origin (0 0 0);
78  rotation euler;
79  angles (90 0 0);
80  }
81  \endverbatim
82 
83  This last form can be particularly readable for an identity rotation:
84  coordinateSystem
85  {
86  type cartesian;
87  origin (0 0 0);
88  rotation none;
89  }
90  \endverbatim
91 
92  Types of coordinateRotation:
93  -# \link coordinateRotations::identity none \endlink
94  -# \link coordinateRotations::axes axes \endlink
95  -# \link coordinateRotations::axisAngle axisAngle \endlink
96  -# \link coordinateRotations::euler euler \endlink
97  -# \link coordinateRotations::starcd starcd \endlink
98 
99  Type of coordinateSystem:
100  -# \link coordSystem::cartesian cartesian \endlink
101  -# \link coordSystem::cylindrical cylindrical \endlink
102  -# \link coordSystem::indirect indirect \endlink (references
103  an entry in coordinateSystems).
104 
105 SourceFiles
106  coordinateSystem.C
107  coordinateSystemNew.C
108  coordinateSystemTemplates.C
109  coordinateSystemTransform.C
110 
111 \*---------------------------------------------------------------------------*/
112 
113 #ifndef Foam_coordinateSystem_H
114 #define Foam_coordinateSystem_H
115 
116 #include "vector.H"
117 #include "point.H"
118 #include "tensor.H"
119 #include "vectorField.H"
120 #include "pointField.H"
121 #include "tensorField.H"
122 #include "pointIndList.H"
123 #include "coordinateRotation.H"
124 #include "autoPtr.H"
125 #include "tmp.H"
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 namespace Foam
130 {
131 
132 // Forward Declarations
133 class coordinateSystem;
134 class objectRegistry;
135 
136 namespace coordSystem
137 {
138 class indirect;
139 }
140 
141 
142 /*---------------------------------------------------------------------------*\
143  Class coordinateSystem Declaration
144 \*---------------------------------------------------------------------------*/
145 
146 class coordinateSystem
147 {
148  // Private Member Functions
149 
150  //- Select construct specified coordinate system type
151  //
152  // \param modelType Eg, cartesian, cylindrical, indirect
153  // An empty modelType will be treated as "cartesian".
154  // \param dict The specifications
155  // \param readOrigin The preferred handling for reading 'origin'
156  // \param obrPtr Optional reference to an objectRegistry
157  // (for indirect entries).
159  (
160  const word& modelType,
161  const dictionary& dict,
162  IOobjectOption::readOption readOrigin,
163  const objectRegistry* obrPtr
164  );
165 
166  //- Select constructed from dictionary
167  //
168  // \param dict The top-level dictionary contents
169  // \param dictName The sub-dictionary name to use for the
170  // coordinate system specifications. An empty name invokes
171  // an implicit search for a "coordinateSystem" sub-dictionary
172  // which is convenient and provides compatibility with previous
173  // versions (1806 and earlier).
174  // \param readOrigin The preferred handling for reading 'origin'
175  // \param obrPtr The objectRegistry for lookup of indirect entries.
177  (
178  const dictionary& dict,
179  const word& dictName,
180  IOobjectOption::readOption readOrigin,
181  const objectRegistry* obrPtr
182  );
183 
184  //- Optional select construct from dictionary
185  //
186  // \param dict The top-level dictionary to search
187  // \param dictName The sub-dictionary name to select.
188  // Return nullptr if it does not exist.
189  // \param obrPtr The objectRegistry for lookup of indirect entries.
190  //
191  // Since the specifications are isolated within a sub-dictionary,
192  // the 'origin' entry is treated as optional
193  static autoPtr<coordinateSystem> NewIfPresent
194  (
195  const dictionary& dict,
196  const word& dictName,
197  const objectRegistry* obrPtr
198  );
199 
200 
201 protected:
202 
203  //- Friendship with indirect for dispatching to its underlying system
204  friend coordSystem::indirect;
205 
206 
207  // Protected Data
208 
209  //- User specification of the coordinate rotation
210  // May be invalid after a move assignment or transfer
212 
213  //- The coordinate system origin
214  point origin_;
215 
216  //- The rotation tensor
217  tensor rot_;
218 
219  //- The name of the coordinate system (optional)
220  word name_;
222  //- An optional note describing the coordinate system
223  string note_;
224 
225  //- Dummy coordinate system for suppressed manipulation
227 
228 
229  // Protected Member Functions
230 
231  //- Implementation for R() methods
232  template<class PointField>
233  tmp<tensorField> rotationsImpl(const PointField& global) const;
234 
235  //- Implementation for transformPoint() methods
236  template<class PointField>
237  tmp<pointField> transformPointImpl(const PointField& localCart) const;
238 
239  //- Implementation for transformPosition() methods
240  template<class PointField>
242 
243  //- Apply single transform tensor for multiple inputs
244  template<class RetType, class Type, class BinaryOp>
246  (
247  const tensor& tt,
248  const UList<Type>& input,
249  const BinaryOp& bop
250  );
251 
252  //- Use position-dependent transform tensors for multiple inputs
253  template<class RetType, class PointField, class Type, class BinaryOp>
255  (
256  const PointField& global,
257  const UList<Type>& input,
258  const BinaryOp& bop
259  ) const;
260 
261  //- Use position-dependent transform tensors for single input
262  template<class RetType, class PointField, class Type, class BinaryOp>
264  (
265  const PointField& global,
266  const Type& input,
267  const BinaryOp& bop
268  ) const;
269 
270 
271  //- From local coordinate system to the global Cartesian system
272  //- with optional translation for the origin
273  virtual vector localToGlobal
274  (
275  const vector& local,
276  bool translate
277  ) const;
278 
279  //- From local coordinate system to the global Cartesian system
280  //- with optional translation for the origin
282  (
283  const vectorField& local,
284  bool translate
285  ) const;
286 
287  //- From global Cartesian system to the local coordinate system
288  //- with optional translation for the origin
289  virtual vector globalToLocal
290  (
291  const vector& global,
292  bool translate
293  ) const;
294 
295  //- From global Cartesian system to the local coordinate system
296  //- with optional translation for the origin
298  (
299  const vectorField& global,
300  bool translate
301  ) const;
302 
303  //- Assign from dictionary content with specified read handling
304  //- of the 'origin' entry
305  void assign
306  (
307  const dictionary& dict,
309  );
310 
311 
312  // Constructors
313 
314  //- Construct null, without allocating a coordinateRotation
315  //- specification.
316  coordinateSystem(std::nullptr_t);
317 
318 
319 public:
320 
321  //- Runtime type information
322  TypeName("coordinateSystem");
323 
324  //- Helper for construction of coordinateSystem PtrList
325  // The Istream contains a word followed by a dictionary.
326  struct iNew
327  {
329  {
330  return coordinateSystem::New(is);
331  }
332  };
333 
334 
335  // Constructors
336 
337  //- Default construct. This is an identity coordinate system
339 
340  //- Copy construct from rotation with origin=0
341  explicit coordinateSystem(const coordinateRotation& crot);
342 
343  //- Move construct from rotation with origin=0
344  explicit coordinateSystem(coordinateRotation&& crot);
345 
346  //- Copy construct
347  coordinateSystem(const coordinateSystem& csys);
348 
349  //- Move construct
351 
352  //- Move construct from autoPtr
353  explicit coordinateSystem(autoPtr<coordinateSystem>&& csys);
354 
355  //- Copy construct with a different name
357  (
358  const word& name,
359  const coordinateSystem& csys
360  );
361 
362  //- Construct from origin and rotation
364  (
365  const point& origin,
366  const coordinateRotation& crot
367  );
368 
369  //- Construct from origin and 2 axes
371  (
372  const point& origin,
373  const vector& axis,
374  const vector& dirn
375  );
376 
377  //- Construct from origin and rotation
379  (
380  const word& name,
381  const point& origin,
382  const coordinateRotation& crot
383  );
384 
385  //- Construct named from origin and 2 axes
387  (
388  const word& name,
389  const point& origin,
390  const vector& axis,
391  const vector& dirn
392  );
393 
394  //- Construct from dictionary with optional
395  //- read handling for the 'origin' entry (default: MUST_READ).
396  //
397  // \note The readOrigin is downgraded to READ_IF_PRESENT
398  // if the dictionary itself is "coordinateSystem"
399  explicit coordinateSystem
400  (
401  const dictionary& dict,
403  );
404 
405  //- Construct from dictionary with optional subDict lookup and optional
406  //- read handling for the 'origin' entry (default: MUST_READ).
407  //
408  // \param dictName If non-empty, mandatory sub-dictionary to use.
409  //
410  // \note The readOrigin is downgraded to READ_IF_PRESENT
411  // if the dictionary itself is "coordinateSystem"
412  // or if a sub-dictionary is being used
414  (
415  const dictionary& dict,
416  const word& dictName,
418  );
419 
420 
421  //- Return clone
422  virtual autoPtr<coordinateSystem> clone() const
423  {
424  return autoPtr<coordinateSystem>::New(*this);
425  }
426 
427 
428  // Declare run-time constructor selection table
430  (
431  autoPtr,
433  dictionary,
434  (
435  const dictionary& dict,
436  IOobjectOption::readOption readOrigin
437  ),
438  (dict, readOrigin)
439  );
440 
441  // Declare run-time constructor selection table
443  (
444  autoPtr,
446  registry,
447  (
448  const objectRegistry& obr,
449  const dictionary& dict,
450  IOobjectOption::readOption readOrigin
451  ),
452  (obr, dict, readOrigin)
453  );
454 
455 
456  // Selectors
457 
458  //- Select construct the specified coordinate system type
459  //- with reference to objectRegistry for indirect entries.
460  //
461  // An empty modelType will be treated as "cartesian"
463  (
464  const word& modelType,
465  const objectRegistry& obr,
466  const dictionary& dict,
468  );
469 
470  //- Select construct the specified coordinate system type
471  //
472  // An empty modelType will be treated as "cartesian"
474  (
475  const word& modelType,
476  const dictionary& dict,
478  );
479 
480  //- Select construct from dictionary with reference to objectRegistry
481  //- for indirect entries.
482  //
483  // \param dictName If non-empty, the sub-dictionary name to use
484  // for the coordinate system description.
485  //
486  // \note When the dictName is empty, it includes an implicit search
487  // for a "coordinateSystem" sub-dictionary for convenience and
488  // compatibility with previous versions (1806 and earlier).
490  (
491  const objectRegistry& obr,
492  const dictionary& dict,
493  const word& dictName = word::null,
495  );
496 
497  //- Select constructed from dictionary
498  // \param dictName If non-empty, the sub-dictionary name to use
499  // for the coordinate system description.
500  //
501  // \note When the dictName is empty, it includes an implicit search
502  // for a "coordinateSystem" sub-dictionary for convenience and
503  // compatibility with previous versions (1806 and earlier).
505  (
506  const dictionary& dict,
507  const word& dictName = word::null,
509  );
510 
511  //- Select constructed from Istream
512  // Expects a name/dictionary as input
514  (
515  Istream& is,
517  );
518 
519 
520  //- Optional select construct from dictionary, with registry reference
521  //
522  // \param obr The objectRegistry (for lookup of indirect entries)
523  // \param dict The top-level dictionary to search
524  // \param dictName The sub-dictionary name to select the
525  // for coordinate system specification
526  // (default is 'coordinateSystem').
527  //
528  // Since the specifications are isolated within a sub-dictionary,
529  // the 'origin' entry is treated as optional
530  static autoPtr<coordinateSystem> NewIfPresent
531  (
532  const objectRegistry& obr,
533  const dictionary& dict,
534  const word& dictName = coordinateSystem::typeName
535  );
536 
537  //- Optional select construct from dictionary
538  //
539  // \param dict The top-level dictionary to search
540  // \param dictName The sub-dictionary name to select the
541  // for coordinate system specification
542  // (default is 'coordinateSystem').
543  //
544  // Since the specifications are isolated within a sub-dictionary,
545  // the 'origin' entry is treated as optional
546  static autoPtr<coordinateSystem> NewIfPresent
547  (
548  const dictionary& dict,
549  const word& dictName = coordinateSystem::typeName
550  );
551 
552 
553  //- Destructor
554  virtual ~coordinateSystem() = default;
555 
556 
557  // Member Functions
558 
559  // Characteristics
560 
561  //- Consider good if it has a specification
562  virtual bool good() const { return bool(spec_); }
563 
564  //- True if the rotation tensor is uniform for all locations
565  virtual bool uniform() const { return true; }
566 
567  //- Same as good() - 2023-07
568  virtual bool valid() const { return this->good(); }
569 
570 
571  // Access
572 
573  //- Return origin
574  virtual const point& origin() const
575  {
576  return origin_;
577  }
578 
579  //- The rotation specification
580  virtual const coordinateRotation& rotation() const
581  {
582  return *spec_;
583  }
584 
585  //- Return the name
586  virtual const word& name() const
587  {
588  return name_;
589  }
590 
591  //- Return the optional note
592  virtual const string& note() const
593  {
594  return note_;
595  }
596 
597  //- Return const reference to the rotation tensor
598  virtual const tensor& R() const
599  {
600  return rot_;
601  }
602 
603  //- The local Cartesian x-axis in global coordinates
604  virtual const vector e1() const
605  {
606  return rot_.cx();
607  }
608 
609  //- The local Cartesian y-axis in global coordinates
610  virtual const vector e2() const
611  {
612  return rot_.cy();
613  }
614 
615  //- The local Cartesian z-axis in global coordinates
616  virtual const vector e3() const
617  {
618  return rot_.cz();
619  }
620 
621 
622  // Edit
623 
624  //- Rename
625  virtual void rename(const word& newName)
626  {
627  name_ = newName;
628  }
629 
630  //- Edit access to optional note
631  virtual string& note()
632  {
633  return note_;
634  }
635 
636  //- Edit access to origin
637  virtual point& origin()
638  {
639  return origin_;
640  }
641 
642  //- Reset origin and rotation to an identity coordinateSystem
643  // Also resets the note
644  virtual void clear();
645 
646  //- Change the rotation
647  virtual void rotation(autoPtr<coordinateRotation>&& crot);
648 
649 
650  // Write
651 
652  //- Write
653  virtual void write(Ostream& os) const;
654 
655  //- Write 'coordinateSystem' dictionary entry
656  virtual void writeEntry(Ostream& os) const;
657 
658  //- Write dictionary entry
659  virtual void writeEntry(const word& keyword, Ostream& os) const;
660 
661 
662  // Member Operators
663 
664  //- Copy assignment
665  void operator=(const coordinateSystem& csys);
667  //- Move assignment
668  void operator=(coordinateSystem&& csys);
669 
670  //- Copy assignment from autoPtr
672 
673  //- Move assignment from autoPtr
675 
677  // Rotation
678 
679  //- Position-dependent rotation tensor (when uniform = false)
680  //- \return tensor
681  virtual tensor R(const point& global) const;
682 
683  //- Position-dependent rotation tensors (when uniform = false)
684  //- \return tensorField
685  virtual tmp<tensorField> R(const UList<point>& global) const;
686 
687  //- Position-dependent rotation tensors (when uniform = false)
688  //- \return tensorField
689  virtual tmp<tensorField> R(const pointUIndList& global) const;
690 
691 
692  // Position
693 
694  //- Transform point and add origin offset.
695  // Corresponds to a local-to-global transformation using Cartesian
696  // coordinates for both local and global.
697  point transformPoint(const point& localCart) const;
698 
699  //- Transform points and add origin offset.
700  tmp<pointField> transformPoint(const UList<point>& localCart) const;
701 
702  //- Transform points and add origin offset.
703  tmp<pointField> transformPoint(const pointUIndList& localCart) const;
704 
705 
706  //- Remove origin offset and inverse transform point.
707  // Corresponds to a global-to-local transformation using Cartesian
708  // coordinates for both local and global.
709  point invTransformPoint(const point& global) const;
710 
711  //- Remove origin offset and inverse transform points.
712  tmp<pointField> invTransformPoint(const UList<point>& global) const;
713 
714  //- Remove origin offset and inverse transform points.
715  tmp<pointField> invTransformPoint(const pointUIndList& global) const;
717 
718  // Transformations with change of coordinate types
719 
720  //- From local coordinate position to global (cartesian) position
721  point globalPosition(const point& local) const
722  {
723  return localToGlobal(local, true);
724  }
725 
726  //- From local coordinate position to global (cartesian) position
728  {
729  return localToGlobal(local, true);
730  }
731 
732  //- From global (cartesian) position to local coordinate position
733  point localPosition(const point& global) const
734  {
735  return globalToLocal(global, true);
736  }
737 
738  //- From global (cartesian) position to local coordinate position
739  tmp<pointField> localPosition(const pointField& global) const
740  {
741  return globalToLocal(global, true);
742  }
743 
744 
745 
746  //- From local to global (cartesian) vector components
747  vector globalVector(const vector& local) const
748  {
749  return localToGlobal(local, false);
750  }
752  //- From local to global (cartesian) vector components
754  {
755  return localToGlobal(local, false);
756  }
757 
758  //- From global (cartesian) to local vector components
759  vector localVector(const vector& global) const
760  {
761  return globalToLocal(global, false);
762  }
763 
764  //- From global (cartesian) to local vector components
765  tmp<vectorField> localVector(const vectorField& global) const
766  {
767  return globalToLocal(global, false);
768  }
769 
770 
771  // Transformations (input and output are Cartesian)
772 
773 #undef defineCoordinateSystemTransform
774 #define defineCoordinateSystemTransform(Op, RetType, Type) \
775  \
776  \
777  virtual RetType Op(const Type& input) const; \
778  \
779  \
780  virtual tmp<Field<RetType>> Op(const UList<Type>& input) const; \
781  \
782  \
783  virtual RetType Op(const point& global, const Type& input) const; \
784  \
785  \
786  virtual tmp<Field<RetType>> Op \
787  ( \
788  const UList<point>& global, \
789  const Type& input \
790  ) const; \
791  \
792  \
793  virtual tmp<Field<RetType>> Op \
794  ( \
795  const pointUIndList& global, \
796  const Type& input \
797  ) const; \
798  \
799  \
800  virtual tmp<Field<RetType>> Op \
801  ( \
802  const UList<point>& global, \
803  const UList<Type>& input \
804  ) const; \
805  \
806  \
807  virtual tmp<Field<RetType>> Op \
808  ( \
809  const pointUIndList& global, \
810  const UList<Type>& input \
811  ) const;
812 
813 
815 
819  (
820  transform,
823  );
826 
830  (
831  invTransform,
834  );
837 
838  #undef defineCoordinateSystemTransform
839 };
840 
841 
842 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
843 
844 // Global Operators
845 
846 //- Compare inequality
847 bool operator!=(const coordinateSystem& a, const coordinateSystem& b);
848 
849 //- Output operator
850 Ostream& operator<<(Ostream& os, const coordinateSystem& csys);
851 
852 
853 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
854 
855 } // End namespace Foam
856 
857 
858 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
859 
860 #ifdef NoRepository
861  #include "coordinateSystemTemplates.C"
862 #endif
863 
864 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
865 
866 #endif
867 
868 // ************************************************************************* //
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.
dictionary dict
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...
Definition: dictionary.H:129
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)...
Definition: Istream.H:57
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.
Tensor< scalar > tensor
Definition: symmTensor.H:57
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.
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].
Definition: createFields.H:27
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual void rename(const word &newName)
Rename.
static Istream & input(Istream &is, IntRange< T > &range)
Definition: IntRanges.C:33
point invTransformPoint(const point &global) const
Remove origin offset and inverse transform point.
static const word null
An empty word.
Definition: word.H:84
virtual const coordinateRotation & rotation() const
The rotation specification.
bool local
Definition: EEqn.H:20
Vector< scalar > vector
Definition: vector.H:57
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 &#39;origin&#39; entry.
tensor rot_
The rotation tensor.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:77
static coordinateSystem dummy_
Dummy coordinate system for suppressed manipulation.
vector point
Point is a vector.
Definition: point.H:37
virtual const word & name() const
Return the name.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
Definition: faMatrix.H:56
A coordinate system forward to a global coordinate system that is normally provided by the constant/c...
Definition: indirectCS.H:71
virtual void writeEntry(Ostream &os) const
Write &#39;coordinateSystem&#39; 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)
Definition: eddy.H:297
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
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.
Definition: HashPtrTable.H:50
Registry of regIOobjects.
virtual const string & note() const
Return the optional note.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Definition: autoPtr.H:178
Tensor of scalars, i.e. Tensor<scalar>.
#define defineCoordinateSystemTransform(Op, RetType, Type)
autoPtr< coordinateRotation > spec_
User specification of the coordinate rotation.
Namespace for OpenFOAM.
virtual bool uniform() const
True if the rotation tensor is uniform for all locations.
readOption
Enumeration defining read preferences.