1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
25 Foam::PrimitivePatchInterpolation
28 Interpolation class within a primitive patch. Allows interpolation from
29 points to faces and vice versa
32 PrimitivePatchInterpolation.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef PrimitivePatchInterpolation_H
37 #define PrimitivePatchInterpolation_H
39 #include "scalarList.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class PrimitivePatchInterpolation Declaration
49 \*---------------------------------------------------------------------------*/
52 class PrimitivePatchInterpolation
56 //- Reference to patch
62 //- Face-to-point weights
63 mutable scalarListList* faceToPointWeightsPtr_;
65 //- Face-to-edge weights
66 mutable scalarList* faceToEdgeWeightsPtr_;
69 // Private Member Functions
71 //- Disallow default bitwise copy construct
72 PrimitivePatchInterpolation(const PrimitivePatchInterpolation&);
74 //- Disallow default bitwise assignment
75 void operator=(const PrimitivePatchInterpolation&);
78 //- Face-to-point weights
79 const scalarListList& faceToPointWeights() const;
81 //- Make face-to-point weights
82 void makeFaceToPointWeights() const;
84 //- Face-to-edge weights
85 const scalarList& faceToEdgeWeights() const;
87 //- Make face-to-edge weights
88 void makeFaceToEdgeWeights() const;
98 //- Construct from PrimitivePatch
99 PrimitivePatchInterpolation(const Patch& p);
103 ~PrimitivePatchInterpolation();
108 //- Interpolate from faces to points
110 tmp<Field<Type> > faceToPointInterpolate
112 const Field<Type>& ff
116 tmp<Field<Type> > faceToPointInterpolate
118 const tmp<Field<Type> >& tff
121 //- Interpolate from points to faces
123 tmp<Field<Type> > pointToFaceInterpolate
125 const Field<Type>& pf
129 tmp<Field<Type> > pointToFaceInterpolate
131 const tmp<Field<Type> >& tpf
134 //- Interpolate from faces to edges
136 tmp<Field<Type> > faceToEdgeInterpolate
138 const Field<Type>& ff
142 tmp<Field<Type> > faceToEdgeInterpolate
144 const tmp<Field<Type> >& tff
147 //- Do what is neccessary if the mesh has moved
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 # include "PrimitivePatchInterpolation.C"
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 // ************************************************************************* //