cylindricalCS.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::cylindricalCS
26 
27 Description
28  Cylindrical coordinate system
29 
30 SourceFiles
31  cylindricalCS.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cylindricalCS_H
36 #define cylindricalCS_H
37 
38 #include "coordinateSystem.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class cylindricalCS Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class cylindricalCS
50 :
51  public coordinateSystem
52 {
53  // Private Data members
54 
55  //- Are angles in degrees? (default = true)
56  bool inDegrees_;
57 
58 
59 protected:
60 
61  // Protected Member Functions
62 
63 
64  //- Convert from local coordinate system to the global Cartesian system
65  // with optional translation for the origin
66  virtual vector localToGlobal(const vector&, bool translate) const;
67 
68  //- Convert from local coordinate system to the global Cartesian system
69  // with optional translation for the origin
71  (
72  const vectorField&,
73  bool translate
74  ) const;
75 
76  //- Convert from global Cartesian system to the local coordinate system
77  // with optional translation for the origin
78  virtual vector globalToLocal(const vector&, bool translate) const;
79 
80  //- Convert from global Cartesian system to the local coordinate system
81  // with optional translation for the origin
83  (
84  const vectorField&,
85  bool translate
86  ) const;
87 
88 
89 public:
90 
91 
92  // Constructors
93 
94  //- Construct null
95  cylindricalCS(const bool inDegrees=true);
96 
97  //- Construct copy
99  (
100  const coordinateSystem&,
101  const bool inDegrees=true
102  );
103 
104  //- Construct copy with a different name
106  (
107  const word& name,
108  const coordinateSystem&,
109  const bool inDegrees=true
110  );
111 
112  //- Construct from origin and rotation
114  (
115  const word& name,
116  const point& origin,
117  const coordinateRotation&,
118  const bool inDegrees=true
119  );
120 
121  //- Construct from origin and 2 axes
123  (
124  const word& name,
125  const point& origin,
126  const vector& axis,
127  const vector& dirn,
128  const bool inDegrees=true
129  );
130 
131  //- Construct from dictionary and name
132  cylindricalCS(const word&, const dictionary&);
133 
134  //- Construct from dictionary and objectRegistry
135  cylindricalCS(const objectRegistry&, const dictionary&);
136 
137 
138  //- Destructor
139  virtual ~cylindricalCS();
140 
141 
142  // Member Functions
143 
144  //- Are angles in degrees?
145  bool inDegrees() const;
146 
147  //- Non-const access to inDegrees
148  bool& inDegrees();
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
Base class for other coordinate system specifications.
Abstract base class for coordinate rotation.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
cylindricalCS(const bool inDegrees=true)
Construct null.
Definition: cylindricalCS.C:35
virtual vector localToGlobal(const vector &, bool translate) const
Convert from local coordinate system to the global Cartesian system.
const word & name() const
Return name.
const point & origin() const
Return origin.
Cylindrical coordinate system.
Definition: cylindricalCS.H:48
A class for handling words, derived from string.
Definition: word.H:59
virtual ~cylindricalCS()
Destructor.
bool inDegrees() const
Are angles in degrees?
A class for managing temporary objects.
Definition: PtrList.H:53
Registry of regIOobjects.
Namespace for OpenFOAM.
virtual vector globalToLocal(const vector &, bool translate) const
Convert from global Cartesian system to the local coordinate system.