1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Virtual base class for mesh motion solver.
34 \*---------------------------------------------------------------------------*/
36 #ifndef motionSolver_H
37 #define motionSolver_H
39 #include "IOdictionary.H"
40 #include "pointField.H"
41 #include "twoDPointCorrector.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 // Forward class declarations
52 /*---------------------------------------------------------------------------*\
53 Class motionSolver Declaration
54 \*---------------------------------------------------------------------------*/
65 const polyMesh& mesh_;
67 //- 2-D motion corrector pointer
68 twoDPointCorrector twoDPointCorrector_;
73 //- Runtime type information
74 TypeName("motionSolver");
77 // Declare run-time constructor selection tables
79 declareRunTimeSelectionTable
84 (const polyMesh& mesh, Istream& msData),
91 //- Select constructed from polyMesh
92 static autoPtr<motionSolver> New(const polyMesh& mesh);
97 //- Construct from polyMesh
98 motionSolver(const polyMesh& mesh);
103 virtual ~motionSolver();
108 //- Return reference to mesh
109 const polyMesh& mesh() const
114 //- Provide new points for motion. Solves for motion
115 virtual tmp<pointField> newPoints();
117 //- Provide current points for motion. Uses current motion field
118 virtual tmp<pointField> curPoints() const = 0;
120 virtual void twoDCorrectPoints(pointField&) const;
123 virtual void solve() = 0;
126 virtual void updateMesh(const mapPolyMesh&) = 0;
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 // ************************************************************************* //