|
|
|
motionSolver.HGo 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::motionSolver 00027 00028 Description 00029 Virtual base class for mesh motion solver. 00030 00031 SourceFiles 00032 motionSolver.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef motionSolver_H 00037 #define motionSolver_H 00038 00039 #include "IOdictionary.H" 00040 #include "pointField.H" 00041 #include "twoDPointCorrector.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 // Forward class declarations 00049 class polyMesh; 00050 class mapPolyMesh; 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class motionSolver Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class motionSolver 00057 : 00058 public IOdictionary 00059 { 00060 private: 00061 00062 // Private data 00063 00064 //- Reference to mesh 00065 const polyMesh& mesh_; 00066 00067 //- 2-D motion corrector pointer 00068 twoDPointCorrector twoDPointCorrector_; 00069 00070 00071 public: 00072 00073 //- Runtime type information 00074 TypeName("motionSolver"); 00075 00076 00077 // Declare run-time constructor selection tables 00078 00079 declareRunTimeSelectionTable 00080 ( 00081 autoPtr, 00082 motionSolver, 00083 dictionary, 00084 (const polyMesh& mesh, Istream& msData), 00085 (mesh, msData) 00086 ); 00087 00088 00089 // Selectors 00090 00091 //- Select constructed from polyMesh 00092 static autoPtr<motionSolver> New(const polyMesh& mesh); 00093 00094 00095 // Constructors 00096 00097 //- Construct from polyMesh 00098 motionSolver(const polyMesh& mesh); 00099 00100 00101 // Destructor 00102 00103 virtual ~motionSolver(); 00104 00105 00106 // Member Functions 00107 00108 //- Return reference to mesh 00109 const polyMesh& mesh() const 00110 { 00111 return mesh_; 00112 } 00113 00114 //- Provide new points for motion. Solves for motion 00115 virtual tmp<pointField> newPoints(); 00116 00117 //- Provide current points for motion. Uses current motion field 00118 virtual tmp<pointField> curPoints() const = 0; 00119 00120 virtual void twoDCorrectPoints(pointField&) const; 00121 00122 //- Solve for motion 00123 virtual void solve() = 0; 00124 00125 //- Update topology 00126 virtual void updateMesh(const mapPolyMesh&) = 0; 00127 }; 00128 00129 00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00131 00132 } // End namespace Foam 00133 00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00135 00136 #endif 00137 00138 // ************************************************************************* // |