cartesianCS.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 | Copyright (C) 2011-2013 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::cartesianCS
26 
27 Description
28  Cylindrical coordinate system
29 
30 SourceFiles
31  cartesianCS.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cartesianCS_H
36 #define cartesianCS_H
37 
38 #include "coordinateSystem.H"
39 #include "typeInfo.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class cartesianCS Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class cartesianCS
51 :
52  public coordinateSystem
53 {
54 protected:
55 
56  // Protected Member Functions
57 
58 
59  //- Convert from local coordinate system to the global Cartesian system
60  // with optional translation for the origin
61  virtual vector localToGlobal(const vector&, bool translate) const;
62 
63  //- Convert from local coordinate system to the global Cartesian system
64  // with optional translation for the origin
66  (
67  const vectorField&,
68  bool translate
69  ) const;
70 
71  //- Convert from global Cartesian system to the local coordinate system
72  // with optional translation for the origin
73  virtual vector globalToLocal(const vector&, bool translate) const;
74 
75  //- Convert from global Cartesian system to the local coordinate system
76  // with optional translation for the origin
78  (
79  const vectorField&,
80  bool translate
81  ) const;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("cartesian");
88 
89 
90  // Constructors
91 
92  //- Construct null
93  cartesianCS();
94 
95  //- Construct copy
97  (
98  const coordinateSystem&
99  );
100 
101  //- Construct copy with a different name
103  (
104  const word& name,
105  const coordinateSystem&
106  );
107 
108  //- Construct from origin and rotation
110  (
111  const word& name,
112  const point& origin,
113  const coordinateRotation&
114  );
115 
116  //- Construct from origin and 2 axes
118  (
119  const word& name,
120  const point& origin,
121  const vector& axis,
122  const vector& dirn
123  );
124 
125  //- Construct from dictionary
126  cartesianCS(const word&, const dictionary&);
127 
128 
129  //- Construct from dictionary and objectRegistry
130  cartesianCS(const objectRegistry&, const dictionary&);
131 
132 
133  //- Destructor
134  virtual ~cartesianCS();
135 
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Base class for other coordinate system specifications.
cartesianCS()
Construct null.
Definition: cartesianCS.C:43
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:137
const word & name() const
Return name.
virtual vector globalToLocal(const vector &, bool translate) const
Convert from global Cartesian system to the local coordinate system.
Definition: cartesianCS.C:141
const point & origin() const
Return origin.
A class for handling words, derived from string.
Definition: word.H:59
TypeName("cartesian")
Runtime type information.
Cylindrical coordinate system.
Definition: cartesianCS.H:49
virtual vector localToGlobal(const vector &, bool translate) const
Convert from local coordinate system to the global Cartesian system.
Definition: cartesianCS.C:121
virtual ~cartesianCS()
Destructor.
Definition: cartesianCS.C:113
A class for managing temporary objects.
Definition: PtrList.H:53
Registry of regIOobjects.
Namespace for OpenFOAM.