FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::cylindricalCS
00026 
00027 Description
00028     Cylindrical coordinate system
00029 
00030 SourceFiles
00031     cylindricalCS.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef cylindricalCS_H
00036 #define cylindricalCS_H
00037 
00038 #include "coordinateSystem.H"
00039 #include <OpenFOAM/typeInfo.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                         Class cylindricalCS Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 class cylindricalCS
00051 :
00052     public coordinateSystem
00053 {
00054     // Private data members
00055 
00056         //- Are angles in degrees? (default = true)
00057         bool inDegrees_;
00058 
00059 
00060 protected:
00061 
00062     // Protected Member Functions
00063 
00064         //- Convert from local coordinate system to the global Cartesian system
00065         //  with optional translation for the origin
00066         virtual vector localToGlobal(const vector&, bool translate) const;
00067 
00068         //- Convert from local coordinate system to the global Cartesian system
00069         //  with optional translation for the origin
00070         virtual tmp<vectorField> localToGlobal
00071         (
00072             const vectorField&,
00073             bool translate
00074         ) const;
00075 
00076         //- Convert from global Cartesian system to the local coordinate system
00077         //  with optional translation for the origin
00078         virtual vector globalToLocal(const vector&, bool translate) const;
00079 
00080         //- Convert from global Cartesian system to the local coordinate system
00081         //  with optional translation for the origin
00082         virtual tmp<vectorField> globalToLocal
00083         (
00084             const vectorField&,
00085             bool translate
00086         ) const;
00087 
00088 public:
00089 
00090     //- Runtime type information
00091     TypeName("cylindrical");
00092 
00093 
00094     // Constructors
00095 
00096         //- Construct null
00097         cylindricalCS(const bool inDegrees=true);
00098 
00099         //- Construct copy
00100         cylindricalCS
00101         (
00102             const coordinateSystem&,
00103             const bool inDegrees=true
00104         );
00105 
00106         //- Construct copy with a different name
00107         cylindricalCS
00108         (
00109             const word& name,
00110             const coordinateSystem&,
00111             const bool inDegrees=true
00112         );
00113 
00114         //- Construct from origin and rotation
00115         cylindricalCS
00116         (
00117             const word& name,
00118             const point& origin,
00119             const coordinateRotation&,
00120             const bool inDegrees=true
00121         );
00122 
00123         //- Construct from origin and 2 axes
00124         cylindricalCS
00125         (
00126             const word& name,
00127             const point& origin,
00128             const vector& axis,
00129             const vector& dirn,
00130             const bool inDegrees=true
00131         );
00132 
00133         //- Construct from dictionary
00134         cylindricalCS(const word& name, const dictionary&);
00135 
00136 
00137     // Member Functions
00138 
00139         //- Are angles in degrees?
00140         bool  inDegrees() const;
00141 
00142         //- Non-const access to inDegrees
00143         bool& inDegrees();
00144 
00145 };
00146 
00147 
00148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00149 
00150 } // End namespace Foam
00151 
00152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00153 
00154 #endif
00155 
00156 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines