initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / fvMotionSolver / fvMotionSolvers / displacement / SBRStress / displacementSBRStressFvMotionSolver.H
blob766025cf8609043c7c582baa8c1a1120a68b7b71
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::displacementSBRStressFvMotionSolver
28 Description
29     Mesh motion solver for an fvMesh.  Based on solving the cell-centre
30     solid-body rotation stress equations for the motion displacement.
32 SourceFiles
33     displacementSBRStressFvMotionSolver.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef displacementSBRStressFvMotionSolver_H
38 #define displacementSBRStressFvMotionSolver_H
40 #include "displacementFvMotionSolver.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward class declarations
48 class motionDiffusivity;
50 /*---------------------------------------------------------------------------*\
51              Class displacementSBRStressFvMotionSolver Declaration
52 \*---------------------------------------------------------------------------*/
54 class displacementSBRStressFvMotionSolver
56     public displacementFvMotionSolver
58     // Private data
60         //- Point motion field
61         mutable pointVectorField pointDisplacement_;
63         //- Cell-centre motion field
64         mutable volVectorField cellDisplacement_;
66         //- Diffusivity used to control the motion
67         autoPtr<motionDiffusivity> diffusivityPtr_;
70     // Private Member Functions
72         //- Disallow default bitwise copy construct
73         displacementSBRStressFvMotionSolver
74         (
75             const displacementSBRStressFvMotionSolver&
76         );
78         //- Disallow default bitwise assignment
79         void operator=(const displacementSBRStressFvMotionSolver&);
82 public:
84     //- Runtime type information
85     TypeName("displacementSBRStress");
88     // Constructors
90         //- Construct from polyMesh and data stream
91         displacementSBRStressFvMotionSolver
92         (
93             const polyMesh&,
94             Istream& msDataUnused
95         );
98     // Destructor
100         ~displacementSBRStressFvMotionSolver();
103     // Member Functions
105         //- Return reference to the point motion displacement field
106         pointVectorField& pointDisplacement()
107         {
108             return pointDisplacement_;
109         }
111         //- Return const reference to the point motion displacement field
112         const pointVectorField& pointDisplacement() const
113         {
114             return pointDisplacement_;
115         }
117         //- Return reference to the cell motion displacement field
118         volVectorField& cellDisplacement()
119         {
120             return cellDisplacement_;
121         }
123         //- Return const reference to the cell motion displacement field
124         const volVectorField& cellDisplacement() const
125         {
126             return cellDisplacement_;
127         }
129         //- Return point location obtained from the current motion field
130         virtual tmp<pointField> curPoints() const;
132         //- Solve for motion
133         virtual void solve();
135         //- Update topology
136         virtual void updateMesh(const mapPolyMesh&);
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //