PrimitivePatchInterpolation.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::PrimitivePatchInterpolation
26 
27 Description
28  Interpolation class within a primitive patch. Allows interpolation from
29  points to faces and vice versa
30 
31 SourceFiles
32  PrimitivePatchInterpolation.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef PrimitivePatchInterpolation_H
37 #define PrimitivePatchInterpolation_H
38 
39 #include "scalarList.H"
40 #include "Field.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class PrimitivePatchInterpolation Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class Patch>
53 {
54  // Private data
55 
56  //- Reference to patch
57  const Patch& patch_;
58 
59 
60  // Demand-driven data
61 
62  //- Face-to-point weights
64 
65  //- Face-to-edge weights
67 
68 
69  // Private Member Functions
70 
71  //- Disallow default bitwise copy construct
73 
74  //- Disallow default bitwise assignment
76 
77 
78  //- Face-to-point weights
79  const scalarListList& faceToPointWeights() const;
80 
81  //- Make face-to-point weights
82  void makeFaceToPointWeights() const;
83 
84  //- Face-to-edge weights
85  const scalarList& faceToEdgeWeights() const;
86 
87  //- Make face-to-edge weights
88  void makeFaceToEdgeWeights() const;
89 
90  //- Clear weights
91  void clearWeights();
92 
93 
94 public:
95 
96  // Constructors
97 
98  //- Construct from PrimitivePatch
99  PrimitivePatchInterpolation(const Patch& p);
100 
101 
102  //- Destructor
104 
105 
106  // Member Functions
107 
108  //- Interpolate from faces to points
109  template<class Type>
111  (
112  const Field<Type>& ff
113  ) const;
114 
115  template<class Type>
117  (
118  const tmp<Field<Type> >& tff
119  ) const;
120 
121  //- Interpolate from points to faces
122  template<class Type>
124  (
125  const Field<Type>& pf
126  ) const;
127 
128  template<class Type>
130  (
131  const tmp<Field<Type> >& tpf
132  ) const;
133 
134  //- Interpolate from faces to edges
135  template<class Type>
137  (
138  const Field<Type>& ff
139  ) const;
140 
141  template<class Type>
143  (
144  const tmp<Field<Type> >& tff
145  ) const;
146 
147  //- Do what is neccessary if the mesh has moved
148  bool movePoints();
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #ifdef NoRepository
160 #endif
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
Foam::PrimitivePatchInterpolation::faceToPointWeightsPtr_
scalarListList * faceToPointWeightsPtr_
Face-to-point weights.
Definition: PrimitivePatchInterpolation.H:62
p
p
Definition: pEqn.H:62
Foam::PrimitivePatchInterpolation::operator=
void operator=(const PrimitivePatchInterpolation &)
Disallow default bitwise assignment.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::PrimitivePatchInterpolation::pointToFaceInterpolate
tmp< Field< Type > > pointToFaceInterpolate(const Field< Type > &pf) const
Interpolate from points to faces.
Definition: PrimitivePatchInterpolation.C:231
Foam::PrimitivePatchInterpolation::faceToEdgeWeights
const scalarList & faceToEdgeWeights() const
Face-to-edge weights.
Definition: PrimitivePatchInterpolation.C:95
Foam::PrimitivePatchInterpolation::movePoints
bool movePoints()
Do what is neccessary if the mesh has moved.
Definition: PrimitivePatchInterpolation.C:343
scalarList.H
Foam::PrimitivePatchInterpolation::faceToPointWeights
const scalarListList & faceToPointWeights() const
Face-to-point weights.
Definition: PrimitivePatchInterpolation.C:39
Foam::PrimitivePatchInterpolation::faceToEdgeWeightsPtr_
scalarList * faceToEdgeWeightsPtr_
Face-to-edge weights.
Definition: PrimitivePatchInterpolation.H:65
Foam::Field< Type >
Field.H
Foam::PrimitivePatchInterpolation::makeFaceToPointWeights
void makeFaceToPointWeights() const
Make face-to-point weights.
Definition: PrimitivePatchInterpolation.C:51
Foam::PrimitivePatchInterpolation::clearWeights
void clearWeights()
Clear weights.
Definition: PrimitivePatchInterpolation.C:142
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::PrimitivePatchInterpolation::faceToPointInterpolate
tmp< Field< Type > > faceToPointInterpolate(const Field< Type > &ff) const
Interpolate from faces to points.
Definition: PrimitivePatchInterpolation.C:174
Foam::PrimitivePatchInterpolation::~PrimitivePatchInterpolation
~PrimitivePatchInterpolation()
Destructor.
Definition: PrimitivePatchInterpolation.C:163
Foam::fv::ff
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
Definition: CrankNicolsonDdtScheme.C:272
Foam::PrimitivePatchInterpolation::PrimitivePatchInterpolation
PrimitivePatchInterpolation(const PrimitivePatchInterpolation &)
Disallow default bitwise copy construct.
Foam::PrimitivePatchInterpolation::makeFaceToEdgeWeights
void makeFaceToEdgeWeights() const
Make face-to-edge weights.
Definition: PrimitivePatchInterpolation.C:107
Foam::PrimitivePatchInterpolation
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
Definition: PrimitivePatchInterpolation.H:51
PrimitivePatchInterpolation.C
Foam::List< scalarList >
Foam::PrimitivePatchInterpolation::faceToEdgeInterpolate
tmp< Field< Type > > faceToEdgeInterpolate(const Field< Type > &ff) const
Interpolate from faces to edges.
Definition: PrimitivePatchInterpolation.C:288
Foam::PrimitivePatchInterpolation::patch_
const Patch & patch_
Reference to patch.
Definition: PrimitivePatchInterpolation.H:56