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-2020 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"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
34 {
37 }
38 }
39 
40 
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
42 
43 Foam::vector Foam::coordinateSystems::cartesian::localToGlobal
44 (
45  const vector& local,
46  bool translate
47 ) const
48 {
49  return coordinateSystem::localToGlobal(local, translate);
50 }
51 
52 
53 Foam::tmp<Foam::vectorField> Foam::coordinateSystems::cartesian::localToGlobal
54 (
55  const vectorField& local,
56  bool translate
57 ) const
58 {
59  return coordinateSystem::localToGlobal(local, translate);
60 }
61 
62 
63 Foam::vector Foam::coordinateSystems::cartesian::globalToLocal
64 (
65  const vector& global,
66  bool translate
67 ) const
68 {
69  return coordinateSystem::globalToLocal(global, translate);
70 }
71 
72 
73 Foam::tmp<Foam::vectorField> Foam::coordinateSystems::cartesian::globalToLocal
74 (
75  const vectorField& global,
76  bool translate
77 ) const
78 {
79  return coordinateSystem::globalToLocal(global, translate);
80 }
81 
82 
83 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
84 
86 (
87  const word& name,
88  const point& origin,
89  const coordinateRotation& cr
90 )
91 :
92  coordinateSystem(name, origin, cr)
93 {}
94 
95 
97 (
98  const word& name,
99  const point& origin,
100  const vector& axis,
101  const vector& dirn
102 )
103 :
104  coordinateSystem(name, origin, axis, dirn)
105 {}
106 
107 
109 (
110  const word& name,
111  const dictionary& dict
112 )
113 :
114  coordinateSystem(name, dict)
115 {}
116 
117 
118 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
119 
121 {}
122 
123 
124 // ************************************************************************* //
Base class for other coordinate system specifications.
defineTypeNameAndDebug(cartesian, 0)
Abstract base class for coordinate rotation.
Provides a centralised coordinateSystem collection.
cartesian(const word &name, const point &origin, const coordinateRotation &)
Construct from origin and rotation.
Definition: cartesianCS.C:86
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
addToRunTimeSelectionTable(coordinateSystem, cartesian, dictionary)
Cylindrical coordinate system.
Definition: cartesianCS.H:50
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.
A class for handling words, derived from string.
Definition: word.H:59
virtual ~cartesian()
Destructor.
Definition: cartesianCS.C:120
virtual vector globalToLocal(const vector &, bool translate) const
Convert from global Cartesian system to the local coordinate system.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.