Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / finiteVolume / interpolation / volPointInterpolation / volPointInterpolation.H
blobc9510e2d2d70e68c45081f26e55140bd5b14f1c0
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
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 "MeshObject.H"
41 #include "pointPatchInterpolation.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 class fvMesh;
49 class pointMesh;
51 /*---------------------------------------------------------------------------*\
52                        Class volPointInterpolation Declaration
53 \*---------------------------------------------------------------------------*/
55 class volPointInterpolation
57     public MeshObject<fvMesh, volPointInterpolation>
59     // Private data
61         //- Boundary interpolation engine
62         pointPatchInterpolation boundaryInterpolator_;
64         //- Interpolation scheme weighting factor array
65         //  Updated for MeshObject.  HJ, 30/Aug/2010
66         mutable scalarListList pointWeights_;
69     // Private member functions
71         //- Construct point weighting factors
72         void makeWeights() const;
74         //- Disallow default bitwise copy construct
75         volPointInterpolation(const volPointInterpolation&);
77         //- Disallow default bitwise assignment
78         void operator=(const volPointInterpolation&);
81 public:
83     // Declare name of the class and its debug switch
84     ClassName("volPointInterpolation");
87     // Constructors
89         //- Constructor given fvMesh and pointMesh.
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 // ************************************************************************* //