OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

cylindricalCS.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::cylindricalCS
00027 
00028 Description
00029     Cylindrical coordinate system
00030 
00031 SourceFiles
00032     cylindricalCS.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef cylindricalCS_H
00037 #define cylindricalCS_H
00038 
00039 #include "coordinateSystem.H"
00040 #include "typeInfo.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                         Class cylindricalCS Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class cylindricalCS
00052 :
00053     public coordinateSystem
00054 {
00055     // Private data members
00056 
00057         //- Are angles in degrees? (default = true)
00058         bool inDegrees_;
00059 
00060 
00061 protected:
00062 
00063     // Protected Member Functions
00064 
00065         //- Convert from local coordinate system to the global Cartesian system
00066         //  with optional translation for the origin
00067         virtual vector localToGlobal(const vector&, bool translate) const;
00068 
00069         //- Convert from local coordinate system to the global Cartesian system
00070         //  with optional translation for the origin
00071         virtual tmp<vectorField> localToGlobal
00072         (
00073             const vectorField&,
00074             bool translate
00075         ) const;
00076 
00077         //- Convert from global Cartesian system to the local coordinate system
00078         //  with optional translation for the origin
00079         virtual vector globalToLocal(const vector&, bool translate) const;
00080 
00081         //- Convert from global Cartesian system to the local coordinate system
00082         //  with optional translation for the origin
00083         virtual tmp<vectorField> globalToLocal
00084         (
00085             const vectorField&,
00086             bool translate
00087         ) const;
00088 
00089 public:
00090 
00091     //- Runtime type information
00092     TypeName("cylindrical");
00093 
00094 
00095     // Constructors
00096 
00097         //- Construct null
00098         cylindricalCS(const bool inDegrees=true);
00099 
00100         //- Construct copy
00101         cylindricalCS
00102         (
00103             const coordinateSystem&,
00104             const bool inDegrees=true
00105         );
00106 
00107         //- Construct copy with a different name
00108         cylindricalCS
00109         (
00110             const word& name,
00111             const coordinateSystem&,
00112             const bool inDegrees=true
00113         );
00114 
00115         //- Construct from origin and rotation
00116         cylindricalCS
00117         (
00118             const word& name,
00119             const point& origin,
00120             const coordinateRotation&,
00121             const bool inDegrees=true
00122         );
00123 
00124         //- Construct from origin and 2 axes
00125         cylindricalCS
00126         (
00127             const word& name,
00128             const point& origin,
00129             const vector& axis,
00130             const vector& dirn,
00131             const bool inDegrees=true
00132         );
00133 
00134         //- Construct from dictionary
00135         cylindricalCS(const word& name, const dictionary&);
00136 
00137 
00138     // Member Functions
00139 
00140         //- Are angles in degrees?
00141         bool  inDegrees() const;
00142 
00143         //- Non-const access to inDegrees
00144         bool& inDegrees();
00145 
00146 };
00147 
00148 
00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00150 
00151 } // End namespace Foam
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00154 
00155 #endif
00156 
00157 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd