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-2019 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  //- Construct null. This is an identity coordinateSystem.
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  //- Construct from origin and rotation
97  cartesian(const point& origin, const coordinateRotation& crot);
98 
99  //- Construct from origin and 2 axes
100  cartesian
101  (
102  const point& origin,
103  const vector& axis,
104  const vector& dirn
105  );
106 
107  //- Construct from origin and 2 axes
108  cartesian
109  (
110  const word& name,
111  const point& origin,
112  const vector& axis,
113  const vector& dirn
114  );
115 
116  //- Construct from dictionary with a given name
117  cartesian(const word& name, const dictionary& dict);
118 
119  //- Construct from dictionary without a name
120  explicit cartesian(const dictionary& dict);
121 
122  //- Construct from dictionary with optional subDict lookup.
123  //
124  // \param dictName If non-empty, the sub-dictionary to use.
125  cartesian(const dictionary& dict, const word& dictName);
126 
127  //- Return clone
128  virtual autoPtr<coordinateSystem> clone() const
129  {
131  }
132 
133 
134  //- Destructor
135  virtual ~cartesian() = default;
136 
137 
138  // Member Operators
139 
140  //- Copy assignment
141  cartesian& operator=(const cartesian&) = default;
142 
143  //- Move assignment
144  cartesian& operator=(cartesian&&) = default;
145 
146  //- Copy/move assignment from coordinateSystem, autoPtr
147  using coordinateSystem::operator=;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace coordSystem
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 //- Compatibility typedef 1806
159 
160 
161 } // End namespace Foam
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
Foam::coordSystem::cartesian::operator=
cartesian & operator=(const cartesian &)=default
Copy assignment.
Foam::coordSystem::cartesian::cartesian
cartesian()
Construct null. This is an identity coordinateSystem.
Definition: cartesianCS.C:49
Foam::coordSystem::cartesian::clone
virtual autoPtr< coordinateSystem > clone() const
Return clone.
Definition: cartesianCS.H:137
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::coordSystem::cartesian::TypeNameNoDebug
TypeNameNoDebug("cartesian")
Runtime type information.
Foam::coordinateSystem::name
virtual const word & name() const
Return the name.
Definition: coordinateSystem.H:447
dictName
const word dictName("blockMeshDict")
coordinateSystem.H
Foam::cartesianCS
coordSystem::cartesian cartesianCS
Compatibility typedef 1806.
Definition: cartesianCS.H:167
Foam::coordinateSystem::origin
virtual const point & origin() const
Return origin.
Definition: coordinateSystem.H:459
Foam::coordinateRotation
User specification of a coordinate rotation.
Definition: coordinateRotation.H:77
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:121
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:122