FreeFOAM The Cross-Platform CFD Toolkit
pointPatchInterpolation.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) 1991-2010 OpenCFD Ltd.
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::pointPatchInterpolation
26 
27 Description
28  Foam::pointPatchInterpolation
29 
30 SourceFiles
31  pointPatchInterpolation.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef pointPatchInterpolation_H
36 #define pointPatchInterpolation_H
37 
39 #include <OpenFOAM/PtrList.H>
42 #include <OpenFOAM/scalarList.H>
43 #include <OpenFOAM/className.H>
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 // Forward declaration of classes
51 class fvMesh;
52 class pointMesh;
53 
54 /*---------------------------------------------------------------------------*\
55  Class pointPatchInterpolation Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60  // Private data
61 
62  const fvMesh& fvMesh_;
63 
64  //- Primitive patch interpolators
65  PtrList<primitivePatchInterpolation> patchInterpolators_;
66 
67  //- List of patch-patch edge points that require special treatement
68  labelList patchPatchPoints_;
69 
70  //- Weights for patch-patch boundary points
71  scalarListList patchPatchPointWeights_;
72 
73  labelList patchPatchPointConstraintPoints_;
74  tensorField patchPatchPointConstraintTensors_;
75 
76 
77  // Private member functions
78 
79  //- Construct addressing for patch-patch boundary points
80  void makePatchPatchAddressing();
81 
82  //- Construct weights for patch-patch boundary points
83  void makePatchPatchWeights();
84 
85 
86  //- Disallow default bitwise copy construct
88 
89  //- Disallow default bitwise assignment
90  void operator=(const pointPatchInterpolation&);
91 
92 
93 public:
94 
95  // Declare name of the class and its debug switch
96  ClassName("pointPatchInterpolation");
97 
98 
99  // Constructors
100 
101  //- Constructor given fvMesh and pointMesh.
103 
104 
105  // Destructor
106 
108 
109 
110  // Member functions
111 
112  // Access
113 
114  const fvMesh& mesh() const
115  {
116  return fvMesh_;
117  }
118 
119 
120  // Edit
121 
122  //- Update mesh topology using the morph engine
123  void updateMesh();
124 
125  //- Correct weighting factors for moving mesh.
126  bool movePoints();
127 
128 
129  // Interpolation functions
130 
131  template<class Type>
132  void interpolate
133  (
136  bool overrideFixedValue
137  ) const;
138 
139  template<class Type>
141  (
143  ) const;
144 };
145 
146 
147 template<>
148 void pointPatchInterpolation::applyCornerConstraints<scalar>
149 (
150  GeometricField<scalar, pointPatchField, pointMesh>& pf
151 ) const;
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #ifdef NoRepository
162 #endif
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************ vim: set sw=4 sts=4 et: ************************ //