initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / fvMotionSolver / fvMotionSolvers / displacement / interpolation / displacementInterpolationFvMotionSolver.H
blobd67886ac3c9c5f478343a7957718ca5720ea4775
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::displacementInterpolationFvMotionSolver
28 Description
29     Mesh motion solver for an fvMesh.
31     Scales inbetween motion prescribed on faceZones. Works out per point
32     the distance between the bounding face zones (in all three directions)
33     at the start and then every time step
34     - moves the faceZones based on tables
35     - interpolates the displacement of all points based on the
36       faceZone motion.
38     Tables are in the @a constant/tables directory.
40 Note
41     could be a motionSolver - does not use any fvMesh structure.
43 SourceFiles
44     displacementInterpolationFvMotionSolver.C
46 \*---------------------------------------------------------------------------*/
48 #ifndef displacementInterpolationFvMotionSolver_H
49 #define displacementInterpolationFvMotionSolver_H
51 #include "displacementFvMotionSolver.H"
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 namespace Foam
58 /*---------------------------------------------------------------------------*\
59         Class displacementInterpolationFvMotionSolver Declaration
60 \*---------------------------------------------------------------------------*/
62 class displacementInterpolationFvMotionSolver
64     public displacementFvMotionSolver
66     // Private data
68         //- Additional settings for motion solver
69         dictionary dynamicMeshCoeffs_;
72         // Face zone information (note: could pack these to only contain
73         // used zones)
75             //- Interpolation table. From faceZone to times.
76             List<scalarField> times_;
78             //- Interpolation table. From faceZone to displacements.
79             List<vectorField> displacements_;
81         // Range information.
83             //- Per direction, per range the index of the lower
84             //  faceZone
85             FixedList<labelList, 3> rangeToZone_;
87             //- Per direction, per range the points that are in it
88             FixedList<labelListList, 3> rangeToPoints_;
90             //- Per direction, per range the weight of the points relative
91             //  to this and the next range.
92             FixedList<List<scalarField>, 3> rangeToWeights_;
95     // Private Member Functions
97         //- Disallow default bitwise copy construct
98         displacementInterpolationFvMotionSolver
99         (
100             const displacementInterpolationFvMotionSolver&
101         );
103         //- Disallow default bitwise assignment
104         void operator=(const displacementInterpolationFvMotionSolver&);
107 public:
109     //- Runtime type information
110     TypeName("displacementInterpolation");
113     // Constructors
115         //- Construct from polyMesh and data stream
116         displacementInterpolationFvMotionSolver
117         (
118             const polyMesh&,
119             Istream& msDataUnused
120         );
123     // Destructor
125         ~displacementInterpolationFvMotionSolver();
128     // Member Functions
130         //- Return point location obtained from the current motion field
131         virtual tmp<pointField> curPoints() const;
133         //- Solve for motion
134         virtual void solve()
135         {}
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 } // End namespace Foam
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 #endif
147 // ************************************************************************* //