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-2024 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::coordinateSystems::cylindrical
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 namespace coordinateSystems
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cylindrical Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class cylindrical
52 :
53  public coordinateSystem
54 {
55  // Private Member Functions
56 
57  //- Convert from local coordinate system to the global Cartesian system
58  // with optional translation for the origin
59  virtual vector localToGlobal(const vector&, bool translate) const;
60 
61  //- Convert from local coordinate system to the global Cartesian system
62  // with optional translation for the origin
63  virtual tmp<vectorField> localToGlobal
64  (
65  const vectorField&,
66  bool translate
67  ) const;
68 
69  //- Convert from global Cartesian system to the local coordinate system
70  // with optional translation for the origin
71  virtual vector globalToLocal(const vector&, bool translate) const;
72 
73  //- Convert from global Cartesian system to the local coordinate system
74  // with optional translation for the origin
75  virtual tmp<vectorField> globalToLocal
76  (
77  const vectorField&,
78  bool translate
79  ) const;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("cylindrical");
86 
87 
88  // Constructors
89 
90  //- Construct from origin and rotation
92  (
93  const word& name,
94  const point& origin,
95  const coordinateRotation&
96  );
97 
98  //- Construct from origin and 2 axes
100  (
101  const word& name,
102  const point& origin,
103  const vector& axis,
104  const vector& dirn
105  );
106 
107  //- Construct from dictionary and name
108  cylindrical(const word&, const dictionary&);
109 
110  //- Construct and return a clone
111  virtual autoPtr<coordinateSystem> clone() const
112  {
113  return autoPtr<coordinateSystem>(new cylindrical(*this));
114  }
115 
116 
117  //- Destructor
118  virtual ~cylindrical();
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 } // End namespace coordinateSystems
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Abstract base class for coordinate rotation.
Base class for other coordinate system specifications.
const word & name() const
Return name.
const point & origin() const
Return origin.
Cylindrical coordinate system.
Definition: cylindricalCS.H:53
virtual autoPtr< coordinateSystem > clone() const
Construct and return a clone.
cylindrical(const word &name, const point &origin, const coordinateRotation &)
Construct from origin and rotation.
TypeName("cylindrical")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.