cartesianCS.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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 \*---------------------------------------------------------------------------*/
25 
26 #include "cartesianCS.H"
27 
28 #include "one.H"
29 #include "mathematicalConstants.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(cartesianCS, 0);
37  addToRunTimeSelectionTable(coordinateSystem, cartesianCS, dictionary);
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
46 {}
47 
48 
50 (
51  const coordinateSystem& cs
52 )
53 :
55 {}
56 
57 
59 (
60  const word& name,
61  const coordinateSystem& cs
62 )
63 :
64  coordinateSystem(name, cs)
65 {}
66 
67 
69 (
70  const word& name,
71  const point& origin,
72  const coordinateRotation& cr
73 )
74 :
75  coordinateSystem(name, origin, cr)
76 {}
77 
78 
80 (
81  const word& name,
82  const point& origin,
83  const vector& axis,
84  const vector& dirn
85 )
86 :
87  coordinateSystem(name, origin, axis, dirn)
88 {}
89 
90 
92 (
93  const word& name,
94  const dictionary& dict
95 )
96 :
97  coordinateSystem(name, dict)
98 {}
99 
100 
102 (
103  const objectRegistry& obr,
104  const dictionary& dict
105 )
106 :
107  coordinateSystem(obr, dict)
108 {}
109 
110 
111 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
112 
114 {}
115 
116 
117 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
118 
119 
121 (
122  const vector& local,
123  bool translate
124 ) const
125 {
126  return coordinateSystem::localToGlobal(local, translate);
127 }
128 
129 
131 (
132  const vectorField& local,
133  bool translate
134 ) const
135 {
136  return coordinateSystem::localToGlobal(local, translate);
137 }
138 
139 
141 (
142  const vector& global,
143  bool translate
144 ) const
145 {
146  return coordinateSystem::globalToLocal(global, translate);
147 }
148 
149 
151 (
152  const vectorField& global,
153  bool translate
154 ) const
155 {
156  return coordinateSystem::globalToLocal(global, translate);
157 }
158 
159 
160 // ************************************************************************* //
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:158
virtual vector globalToLocal(const vector &, bool translate) const
Convert from global Cartesian system to the local coordinate system.
Definition: cartesianCS.C:141
virtual vector localToGlobal(const vector &, bool translate) const
Convert from local coordinate system to the global Cartesian system.
Macros for easy insertion into run-time selection tables.
coordinateSystem()
Construct null. This is equivalent to an identity coordinateSystem.
A class for handling words, derived from string.
Definition: word.H:59
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual vector globalToLocal(const vector &, bool translate) const
Convert from global Cartesian system to the local coordinate system.
defineTypeNameAndDebug(combustionModel, 0)
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.