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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::coordSystem::cartesian
29
30Description
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
39SourceFiles
40 cartesianCS.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef Foam_cartesianCS_H
45#define Foam_cartesianCS_H
46
47#include "coordinateSystem.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53namespace coordSystem
54{
55
56/*---------------------------------------------------------------------------*\
57 Class coordSystem::cartesian Declaration
58\*---------------------------------------------------------------------------*/
59
60class cartesian
61:
62 public coordinateSystem
63{
64public:
65
66 //- Runtime type information
67 TypeNameNoDebug("cartesian");
68
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
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
107 (
108 const point& origin,
109 const vector& axis,
110 const vector& dirn
111 );
112
113 //- Construct from origin and 2 axes
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
144 // Member Operators
145
146 //- Copy assignment
147 cartesian& operator=(const cartesian&) = default;
148
149 //- Move assignment
151
152 //- Copy/move assignment from coordinateSystem, autoPtr
154};
155
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// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A Cartesian coordinate system.
Definition: cartesianCS.H:72
virtual ~cartesian()=default
Destructor.
TypeNameNoDebug("cartesian")
Runtime type information.
cartesian(const cartesian &csys)=default
Copy construct.
cartesian()
Default construct. This is an identity coordinate system.
Definition: cartesianCS.C:49
static const cartesian null
Global (identity) cartesian coordinate system.
Definition: cartesianCS.H:82
cartesian & operator=(const cartesian &)=default
Copy assignment.
virtual autoPtr< coordinateSystem > clone() const
Return clone.
Definition: cartesianCS.H:143
cartesian(cartesian &&csys)=default
Move construct.
cartesian(coordinateRotation &&crot)
Move construct from rotation with origin=0.
cartesian & operator=(cartesian &&)=default
Move assignment.
User specification of a coordinate rotation.
Base class for coordinate system specification, the default coordinate system type is cartesian .
virtual const word & name() const
Return the name.
virtual const point & origin() const
Return origin.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A class for handling words, derived from Foam::string.
Definition: word.H:68
const word dictName("faMeshDefinition")
Namespace for OpenFOAM.
coordSystem::cartesian cartesianCS
Compatibility typedef 1806.
Definition: cartesianCS.H:173
dictionary dict
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition: typeInfo.H:68