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/>.
25 edgeCorrectedVolPointInterpolation
28 Volume-to-point interpolation class which introduces the
29 correction for the points shared between the patches. This is
30 done by gradient-based extrapolation into the vertices from the
31 boundary faces around them using inverse-distance weighting. This
32 kind of interpolation is useful when trying to use the volume
33 field as a basis of the mesh motion.
36 edgeCorrectedVolPointInterpolation.C
37 edgeCorrectedVolPointInterpolate.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef edgeCorrectedVolPointInterpolation_H
42 #define edgeCorrectedVolPointInterpolation_H
44 #include "volPointInterpolation.H"
45 #include "vectorList.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class edgeCorrectedVolPointInterpolation Declaration
54 \*---------------------------------------------------------------------------*/
56 class edgeCorrectedVolPointInterpolation
58 public volPointInterpolation
62 //- Extrapolation vectors
63 mutable vectorListList extrapolationVectors_;
66 // Private Member Functions
68 //- Disallow default bitwise copy construct
69 edgeCorrectedVolPointInterpolation
71 const edgeCorrectedVolPointInterpolation&
74 //- Disallow default bitwise assignment
75 void operator=(const edgeCorrectedVolPointInterpolation&);
78 //- Construct extrapolation vectors
79 void makeExtrapolationVectors() const;
86 //- Constructor given fvMesh and pointMesh.
87 edgeCorrectedVolPointInterpolation(const fvMesh&, const pointMesh&);
92 virtual ~edgeCorrectedVolPointInterpolation();
97 //- Update mesh topology using the morph engine
98 virtual void updateMesh();
100 //- Correct weighting factors for moving mesh.
101 virtual bool movePoints();
104 // Interpolation functions
106 //- Interpolate from volField to pointField
107 // using inverse distance weighting with boundary correction
108 // given the field and its gradient
112 const GeometricField<Type, fvPatchField, volMesh>&,
115 typename outerProduct<vector, Type>::type,
119 GeometricField<Type, pointPatchField, pointMesh>&
122 //- Interpolate volField returning pointField
123 // using inverse distance weighting with boundary correction
124 // given the field and its gradient
126 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
128 const GeometricField<Type, fvPatchField, volMesh>&,
131 typename outerProduct<vector, Type>::type,
137 //- Interpolate tmp<volField> returning pointField
138 // using inverse distance weighting with boundary correction
139 // given the field and its gradient
141 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
143 const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
146 typename outerProduct<vector, Type>::type,
153 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
155 const GeometricField<Type, fvPatchField, volMesh>&,
156 const tmp<GeometricField
158 typename outerProduct<vector, Type>::type,
165 tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
167 const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
168 const tmp<GeometricField
170 typename outerProduct<vector, Type>::type,
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 } // End namespace Foam
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 #include "edgeCorrectedVolPointInterpolate.C"
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 // ************************************************************************* //