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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2013 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::coordSystem::cartesian
29 
30 Description
31  A Cartesian coordinate system
32 
33  \heading Dictionary entries
34  \table
35  Property | Description | Required | Default
36  type | Type name: cartesian | yes |
37  \endtable
38 
39 SourceFiles
40  cartesianCS.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef cartesianCS_H
45 #define cartesianCS_H
46 
47 #include "coordinateSystem.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace coordSystem
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class coordSystem::cartesian Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class cartesian
61 :
62  public coordinateSystem
63 {
64 public:
65 
66  //- Runtime type information
67  TypeNameNoDebug("cartesian");
68 
69 
70  // Static Members
71 
72  //- Global (identity) cartesian coordinate system
73  static const cartesian null;
74 
75 
76  // Constructors
77 
78  //- Default construct. This is an identity coordinate system
79  cartesian();
80 
81  //- Copy construct
82  cartesian(const cartesian& csys) = default;
83 
84  //- Move construct
85  cartesian(cartesian&& csys) = default;
86 
87  //- Copy construct from another coordinateSystem type
88  explicit cartesian(const coordinateSystem& csys);
89 
90  //- Move construct from another coordinateSystem type
91  explicit cartesian(coordinateSystem&& csys);
92 
93  //- Move construct from autoPtr of another coordinateSystem type
94  explicit cartesian(autoPtr<coordinateSystem>&& csys);
95 
96  //- Copy construct from rotation with origin=0
97  explicit cartesian(const coordinateRotation& crot);
98 
99  //- Move construct from rotation with origin=0
100  explicit cartesian(coordinateRotation&& crot);
101 
102  //- Construct from origin and rotation
103  cartesian(const point& origin, const coordinateRotation& crot);
104 
105  //- Construct from origin and 2 axes
106  cartesian
107  (
108  const point& origin,
109  const vector& axis,
110  const vector& dirn
111  );
112 
113  //- Construct from origin and 2 axes
114  cartesian
115  (
116  const word& name,
117  const point& origin,
118  const vector& axis,
119  const vector& dirn
120  );
121 
122  //- Construct from dictionary with a given name
123  cartesian(const word& name, const dictionary& dict);
124 
125  //- Construct from dictionary without a name
126  explicit cartesian(const dictionary& dict);
127 
128  //- Construct from dictionary with optional subDict lookup.
129  //
130  // \param dictName If non-empty, the sub-dictionary to use.
131  cartesian(const dictionary& dict, const word& dictName);
132 
133  //- Return clone
134  virtual autoPtr<coordinateSystem> clone() const
135  {
137  }
138 
139 
140  //- Destructor
141  virtual ~cartesian() = default;
142 
143 
144  // Member Operators
145 
146  //- Copy assignment
147  cartesian& operator=(const cartesian&) = default;
148 
149  //- Move assignment
150  cartesian& operator=(cartesian&&) = default;
151 
152  //- Copy/move assignment from coordinateSystem, autoPtr
153  using coordinateSystem::operator=;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace coordSystem
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 //- Compatibility typedef 1806
165 
166 } // End namespace Foam
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::coordSystem::cartesian::operator=
cartesian & operator=(const cartesian &)=default
Copy assignment.
Foam::coordSystem::cartesian::cartesian
cartesian()
Default construct. This is an identity coordinate system.
Definition: cartesianCS.C:49
Foam::coordSystem::cartesian::clone
virtual autoPtr< coordinateSystem > clone() const
Return clone.
Definition: cartesianCS.H:143
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::coordSystem::cartesian::TypeNameNoDebug
TypeNameNoDebug("cartesian")
Runtime type information.
Foam::coordinateSystem::name
virtual const word & name() const
Return the name.
Definition: coordinateSystem.H:457
dictName
const word dictName("faMeshDefinition")
coordinateSystem.H
Foam::cartesianCS
coordSystem::cartesian cartesianCS
Compatibility typedef 1806.
Definition: cartesianCS.H:173
Foam::coordinateSystem::origin
virtual const point & origin() const
Return origin.
Definition: coordinateSystem.H:469
Foam::coordinateRotation
User specification of a coordinate rotation.
Definition: coordinateRotation.H:78
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
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::coordSystem::cartesian
A Cartesian coordinate system.
Definition: cartesianCS.H:69
Foam::Vector< scalar >
Foam::coordSystem::cartesian::~cartesian
virtual ~cartesian()=default
Destructor.
Foam::coordinateSystem
Base class for coordinate system specification, the default coordinate system type is cartesian .
Definition: coordinateSystem.H:132