initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / fvMotionSolver / fvMotionSolvers / velocity / laplacian / velocityLaplacianFvMotionSolver.H
blob2699e95d32fb2d56a62c82900d819bda5117f4af
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::velocityLaplacianFvMotionSolver
28 Description
29     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
30     Laplacian for the motion velocity.
32 SourceFiles
33     velocityLaplacianFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef velocityLaplacianFvMotionSolver_H
38 #define velocityLaplacianFvMotionSolver_H
40 #include "fvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51               Class velocityLaplacianFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class velocityLaplacianFvMotionSolver
56     public fvMotionSolver
58     // Private data
60         //- Point motion field
61         mutable pointVectorField pointMotionU_;
63         //- Cell-centre motion field
64         mutable volVectorField cellMotionU_;
66         //- Diffusivity used to control the motion
67         autoPtr<motionDiffusivity> diffusivityPtr_;
70     // Private Member Functions
72         //- Disallow default bitwise copy construct
73         velocityLaplacianFvMotionSolver
74         (
75             const velocityLaplacianFvMotionSolver&
76         );
78         //- Disallow default bitwise assignment
79         void operator=(const velocityLaplacianFvMotionSolver&);
82 public:
84     //- Runtime type information
85     TypeName("velocityLaplacian");
88     // Constructors
90         //- Construct from polyMesh and data stream
91         velocityLaplacianFvMotionSolver(const polyMesh& mesh, Istream& msData);
94     // Destructor
96         ~velocityLaplacianFvMotionSolver();
99     // Member Functions
101         //- Return reference to the point motion velocity field
102         pointVectorField& pointMotionU()
103         {
104             return pointMotionU_;
105         }
107         //- Return const reference to the point motion velocity field
108         const pointVectorField& pointMotionU() const
109         {
110             return pointMotionU_;
111         }
113         //- Return reference to the cell motion velocity field
114         volVectorField& cellMotionU()
115         {
116             return cellMotionU_;
117         }
119         //- Return const reference to the cell motion velocity field
120         const volVectorField& cellMotionU() const
121         {
122             return cellMotionU_;
123         }
125         //- Return point location obtained from the current motion field
126         virtual tmp<pointField> curPoints() const;
128         //- Solve for motion
129         virtual void solve();
131         //- Update topology
132         virtual void updateMesh(const mapPolyMesh&);
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 } // End namespace Foam
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 #endif
144 // ************************************************************************* //