Forward compatibility: flex
[foam-extend-3.2.git] / src / finiteVolume / interpolation / volPointInterpolation / volPointInterpolation.H
blobb975354d2ace1d8c6e0548ad288c057ecb327e98
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend 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 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::volPointInterpolation
27 Description
28     Foam::volPointInterpolation
30 SourceFiles
31     volPointInterpolation.C
32     volPointInterpolate.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef volPointInterpolation_H
37 #define volPointInterpolation_H
39 #include "MeshObject.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     public MeshObject<fvMesh, volPointInterpolation>
58     // Private data
60         //- Boundary interpolation engine
61         pointPatchInterpolation boundaryInterpolator_;
63         //- Interpolation scheme weighting factor array
64         //  Updated for MeshObject.  HJ, 30/Aug/2010
65         mutable scalarListList pointWeights_;
68     // Private member functions
70         //- Construct point weighting factors
71         void makeWeights() const;
73         //- Disallow default bitwise copy construct
74         volPointInterpolation(const volPointInterpolation&);
76         //- Disallow default bitwise assignment
77         void operator=(const volPointInterpolation&);
80 public:
82     // Declare name of the class and its debug switch
83     TypeName("volPointInterpolation");
86     // Constructors
88         //- Constructor given fvMesh.  pointMesh will be created or
89         //  looked up from objectRegistry
90         explicit volPointInterpolation(const fvMesh&);
93     // Destructor
95         ~volPointInterpolation();
98     // Member functions
100         // Access
102             const fvMesh& mesh() const
103             {
104                 return boundaryInterpolator_.mesh();
105             }
108         // Edit
110             //- Correct weighting factors for moving mesh.
111             //  Updated for MeshObject.  HJ, 30/Aug/2010
112             virtual bool movePoints() const;
114             //- Update mesh topology using the morph engine
115             //  Updated for MeshObject.  HJ, 30/Aug/2010
116             virtual bool updateMesh(const mapPolyMesh&) const;
119     // Interpolation functions
121         //- Interpolate internal field from volField to pointField
122         //  using inverse distance weighting
123         template<class Type>
124         void interpolateInternalField
125         (
126             const GeometricField<Type, fvPatchField, volMesh>&,
127             GeometricField<Type, pointPatchField, pointMesh>&
128         ) const;
130         //- Interpolate from volField to pointField
131         //  using inverse distance weighting
132         template<class Type>
133         void interpolate
134         (
135             const GeometricField<Type, fvPatchField, volMesh>&,
136             GeometricField<Type, pointPatchField, pointMesh>&
137         ) const;
139         //- Interpolate volField using inverse distance weighting
140         //  returning pointField with the same patchField types
141         template<class Type>
142         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
143         (
144             const GeometricField<Type, fvPatchField, volMesh>&,
145             const wordList& patchFieldTypes
146         ) const;
148         //- Interpolate tmp<volField> using inverse distance weighting
149         //  returning pointField with the same patchField types
150         template<class Type>
151         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
152         (
153             const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
154             const wordList& patchFieldTypes
155         ) const;
157         //- Interpolate volField using inverse distance weighting
158         //  returning pointField
159         template<class Type>
160         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
161         (
162             const GeometricField<Type, fvPatchField, volMesh>&
163         ) const;
165         //- Interpolate tmp<volField> using inverse distance weighting
166         //  returning pointField
167         template<class Type>
168         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
169         (
170             const tmp<GeometricField<Type, fvPatchField, volMesh> >&
171         ) const;
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 } // End namespace Foam
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 #ifdef NoRepository
182 #   include "volPointInterpolate.C"
183 #endif
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 #endif
189 // ************************************************************************* //