1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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::PrimitivePatchInterpolation
29 Interpolation class within a primitive patch. Allows interpolation from
30 points to faces and vice versa
33 PrimitivePatchInterpolation.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef PrimitivePatchInterpolation_H
38 #define PrimitivePatchInterpolation_H
40 #include "scalarList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class PrimitivePatchInterpolation Declaration
50 \*---------------------------------------------------------------------------*/
53 class PrimitivePatchInterpolation
57 //- Reference to patch
63 //- Face-to-point weights
64 mutable scalarListList* faceToPointWeightsPtr_;
66 //- Face-to-edge weights
67 mutable scalarList* faceToEdgeWeightsPtr_;
70 // Private Member Functions
72 //- Disallow default bitwise copy construct
73 PrimitivePatchInterpolation(const PrimitivePatchInterpolation&);
75 //- Disallow default bitwise assignment
76 void operator=(const PrimitivePatchInterpolation&);
79 //- Face-to-point weights
80 const scalarListList& faceToPointWeights() const;
82 //- Make face-to-point weights
83 void makeFaceToPointWeights() const;
85 //- Face-to-edge weights
86 const scalarList& faceToEdgeWeights() const;
88 //- Make face-to-edge weights
89 void makeFaceToEdgeWeights() const;
99 //- Construct from PrimitivePatch
100 PrimitivePatchInterpolation(const Patch& p);
105 ~PrimitivePatchInterpolation();
110 //- Interpolate from faces to points
112 tmp<Field<Type> > faceToPointInterpolate
114 const Field<Type>& ff
118 tmp<Field<Type> > faceToPointInterpolate
120 const tmp<Field<Type> >& tff
123 //- Interpolate from points to faces
125 tmp<Field<Type> > pointToFaceInterpolate
127 const Field<Type>& pf
131 tmp<Field<Type> > pointToFaceInterpolate
133 const tmp<Field<Type> >& tpf
136 //- Interpolate from faces to edges
138 tmp<Field<Type> > faceToEdgeInterpolate
140 const Field<Type>& ff
144 tmp<Field<Type> > faceToEdgeInterpolate
146 const tmp<Field<Type> >& tff
149 //- Do what is neccessary if the mesh has moved
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 # include "PrimitivePatchInterpolation.C"
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 // ************************************************************************* //