All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pointFieldDecomposer.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 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::pointFieldDecomposer
26 
27 Description
28  Point field decomposer.
29 
30 SourceFiles
31  pointFieldDecomposer.C
32  pointFieldDecomposerDecomposeFields.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef pointFieldDecomposer_H
37 #define pointFieldDecomposer_H
38 
39 #include "pointMesh.H"
41 #include "pointFields.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class pointFieldDecomposer Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54 
55 public:
56 
57  //- Point patch field decomposer class
59  :
61  {
62  // Private Data
63 
64  labelList directAddressing_;
65 
66  //- Does map contain any unmapped values
67  bool hasUnmapped_;
68 
69  public:
70 
71  // Constructors
72 
73  //- Construct given addressing
75  (
76  const pointPatch& completeMeshPatch,
77  const pointPatch& procMeshPatch,
78  const labelList& directAddr
79  );
80 
81 
82  // Member Functions
83 
84  label size() const
85  {
86  return directAddressing_.size();
87  }
88 
89  bool direct() const
90  {
91  return true;
92  }
93 
94  bool hasUnmapped() const
95  {
96  return hasUnmapped_;
97  }
98 
99  const labelUList& directAddressing() const
100  {
101  return directAddressing_;
102  }
103  };
104 
105 
106 private:
107 
108  // Private Data
109 
110  //- Reference to complete mesh
111  const pointMesh& completeMesh_;
112 
113  //- Reference to processor mesh
114  const pointMesh& procMesh_;
115 
116  //- Reference to point addressing
117  const labelList& pointAddressing_;
118 
119  //- Reference to boundary addressing
120  const labelList& boundaryAddressing_;
121 
122  //- List of patch field decomposers
123  List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
124 
125 
126 public:
127 
128  // Constructors
129 
130  //- Construct from components
132  (
133  const pointMesh& completeMesh,
134  const pointMesh& procMesh,
135  const labelList& pointAddressing,
136  const labelList& boundaryAddressing
137  );
138 
139  //- Disallow default bitwise copy construction
141 
142 
143  //- Destructor
145 
146 
147  // Member Functions
148 
149  //- Decompose point field
150  template<class Type>
153  (
155  ) const;
156 
157  template<class GeoField>
158  void decomposeFields(const PtrList<GeoField>& fields) const;
159 
160 
161  // Member Operators
162 
163  //- Disallow default bitwise assignment
164  void operator=(const pointFieldDecomposer&) = delete;
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #ifdef NoRepository
176 #endif
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
void operator=(const pointPatchFieldMapperPatchRef &)=delete
Disallow default bitwise assignment.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:103
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:48
tmp< GeometricField< Type, pointPatchField, pointMesh > > decomposeField(const GeometricField< Type, pointPatchField, pointMesh > &) const
Decompose point field.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Point field decomposer.
pointFieldDecomposer(const pointMesh &completeMesh, const pointMesh &procMesh, const labelList &pointAddressing, const labelList &boundaryAddressing)
Construct from components.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:56
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
patchFieldDecomposer(const pointPatch &completeMeshPatch, const pointPatch &procMeshPatch, const labelList &directAddr)
Construct given addressing.
bool hasUnmapped() const
Are there unmapped values? I.e. do all size() elements get.
A class for managing temporary objects.
Definition: PtrList.H:53
~pointFieldDecomposer()
Destructor.
Foam::pointPatchFieldMapperPatchRef.
Namespace for OpenFOAM.
void decomposeFields(const PtrList< GeoField > &fields) const