1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "parabolicCylindricalCS.H"
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 defineTypeNameAndDebug(parabolicCylindricalCS, 0);
35 addToRunTimeSelectionTable
38 parabolicCylindricalCS,
44 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
46 Foam::parabolicCylindricalCS::parabolicCylindricalCS()
52 Foam::parabolicCylindricalCS::parabolicCylindricalCS
56 const coordinateRotation& cr
59 coordinateSystem(name, origin, cr)
63 Foam::parabolicCylindricalCS::parabolicCylindricalCS
66 const dictionary& dict
69 coordinateSystem(name, dict)
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
75 Foam::vector Foam::parabolicCylindricalCS::localToGlobal
81 // Notation: u = local.x() v = local.y() z = local.z();
86 "parabolicCylindricalCS::localToGlobal(const vector&, bool) const"
88 << "parabolic cylindrical coordinates v < 0"
92 return coordinateSystem::localToGlobal
96 0.5*(sqr(local.x()) - sqr(local.y())),
105 Foam::tmp<Foam::vectorField> Foam::parabolicCylindricalCS::localToGlobal
107 const vectorField& local,
111 if (min(local.component(vector::Y)) < 0.0)
115 "parabolicCylindricalCS::localToGlobal"
116 "(const vectorField&, bool) const"
117 ) << "parabolic cylindrical coordinates v < 0"
118 << abort(FatalError);
121 vectorField lc(local.size());
127 sqr(local.component(vector::X))
128 - sqr(local.component(vector::Y))
135 local.component(vector::X) * local.component(vector::Y)
141 local.component(vector::Z)
144 return coordinateSystem::localToGlobal(lc, translate);
148 Foam::vector Foam::parabolicCylindricalCS::globalToLocal
150 const vector& global,
156 "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 // ************************************************************************* //