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 valid if it has a specification
562  virtual bool valid() const
563  {
564  return bool(spec_);
565  }
566 
567  //- True if the rotation tensor is uniform for all locations
568  virtual bool uniform() const
569  {
570  return true;
571  }
572 
573 
574  // Access
575 
576  //- Return origin
577  virtual const point& origin() const
578  {
579  return origin_;
580  }
581 
582  //- The rotation specification
583  virtual const coordinateRotation& rotation() const
584  {
585  return *spec_;
586  }
587 
588  //- Return the name
589  virtual const word& name() const
590  {
591  return name_;
592  }
593 
594  //- Return the optional note
595  virtual const string& note() const
596  {
597  return note_;
598  }
599 
600  //- Return const reference to the rotation tensor
601  virtual const tensor& R() const
602  {
603  return rot_;
604  }
605 
606  //- The local Cartesian x-axis in global coordinates
607  virtual const vector e1() const
608  {
609  return rot_.cx();
610  }
611 
612  //- The local Cartesian y-axis in global coordinates
613  virtual const vector e2() const
614  {
615  return rot_.cy();
616  }
617 
618  //- The local Cartesian z-axis in global coordinates
619  virtual const vector e3() const
620  {
621  return rot_.cz();
622  }
623 
624 
625  // Edit
626 
627  //- Rename
628  virtual void rename(const word& newName)
629  {
630  name_ = newName;
631  }
632 
633  //- Edit access to optional note
634  virtual string& note()
635  {
636  return note_;
637  }
638 
639  //- Edit access to origin
640  virtual point& origin()
641  {
642  return origin_;
643  }
644 
645  //- Reset origin and rotation to an identity coordinateSystem
646  // Also resets the note
647  virtual void clear();
648 
649  //- Change the rotation
650  virtual void rotation(autoPtr<coordinateRotation>&& crot);
651 
652 
653  // Write
654 
655  //- Write
656  virtual void write(Ostream& os) const;
657 
658  //- Write 'coordinateSystem' dictionary entry
659  virtual void writeEntry(Ostream& os) const;
660 
661  //- Write dictionary entry
662  virtual void writeEntry(const word& keyword, Ostream& os) const;
663 
664 
665  // Member Operators
667  //- Copy assignment
668  void operator=(const coordinateSystem& csys);
669 
670  //- Move assignment
671  void operator=(coordinateSystem&& csys);
672 
673  //- Copy assignment from autoPtr
675 
676  //- Move assignment from autoPtr
678 
679 
680  // Rotation
681 
682  //- Position-dependent rotation tensor (when uniform = false)
683  //- \return tensor
684  virtual tensor R(const point& global) const;
686  //- Position-dependent rotation tensors (when uniform = false)
687  //- \return tensorField
688  virtual tmp<tensorField> R(const UList<point>& global) const;
689 
690  //- Position-dependent rotation tensors (when uniform = false)
691  //- \return tensorField
692  virtual tmp<tensorField> R(const pointUIndList& global) const;
694 
695  // Position
696 
697  //- Transform point and add origin offset.
698  // Corresponds to a local-to-global transformation using Cartesian
699  // coordinates for both local and global.
700  point transformPoint(const point& localCart) const;
702  //- Transform points and add origin offset.
703  tmp<pointField> transformPoint(const UList<point>& localCart) const;
704 
705  //- Transform points and add origin offset.
706  tmp<pointField> transformPoint(const pointUIndList& localCart) const;
707 
708 
709  //- Remove origin offset and inverse transform point.
710  // Corresponds to a global-to-local transformation using Cartesian
711  // coordinates for both local and global.
712  point invTransformPoint(const point& global) const;
713 
714  //- Remove origin offset and inverse transform points.
715  tmp<pointField> invTransformPoint(const UList<point>& global) const;
716 
717  //- Remove origin offset and inverse transform points.
718  tmp<pointField> invTransformPoint(const pointUIndList& global) const;
719 
720 
721  // Transformations with change of coordinate types
722 
723  //- From local coordinate position to global (cartesian) position
724  point globalPosition(const point& local) const
725  {
726  return localToGlobal(local, true);
727  }
728 
729  //- From local coordinate position to global (cartesian) position
731  {
732  return localToGlobal(local, true);
733  }
734 
735  //- From global (cartesian) position to local coordinate position
736  point localPosition(const point& global) const
737  {
738  return globalToLocal(global, true);
739  }
740 
741  //- From global (cartesian) position to local coordinate position
742  tmp<pointField> localPosition(const pointField& global) const
743  {
744  return globalToLocal(global, true);
745  }
746 
747 
748 
749  //- From local to global (cartesian) vector components
750  vector globalVector(const vector& local) const
751  {
752  return localToGlobal(local, false);
753  }
754 
755  //- From local to global (cartesian) vector components
757  {
758  return localToGlobal(local, false);
759  }
761  //- From global (cartesian) to local vector components
762  vector localVector(const vector& global) const
763  {
764  return globalToLocal(global, false);
765  }
766 
767  //- From global (cartesian) to local vector components
769  {
770  return globalToLocal(global, false);
771  }
772 
773 
774  // Transformations (input and output are Cartesian)
775 
776 #undef defineCoordinateSystemTransform
777 #define defineCoordinateSystemTransform(Op, RetType, Type) \
778  \
779  \
780  virtual RetType Op(const Type& input) const; \
781  \
782  \
783  virtual tmp<Field<RetType>> Op(const UList<Type>& input) const; \
784  \
785  \
786  virtual RetType Op(const point& global, const Type& input) const; \
787  \
788  \
789  virtual tmp<Field<RetType>> Op \
790  ( \
791  const UList<point>& global, \
792  const Type& input \
793  ) const; \
794  \
795  \
796  virtual tmp<Field<RetType>> Op \
797  ( \
798  const pointUIndList& global, \
799  const Type& input \
800  ) const; \
801  \
802  \
803  virtual tmp<Field<RetType>> Op \
804  ( \
805  const UList<point>& global, \
806  const UList<Type>& input \
807  ) const; \
808  \
809  \
810  virtual tmp<Field<RetType>> Op \
811  ( \
812  const pointUIndList& global, \
813  const UList<Type>& input \
814  ) const;
815 
816 
818 
822  (
823  transform,
826  );
829 
833  (
834  invTransform,
837  );
840 
841  #undef defineCoordinateSystemTransform
842 };
843 
844 
845 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
846 
847 // Global Operators
848 
849 //- Compare inequality
850 bool operator!=(const coordinateSystem& a, const coordinateSystem& b);
851 
852 //- Output operator
853 Ostream& operator<<(Ostream& os, const coordinateSystem& csys);
854 
855 
856 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
857 
858 } // End namespace Foam
859 
860 
861 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
862 
863 #ifdef NoRepository
864  #include "coordinateSystemTemplates.C"
865 #endif
866 
867 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
868 
869 #endif
870 
871 // ************************************************************************* //
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:120
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.
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:47
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:76
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
Consider valid if it has a specification.
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.