1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
30 pointVolInterpolation.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef pointVolInterpolation_H
36 #define pointVolInterpolation_H
38 #include "primitiveFieldsFwd.H"
39 #include "primitivePatchInterpolation.H"
40 #include "volFieldsFwd.H"
41 #include "pointFieldsFwd.H"
42 #include "scalarList.H"
44 #include "className.H"
45 #include "FieldFields.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class pointVolInterpolation Declaration
57 \*---------------------------------------------------------------------------*/
59 class pointVolInterpolation
63 const pointMesh& pointMesh_;
64 const fvMesh& fvMesh_;
66 //- Interpolation scheme weighting factor array.
67 mutable FieldField<Field, scalar>* volWeightsPtr_;
69 //- Primitive patch interpolators
70 mutable PtrList<primitivePatchInterpolation>* patchInterpolatorsPtr_;
73 // Private member functions
75 //- Return patch interpolators
76 const PtrList<primitivePatchInterpolation>& patchInterpolators() const;
78 //- Construct point weighting factors
79 void makeWeights() const;
82 void clearAddressing() const;
85 void clearGeom() const;
90 const pointMesh& pMesh() const
95 const fvMesh& vMesh() const
103 // Declare name of the class and it's debug switch
104 ClassName("pointVolInterpolation");
109 //- Constructor given pointMesh and fvMesh.
110 pointVolInterpolation(const pointMesh&, const fvMesh&);
115 ~pointVolInterpolation();
122 //- Return reference to weights arrays.
123 // This also constructs the weighting factors if neccessary.
124 const FieldField<Field, scalar>& volWeights() const;
129 //- Update mesh topology using the morph engine
130 void updateTopology();
132 //- Correct weighting factors for moving mesh.
136 // Interpolation functions
138 //- Interpolate from pointField to volField
139 // using inverse distance weighting
143 const GeometricField<Type, pointPatchField, pointMesh>&,
144 GeometricField<Type, fvPatchField, volMesh>&
147 //- Interpolate pointField returning volField
148 // using inverse distance weighting
150 tmp<GeometricField<Type, fvPatchField, volMesh> > interpolate
152 const GeometricField<Type, pointPatchField, pointMesh>&
155 //- Interpolate tmp<pointField> returning volField
156 // using inverse distance weighting
158 tmp<GeometricField<Type, fvPatchField, volMesh> > interpolate
160 const tmp<GeometricField<Type, pointPatchField, pointMesh> >&
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 } // End namespace Foam
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 # include "pointVolInterpolate.C"
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 // ************************************************************************* //