pointFieldReconstructor.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-2023 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::pointFieldReconstructor
26 
27 Description
28  Point field reconstructor.
29 
30 SourceFiles
31  pointFieldReconstructor.C
32  pointFieldReconstructorTemplates.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef pointFieldReconstructor_H
37 #define pointFieldReconstructor_H
38 
39 #include "pointMesh.H"
40 #include "pointFields.H"
41 #include "IOobjectList.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class fvMesh;
49 
50 /*---------------------------------------------------------------------------*\
51  Class pointFieldReconstructor Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private Data
57 
58  //- Reconstructed mesh reference
59  const pointMesh& completeMesh_;
60 
61  //- List of processor meshes
62  const PtrList<fvMesh>& procMeshes_;
63 
64  //- List of processor point addressing lists
65  const labelListList& pointProcAddressing_;
66 
67  //- Point patch addressing
68  labelListListList patchPointAddressing_;
69 
70 
71  // Private Member Functions
72 
73  //- Return whether anything in the object list gets reconstructed
74  template<class FieldType>
75  static bool reconstructs
76  (
77  const IOobjectList& objects,
78  const HashSet<word>& selectedFields
79  );
80 
81  //- Reconstruct field
82  template<class Type>
84  reconstructField(const IOobject& fieldIoObject);
85 
86 
87 public:
88 
89  // Constructors
90 
91  //- Construct from components
93  (
94  const pointMesh& mesh,
95  const PtrList<fvMesh>& procMeshes,
96  const labelListList& pointProcAddressing
97  );
98 
99  //- Disallow default bitwise copy construction
101 
102 
103  // Member Functions
104 
105  //- Return whether anything in the object list gets reconstructed
106  static bool reconstructs
107  (
108  const IOobjectList& objects,
109  const HashSet<word>& selectedFields
110  );
111 
112  //- Reconstruct and write all fields
113  template<class Type>
114  void reconstructFields
115  (
116  const IOobjectList& objects,
117  const HashSet<word>& selectedFields
118  );
119 
120 
121  // Member Operators
122 
123  //- Disallow default bitwise assignment
124  void operator=(const pointFieldReconstructor&) = delete;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #ifdef NoRepository
136 #endif
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
A HashTable with keys but without contents.
Definition: HashSet.H:62
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
Point field reconstructor.
pointFieldReconstructor(const pointMesh &mesh, const PtrList< fvMesh > &procMeshes, const labelListList &pointProcAddressing)
Construct from components.
void operator=(const pointFieldReconstructor &)=delete
Disallow default bitwise assignment.
void reconstructFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Reconstruct and write all fields.
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:53
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
objects