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

solidBodyMotionFunction.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 Namespace
00025     Foam::solidBodyMotionFunctions
00026 
00027 Description
00028     Namespace for solid-body motions
00029 
00030 
00031 Class
00032     Foam::solidBodyMotionFunction
00033 
00034 Description
00035     Base class for defining solid-body motions
00036 
00037 SourceFiles
00038     solidBodyMotionFunction.C
00039     newDynamicFvMesh.C
00040 
00041 \*---------------------------------------------------------------------------*/
00042 
00043 #ifndef solidBodyMotionFunction_H
00044 #define solidBodyMotionFunction_H
00045 
00046 #include <OpenFOAM/Time.H>
00047 #include <OpenFOAM/dictionary.H>
00048 #include <OpenFOAM/septernion.H>
00049 #include <OpenFOAM/autoPtr.H>
00050 #include <OpenFOAM/runTimeSelectionTables.H>
00051 
00052 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00053 
00054 namespace Foam
00055 {
00056 
00057 /*---------------------------------------------------------------------------*\
00058                            Class solidBodyMotionFunction Declaration
00059 \*---------------------------------------------------------------------------*/
00060 
00061 class solidBodyMotionFunction
00062 {
00063 protected:
00064 
00065     // Protected data
00066 
00067         dictionary SBMFCoeffs_;
00068         const Time& time_;
00069 
00070 
00071 private:
00072 
00073     // Private Member Functions
00074 
00075         //- Disallow default bitwise copy construct
00076         solidBodyMotionFunction(const solidBodyMotionFunction&);
00077 
00078         //- Disallow default bitwise assignment
00079         void operator=(const solidBodyMotionFunction&);
00080 
00081 
00082 public:
00083 
00084     //- Runtime type information
00085     TypeName("solidBodyMotionFunction");
00086 
00087 
00088     // Declare run-time constructor selection table
00089 
00090         declareRunTimeSelectionTable
00091         (
00092             autoPtr,
00093             solidBodyMotionFunction,
00094             dictionary,
00095             (const dictionary& SBMFCoeffs, const Time& runTime),
00096             (SBMFCoeffs, runTime)
00097         );
00098 
00099 
00100     // Constructors
00101 
00102         //- Construct from the SBMFCoeffs dictionary and Time
00103         solidBodyMotionFunction
00104         (
00105             const dictionary& SBMFCoeffs,
00106             const Time& runTime
00107         );
00108 
00109 
00110     // Selectors
00111 
00112         //- Select constructed from the SBMFCoeffs dictionary and Time
00113         static autoPtr<solidBodyMotionFunction> New
00114         (
00115             const dictionary& SBMFCoeffs,
00116             const Time& runTime
00117         );
00118 
00119 
00120     // Destructor
00121 
00122         virtual ~solidBodyMotionFunction();
00123 
00124 
00125     // Member Functions
00126 
00127         //- Return the solid-body motion transformation septernion
00128         virtual septernion transformation() const = 0;
00129 
00130         //- Update properties from given dictionary
00131         virtual bool read(const dictionary& SBMFCoeffs) = 0;
00132 };
00133 
00134 
00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00136 
00137 } // End namespace Foam
00138 
00139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00140 
00141 #endif
00142 
00143 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines