initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / finiteVolume / interpolation / volPointInterpolation / volPointInterpolation.H
blob2072adf559f801816d1de84d3491e5160f98ce5a
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::volPointInterpolation
28 Description
29     Foam::volPointInterpolation
31 SourceFiles
32     volPointInterpolation.C
33     volPointInterpolate.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef volPointInterpolation_H
38 #define volPointInterpolation_H
40 #include "pointPatchInterpolation.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 class fvMesh;
48 class pointMesh;
50 /*---------------------------------------------------------------------------*\
51                        Class volPointInterpolation Declaration
52 \*---------------------------------------------------------------------------*/
54 class volPointInterpolation
56     // Private data
58         //- Boundary interpolation engine.
59         pointPatchInterpolation boundaryInterpolator_;
61         //- Interpolation scheme weighting factor array.
62         scalarListList pointWeights_;
65     // Private member functions
67         //- Construct point weighting factors
68         void makeWeights();
70         //- Disallow default bitwise copy construct
71         volPointInterpolation(const volPointInterpolation&);
73         //- Disallow default bitwise assignment
74         void operator=(const volPointInterpolation&);
77 public:
79     // Declare name of the class and its debug switch
80     ClassName("volPointInterpolation");
83     // Constructors
85         //- Constructor given fvMesh and pointMesh.
86         volPointInterpolation(const fvMesh&, const pointMesh&);
89     // Destructor
91         ~volPointInterpolation();
94     // Member functions
96         // Access
98             const fvMesh& mesh() const
99             {
100                 return boundaryInterpolator_.mesh();
101             }
103             const pointMesh& pMesh() const
104             {
105                 return boundaryInterpolator_.pMesh();
106             }
109         // Edit
111             //- Update mesh topology using the morph engine
112             void updateMesh();
114             //- Correct weighting factors for moving mesh.
115             bool movePoints();
118     // Interpolation functions
120         //- Interpolate internal field from volField to pointField
121         //  using inverse distance weighting
122         template<class Type>
123         void interpolateInternalField
124         (
125             const GeometricField<Type, fvPatchField, volMesh>&,
126             GeometricField<Type, pointPatchField, pointMesh>&
127         ) const;
129         //- Interpolate from volField to pointField
130         //  using inverse distance weighting
131         template<class Type>
132         void interpolate
133         (
134             const GeometricField<Type, fvPatchField, volMesh>&,
135             GeometricField<Type, pointPatchField, pointMesh>&
136         ) const;
138         //- Interpolate volField using inverse distance weighting
139         //  returning pointField with the same patchField types
140         template<class Type>
141         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
142         (
143             const GeometricField<Type, fvPatchField, volMesh>&,
144             const wordList& patchFieldTypes
145         ) const;
147         //- Interpolate tmp<volField> using inverse distance weighting
148         //  returning pointField with the same patchField types
149         template<class Type>
150         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
151         (
152             const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
153             const wordList& patchFieldTypes
154         ) const;
156         //- Interpolate volField using inverse distance weighting 
157         //  returning pointField
158         template<class Type>
159         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
160         (
161             const GeometricField<Type, fvPatchField, volMesh>&
162         ) const;
164         //- Interpolate tmp<volField> using inverse distance weighting 
165         //  returning pointField
166         template<class Type>
167         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
168         (
169             const tmp<GeometricField<Type, fvPatchField, volMesh> >&
170         ) const;
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 } // End namespace Foam
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 #ifdef NoRepository
181 #   include "volPointInterpolate.C"
182 #endif
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 #endif
188 // ************************************************************************* //