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-2022 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 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef pointFieldReconstructor_H
36 #define pointFieldReconstructor_H
37 
38 #include "pointMesh.H"
39 #include "pointFields.H"
40 #include "pointPatchFieldMapper.H"
41 #include "setSizeFieldMapper.H"
42 #include "IOobjectList.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class pointFieldReconstructor Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private Data
56 
57  //- Reconstructed mesh reference
58  const pointMesh& completeMesh_;
59 
60  //- List of processor meshes
61  const PtrList<pointMesh>& procMeshes_;
62 
63  //- List of processor point addressing lists
64  const labelListList& pointProcAddressing_;
65 
66  //- Point patch addressing
67  labelListListList patchPointAddressing_;
68 
69  //- Number of fields reconstructed
70  label nReconstructed_;
71 
72 
73 public:
74 
75  //- Mapper for sizing only - does not do any actual mapping.
77  :
78  public pointPatchFieldMapper,
79  public setSizeFieldMapper
80  {
81  public:
82 
83  // Constructors
84 
85  //- Construct given size
87  :
88  setSizeFieldMapper(size)
89  {}
90  };
91 
92 
93  // Constructors
94 
95  //- Construct from components
97  (
98  const pointMesh& mesh,
99  const PtrList<pointMesh>& procMeshes,
100  const labelListList& pointProcAddressing
101  );
102 
103  //- Disallow default bitwise copy construction
105 
106 
107  // Member Functions
108 
109  //- Return number of fields reconstructed
110  label nReconstructed() const
111  {
112  return nReconstructed_;
113  }
114 
115  //- Reconstruct field
116  template<class Type>
118  reconstructField(const IOobject& fieldIoObject);
119 
120  //- Reconstruct and write all fields
121  template<class Type>
122  void reconstructFields
123  (
124  const IOobjectList& objects,
125  const HashSet<word>& selectedFields
126  );
127 
128 
129  // Member Operators
130 
131  //- Disallow default bitwise assignment
132  void operator=(const pointFieldReconstructor&) = delete;
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #ifdef NoRepository
144 #endif
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
A HashTable with keys but without contents.
Definition: HashSet.H:59
Field sizing mapper which sets the field size and does not map values.
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:50
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::pointPatchFieldMapper.
label nReconstructed() const
Return number of fields reconstructed.
fvMesh & mesh
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:48
pointPatchFieldReconstructor(const label size)
Construct given size.
Point field reconstructor.
void reconstructFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Reconstruct and write all fields.
Mapper for sizing only - does not do any actual mapping.
objects
pointFieldReconstructor(const pointMesh &mesh, const PtrList< pointMesh > &procMeshes, const labelListList &pointProcAddressing)
Construct from components.
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
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:98
Namespace for OpenFOAM.
void operator=(const pointFieldReconstructor &)=delete
Disallow default bitwise assignment.
tmp< GeometricField< Type, pointPatchField, pointMesh > > reconstructField(const IOobject &fieldIoObject)
Reconstruct field.