Forward compatibility: flex
[foam-extend-3.2.git] / src / finiteVolume / interpolation / volPointInterpolation / edgeCorrectedVolPointInterpolation / edgeCorrectedVolPointInterpolation.H
blobbd025ac9bda3ad8df52595f8ec308b1038b004ae
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     edgeCorrectedVolPointInterpolation
27 Description
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.
35 SourceFiles
36     edgeCorrectedVolPointInterpolation.C
37     edgeCorrectedVolPointInterpolate.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef edgeCorrectedVolPointInterpolation_H
42 #define edgeCorrectedVolPointInterpolation_H
44 #include "volPointInterpolation.H"
45 #include "vectorList.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 /*---------------------------------------------------------------------------*\
53               Class edgeCorrectedVolPointInterpolation Declaration
54 \*---------------------------------------------------------------------------*/
56 class edgeCorrectedVolPointInterpolation
58     public volPointInterpolation
60     // Private data
62         //- Extrapolation vectors
63         mutable vectorListList extrapolationVectors_;
66     // Private Member Functions
68         //- Disallow default bitwise copy construct
69         edgeCorrectedVolPointInterpolation
70         (
71             const edgeCorrectedVolPointInterpolation&
72         );
74         //- Disallow default bitwise assignment
75         void operator=(const edgeCorrectedVolPointInterpolation&);
78         //- Construct extrapolation vectors
79         void makeExtrapolationVectors() const;
82 public:
84     // Constructors
86         //- Constructor given fvMesh and pointMesh.
87         edgeCorrectedVolPointInterpolation(const fvMesh&, const pointMesh&);
90     // Destructor
92         virtual ~edgeCorrectedVolPointInterpolation();
95     // Member Functions
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
109         template<class Type>
110         void interpolate
111         (
112             const GeometricField<Type, fvPatchField, volMesh>&,
113             const GeometricField
114             <
115                 typename outerProduct<vector, Type>::type,
116                 fvPatchField,
117                 volMesh
118             >&,
119             GeometricField<Type, pointPatchField, pointMesh>&
120         ) const;
122         //- Interpolate volField returning pointField
123         //  using inverse distance weighting with boundary correction
124         //  given the field and its gradient
125         template<class Type>
126         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
127         (
128             const GeometricField<Type, fvPatchField, volMesh>&,
129             const GeometricField
130             <
131                 typename outerProduct<vector, Type>::type,
132                 fvPatchField,
133                 volMesh
134             >&
135         ) const;
137         //- Interpolate tmp<volField> returning pointField
138         //  using inverse distance weighting with boundary correction
139         //  given the field and its gradient
140         template<class Type>
141         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
142         (
143             const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
144             const GeometricField
145             <
146                 typename outerProduct<vector, Type>::type,
147                 fvPatchField,
148                 volMesh
149             >&
150         ) const;
152         template<class Type>
153         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
154         (
155             const GeometricField<Type, fvPatchField, volMesh>&,
156             const tmp<GeometricField
157             <
158                 typename outerProduct<vector, Type>::type,
159                 fvPatchField,
160                 volMesh
161             > >&
162         ) const;
164         template<class Type>
165         tmp<GeometricField<Type, pointPatchField, pointMesh> > interpolate
166         (
167             const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
168             const tmp<GeometricField
169             <
170                 typename outerProduct<vector, Type>::type,
171                 fvPatchField,
172                 volMesh
173             > >&
174         ) const;
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 } // End namespace Foam
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 #include "edgeCorrectedVolPointInterpolate.C"
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 #endif
190 // ************************************************************************* //