1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "parabolicCylindricalCS.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 defineTypeNameAndDebug(parabolicCylindricalCS, 0);
34 addToRunTimeSelectionTable
37 parabolicCylindricalCS,
43 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45 Foam::parabolicCylindricalCS::parabolicCylindricalCS()
51 Foam::parabolicCylindricalCS::parabolicCylindricalCS
55 const coordinateRotation& cr
58 coordinateSystem(name, origin, cr)
62 Foam::parabolicCylindricalCS::parabolicCylindricalCS
65 const dictionary& dict
68 coordinateSystem(name, dict)
72 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 Foam::vector Foam::parabolicCylindricalCS::localToGlobal
80 // Notation: u = local.x() v = local.y() z = local.z();
85 "parabolicCylindricalCS::localToGlobal(const vector&, bool) const"
87 << "parabolic cylindrical coordinates v < 0"
91 return coordinateSystem::localToGlobal
95 0.5*(sqr(local.x()) - sqr(local.y())),
104 Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::localToGlobal
106 const vectorField& local,
110 if (min(local.component(vector::Y)) < 0.0)
114 "parabolicCylindricalCS::localToGlobal"
115 "(const vectorField&, bool) const"
116 ) << "parabolic cylindrical coordinates v < 0"
117 << abort(FatalError);
120 vectorField lc(local.size());
126 sqr(local.component(vector::X))
127 - sqr(local.component(vector::Y))
134 local.component(vector::X) * local.component(vector::Y)
140 local.component(vector::Z)
143 return coordinateSystem::localToGlobal(lc, translate);
147 Foam::vector Foam::parabolicCylindricalCS::globalToLocal
149 const vector& global,
155 "parabolicCylindricalCS::globalToLocal(const vector&, bool) const"
162 Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::globalToLocal
164 const vectorField& global,
170 "parabolicCylindricalCS::globalToLocal(const vectorField&, bool) const"
173 return tmp<vectorField>(vectorField::null());
177 // ************************************************************************* //