cylindricalRotation.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-2021 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 Class
28  Foam::coordinateRotations::cylindrical
29 
30 Description
31  A special purpose coordinateRotation that is generally for use in
32  combination with a cylindricalCS when only the orientation of the
33  local Z-axis is relevant.
34 
35  \heading Dictionary entries
36  \table
37  Property | Description | Required | Default
38  type | Type name: cylindrical | yes |
39  axis | The z-axis | yes |
40  e3 | Alias for 'axis' | no |
41  \endtable
42 
43 SourceFiles
44  cylindricalRotation.C
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef coordinateRotations_cylindrical_H
49 #define coordinateRotations_cylindrical_H
50 
51 #include "axesRotation.H"
52 
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 
55 namespace Foam
56 {
57 namespace coordinateRotations
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class coordinateRotations::cylindrical Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class cylindrical
65 :
66  public coordinateRotations::axes
67 {
68 public:
69 
70  //- Runtime type information
71  TypeNameNoDebug("cylindrical");
72 
73 
74  // Constructors
75 
76  //- Default construct - an identity transform
77  cylindrical() = default;
78 
79  //- Copy construct
80  cylindrical(const cylindrical& crot);
81 
82  //- Construct from single axis (as e3) using best-guess for the
83  //- second axis.
84  explicit cylindrical(const vector& axis);
85 
86  //- Construct from dictionary
87  explicit cylindrical(const dictionary& dict);
88 
89  //- Return clone
91  {
92  return
95  }
96 
97 
98  //- Destructor
99  virtual ~cylindrical() = default;
100 
101 
102  // Static Member Functions
103 
104  //- The rotation tensor calculated from axes and order.
105  // The input axes will be normalised.
106  static tensor rotation(const vector& axis);
107 
108 
109  // Member Functions
110 
111  //- Write information
112  virtual void write(Ostream& os) const;
113 
114  //- Write dictionary entry
115  virtual void writeEntry(const word& keyword, Ostream& os) const;
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace coordinateRotations
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Foam::Tensor< scalar >
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::coordinateRotations::cylindrical::write
virtual void write(Ostream &os) const
Write information.
Definition: cylindricalRotation.C:82
Foam::coordinateRotations::cylindrical::writeEntry
virtual void writeEntry(const word &keyword, Ostream &os) const
Write dictionary entry.
Definition: cylindricalRotation.C:89
Foam::coordinateRotations::cylindrical
A special purpose coordinateRotation that is generally for use in combination with a cylindricalCS wh...
Definition: cylindricalRotation.H:83
Foam::coordinateRotations::cylindrical::~cylindrical
virtual ~cylindrical()=default
Destructor.
Foam::coordinateRotations::axes
A coordinateRotation specified using global axes.
Definition: axesRotation.H:104
Foam::coordinateRotations::cylindrical::rotation
static tensor rotation(const vector &axis)
The rotation tensor calculated from axes and order.
Definition: cylindricalRotation.C:51
Foam::coordinateRotations::cylindrical::clone
autoPtr< coordinateRotation > clone() const
Return clone.
Definition: cylindricalRotation.H:109
Foam::coordinateRotations::cylindrical::TypeNameNoDebug
TypeNameNoDebug("cylindrical")
Runtime type information.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Vector< scalar >
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
axesRotation.H
Foam::coordinateRotations::cylindrical::cylindrical
cylindrical()=default
Default construct - an identity transform.