1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Virtual base class for mesh motion solver.
33 \*---------------------------------------------------------------------------*/
35 #ifndef motionSolver_H
36 #define motionSolver_H
38 #include "IOdictionary.H"
39 #include "pointField.H"
40 #include "twoDPointCorrector.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 // Forward class declarations
51 /*---------------------------------------------------------------------------*\
52 Class motionSolver Declaration
53 \*---------------------------------------------------------------------------*/
64 const polyMesh& mesh_;
66 //- 2-D motion corrector pointer
67 twoDPointCorrector twoDPointCorrector_;
72 //- Runtime type information
73 TypeName("motionSolver");
76 // Declare run-time constructor selection tables
78 declareRunTimeSelectionTable
83 (const polyMesh& mesh, Istream& msData),
90 //- Select constructed from polyMesh
91 static autoPtr<motionSolver> New(const polyMesh& mesh);
96 //- Construct from polyMesh
97 motionSolver(const polyMesh& mesh);
101 virtual ~motionSolver();
106 //- Return reference to mesh
107 const polyMesh& mesh() const
112 //- Provide new points for motion. Solves for motion
113 virtual tmp<pointField> newPoints();
115 //- Provide current points for motion. Uses current motion field
116 virtual tmp<pointField> curPoints() const = 0;
118 virtual void twoDCorrectPoints(pointField&) const;
121 virtual void solve() = 0;
124 virtual void updateMesh(const mapPolyMesh&) = 0;
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace Foam
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 // ************************************************************************* //