1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
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
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
26 Foam::volPointInterpolation
29 Foam::volPointInterpolation
32 volPointInterpolation.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef volPointInterpolation_H
38 #define volPointInterpolation_H
40 #include "MeshObject.H"
41 #include "pointPatchInterpolation.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class volPointInterpolation Declaration
53 \*---------------------------------------------------------------------------*/
55 class volPointInterpolation
57 public MeshObject<fvMesh, volPointInterpolation>
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&);
83 // Declare name of the class and its debug switch
84 ClassName("volPointInterpolation");
89 //- Constructor given fvMesh and pointMesh.
90 explicit volPointInterpolation(const fvMesh&);
95 ~volPointInterpolation();
102 const fvMesh& mesh() const
104 return boundaryInterpolator_.mesh();
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
124 void interpolateInternalField
126 const GeometricField<Type, fvPatchField, volMesh>&,
127 GeometricField<Type, pointPatchField, pointMesh>&
130 //- Interpolate from volField to pointField
131 // using inverse distance weighting
135 const GeometricField<Type, fvPatchField, volMesh>&,
136 GeometricField<Type, pointPatchField, pointMesh>&
139 //- Interpolate volField using inverse distance weighting
140 // returning pointField with the same patchField types
142 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
144 const GeometricField<Type, fvPatchField, volMesh>&,
145 const wordList& patchFieldTypes
148 //- Interpolate tmp<volField> using inverse distance weighting
149 // returning pointField with the same patchField types
151 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
153 const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
154 const wordList& patchFieldTypes
157 //- Interpolate volField using inverse distance weighting
158 // returning pointField
160 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
162 const GeometricField<Type, fvPatchField, volMesh>&
165 //- Interpolate tmp<volField> using inverse distance weighting
166 // returning pointField
168 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
170 const tmp<GeometricField<Type, fvPatchField, volMesh> >&
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 } // End namespace Foam
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 # include "volPointInterpolate.C"
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 // ************************************************************************* //