Loading...
Searching...
No Matches
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-2024 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:
66 //- Runtime type information
67 TypeNameNoDebug("cartesian");
68
69
70 // Static Members
71
72 //- Global (identity) cartesian coordinate system
73 static const cartesian null;
75
76 // Constructors
77
78 //- Default construct. Identity coordinate system.
79 cartesian() = default;
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);
96 //- Copy construct from rotation with origin=0
97 explicit cartesian(const coordinateRotation& crot);
98
99 //- Move construct from rotation with origin=0
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 named 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 optional
123 //- read handling for the 'origin' entry (default: MUST_READ).
124 //
125 // \note The readOrigin is downgraded to READ_IF_PRESENT
126 // if the dictionary itself is "coordinateSystem"
127 explicit cartesian
128 (
129 const dictionary& dict,
131 );
132
133 //- Construct from dictionary with optional subDict lookup and optional
134 //- read handling for the 'origin' entry (default: MUST_READ).
135 //
136 // \param dictName If non-empty, mandatory sub-dictionary to use.
137 //
138 // \note The readOrigin is downgraded to READ_IF_PRESENT
139 // if the dictionary itself is "coordinateSystem"
140 // or if a sub-dictionary is being used
142 (
143 const dictionary& dict,
144 const word& dictName,
146 );
147
148
149 //- Return clone
150 virtual autoPtr<coordinateSystem> clone() const
151 {
152 return coordinateSystem::Clone(*this);
153 }
154
155
156 //- Destructor
157 virtual ~cartesian() = default;
158
159
160 // Member Operators
161
162 //- Copy assignment
163 cartesian& operator=(const cartesian&) = default;
164
165 //- Move assignment
166 cartesian& operator=(cartesian&&) = default;
167
168 //- Copy/move assignment from coordinateSystem, autoPtr
169 using coordinateSystem::operator=;
170};
171
172
173// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175} // End namespace coordSystem
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179//- Compatibility typedef 1806
180typedef coordSystem::cartesian cartesianCS;
181
182} // End namespace Foam
183
184
185// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186
187#endif
188
189// ************************************************************************* //
readOption
Enumeration defining read preferences.
@ MUST_READ
Reading required.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A Cartesian coordinate system.
Definition cartesianCS.H:68
virtual ~cartesian()=default
Destructor.
TypeNameNoDebug("cartesian")
Runtime type information.
cartesian(const cartesian &csys)=default
Copy construct.
static const cartesian null
Global (identity) cartesian coordinate system.
Definition cartesianCS.H:82
cartesian & operator=(const cartesian &)=default
Copy assignment.
cartesian()=default
Default construct. Identity coordinate system.
virtual autoPtr< coordinateSystem > clone() const
Return clone.
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.
static autoPtr< coordinateSystem > Clone(const Derived &csys)
Clone a coordinate system.
virtual const word & name() const
Return the name.
coordinateSystem(std::nullptr_t)
Construct null, without allocating a coordinateRotation specification.
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:133
A class for handling words, derived from Foam::string.
Definition word.H:66
const word dictName("faMeshDefinition")
Namespace for coordinate systems.
Definition cartesianCS.C:30
Namespace for OpenFOAM.
coordSystem::cartesian cartesianCS
Compatibility typedef 1806.
vector point
Point is a vector.
Definition point.H:37
Vector< scalar > vector
Definition vector.H:57
dictionary dict
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition typeInfo.H:61