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

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