Loading...
Searching...
No Matches
volPointInterpolationAdjoint.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::volPointInterpolationAdjoint
29
30Description
31 Interpolate from cell centres to points (vertices) using inverse distance
32 weighting
33
34SourceFiles
35 volPointInterpolationAdjoint.C
36 volPointInterpolate.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef volPointInterpolationAdjoint_H
41#define volPointInterpolationAdjoint_H
42
43#include "MeshObject.H"
44#include "scalarList.H"
45#include "volFields.H"
46#include "pointFields.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53// Forward Declarations
54class fvMesh;
55class pointMesh;
57/*---------------------------------------------------------------------------*\
58 Class volPointInterpolationAdjoint Declaration
59\*---------------------------------------------------------------------------*/
60
62:
63 public MeshObject
64 <
65 fvMesh,
66 UpdateableMeshObject,
67 volPointInterpolationAdjoint
68 >
69{
70 // Private Typedefs
71
72 typedef MeshObject
73 <
74 fvMesh,
77 > MeshObject_type;
78
79
80protected:
81
82 // Protected data
83
84 //- Boundary addressing
86
87 //- Per boundary face whether is on non-coupled, non-empty patch
89
90 //- Per mesh(!) point whether is on non-coupled, non-empty patch (on
91 // any processor)
93
94 //- Per mesh(!) point whether is on symmetry plane
95 // any processor)
97
98 //- Per boundary point the weights per pointFaces.
100
102 // Protected Member Functions
103
104 //- Construct addressing over all boundary faces
107 //- Make weights for points on uncoupled patches
108 void makeBoundaryWeights(scalarField& sumWeights);
109
110 //- Construct all point weighting factors
111 void makeWeights();
112
113 //- Helper: push master point data to collocated points
114 template<class Type>
116
117 //- Get boundary field in same order as boundary faces. Field is
118 // zero on all coupled and empty patches
119 template<class Type>
121 (
123 ) const;
124
125 //- Add separated contributions
126 template<class Type>
127 void addSeparated
128 (
130 ) const;
131
132 //- No copy construct
134
135 //- No copy assignment
136 void operator=(const volPointInterpolationAdjoint&) = delete;
137
139public:
140
141 // Declare name of the class and its debug switch
142 ClassName("volPointInterpolationAdjoint");
143
144
145 // Constructors
146
147 //- Construct given fvMesh
148 explicit volPointInterpolationAdjoint(const fvMesh&);
149
150
151 //- Destructor
153
154
155 // Member functions
156
157 // Edit
158
159 //- Update mesh topology using the morph engine
161
162 //- Correct weighting factors for moving mesh.
163 bool movePoints();
164
165
166 // Interpolation Functions
167
168 //- Interpolate sensitivties from points to faces
169 // conditions
170 template<class Type>
172 (
176 ) const;
177
178 template<class Type>
180 (
183 ) const;
184
185 //- Interpolate sensitivties from points to faces
187 (
188 const vectorField& pf,
189 vectorField& vf,
191 ) const;
192};
193
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197} // End namespace Foam
198
199// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200
201#ifdef NoRepository
203#endif
204
205// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206
207#endif
208
209// ************************************************************************* //
labelList patchIDs
Generic GeometricField class.
GeometricBoundaryField< Type, PatchField, GeoMesh > Boundary
Type of boundary fields.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition bitSet.H:61
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Mesh representing a set of points created from polyMesh.
Definition pointMesh.H:49
A class for managing temporary objects.
Definition tmp.H:75
bool movePoints()
Correct weighting factors for moving mesh.
void pushUntransformedData(List< Type > &) const
Helper: push master point data to collocated points.
bitSet isPatchPoint_
Per mesh(!) point whether is on non-coupled, non-empty patch (on.
void makeWeights()
Construct all point weighting factors.
void interpolateBoundaryField(const GeometricField< Type, fvPatchField, volMesh > &vf, GeometricField< Type, pointPatchField, pointMesh > &pf) const
scalarListList boundaryPointWeights_
Per boundary point the weights per pointFaces.
volPointInterpolationAdjoint(const volPointInterpolationAdjoint &)=delete
No copy construct.
void addSeparated(GeometricField< Type, pointPatchField, pointMesh > &) const
Add separated contributions.
void interpolateSensitivitiesField(const GeometricField< Type, pointPatchField, pointMesh > &pf, typename GeometricField< Type, fvPatchField, volMesh >::Boundary &vf, const labelHashSet &patchIDs) const
Interpolate sensitivties from points to faces.
void calcBoundaryAddressing()
Construct addressing over all boundary faces.
void makeBoundaryWeights(scalarField &sumWeights)
Make weights for points on uncoupled patches.
tmp< Field< Type > > flatBoundaryField(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Get boundary field in same order as boundary faces. Field is.
void operator=(const volPointInterpolationAdjoint &)=delete
No copy assignment.
autoPtr< primitivePatch > boundaryPtr_
Boundary addressing.
void updateMesh(const mapPolyMesh &)
Update mesh topology using the morph engine.
bitSet boundaryIsPatchFace_
Per boundary face whether is on non-coupled, non-empty patch.
ClassName("volPointInterpolationAdjoint")
bitSet isSymmetryPoint_
Per mesh(!) point whether is on symmetry plane.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition className.H:74
Namespace for OpenFOAM.
List< scalarList > scalarListList
List of scalarList.
Definition scalarList.H:35
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition HashSet.H:85
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.