initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / fvMotionSolver / fvMotionSolvers / velocity / componentLaplacian / velocityComponentLaplacianFvMotionSolver.H
blobc16beca292b85edbf7b58b8dc955f740af0ca985
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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::velocityComponentLaplacianFvMotionSolver
28 Description
29     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
30     Laplacian for the given component of the motion velocity.
32 SourceFiles
33     velocityComponentLaplacianFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef velocityComponentLaplacianFvMotionSolver_H
38 #define velocityComponentLaplacianFvMotionSolver_H
40 #include "fvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51           Class velocityComponentLaplacianFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class velocityComponentLaplacianFvMotionSolver
56     public fvMotionSolver
58     // Private data
60         //- The component name to solve for
61         word cmptName_;
63         //- The component to solve for
64         direction cmpt_;
66         //- Point motion field
67         mutable pointScalarField pointMotionU_;
69         //- Cell-centre motion field
70         mutable volScalarField cellMotionU_;
72         //- Diffusivity used to control the motion
73         autoPtr<motionDiffusivity> diffusivityPtr_;
76     // Private Member Functions
78         //- Disallow default bitwise copy construct
79         velocityComponentLaplacianFvMotionSolver
80         (
81             const velocityComponentLaplacianFvMotionSolver&
82         );
84         //- Disallow default bitwise assignment
85         void operator=(const velocityComponentLaplacianFvMotionSolver&);
88 public:
90     //- Runtime type information
91     TypeName("velocityComponentLaplacian");
94     // Constructors
96         //- Construct from polyMesh and data stream (provides component)
97         velocityComponentLaplacianFvMotionSolver
98         (
99             const polyMesh&,
100             Istream& msData
101         );
104     // Destructor
106         ~velocityComponentLaplacianFvMotionSolver();
109     // Member Functions
111         //- Non-const access to the cellMotionU in order to allow changes
112         //  to the boundary motion
113         volScalarField& cellMotionU()
114         {
115             return cellMotionU_;
116         }
118         //- Return point location obtained from the current motion field
119         virtual tmp<pointField> curPoints() const;
121         //- Solve for motion
122         virtual void solve();
124         //- Update topology
125         virtual void updateMesh(const mapPolyMesh&);
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 } // End namespace Foam
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 #endif
137 // ************************************************************************* //