All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-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::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& mesh_;
59 
60  //- List of processor meshes
61  const PtrList<pointMesh>& procMeshes_;
62 
63  //- List of processor point addressing lists
64  const PtrList<labelIOList>& pointProcAddressing_;
65 
66  //- List of processor boundary addressing lists
67  const PtrList<labelIOList>& boundaryProcAddressing_;
68 
69  //- Point patch addressing
70  labelListListList patchPointAddressing_;
71 
72  //- Number of fields reconstructed
73  label nReconstructed_;
74 
75 
76 public:
77 
78  //- Mapper for sizing only - does not do any actual mapping.
80  :
81  public pointPatchFieldMapper,
82  public setSizeFieldMapper
83  {
84  public:
85 
86  // Constructors
87 
88  //- Construct given size
90  :
91  setSizeFieldMapper(size)
92  {}
93  };
94 
95 
96  // Constructors
97 
98  //- Construct from components
100  (
101  const pointMesh& mesh,
102  const PtrList<pointMesh>& procMeshes,
103  const PtrList<labelIOList>& pointProcAddressing,
104  const PtrList<labelIOList>& boundaryProcAddressing
105  );
106 
107  //- Disallow default bitwise copy construction
109 
110 
111  // Member Functions
112 
113  //- Return number of fields reconstructed
114  label nReconstructed() const
115  {
116  return nReconstructed_;
117  }
118 
119  //- Reconstruct field
120  template<class Type>
122  reconstructField(const IOobject& fieldIoObject);
123 
124  //- Reconstruct and write all fields
125  template<class Type>
126  void reconstructFields
127  (
128  const IOobjectList& objects,
129  const HashSet<word>& selectedFields
130  );
131 
132 
133  // Member Operators
134 
135  //- Disallow default bitwise assignment
136  void operator=(const pointFieldReconstructor&) = delete;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #ifdef NoRepository
148 #endif
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
A HashTable with keys but without contents.
Definition: HashSet.H:59
Field sizing mapper which sets the field size and does not map values.
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
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:50
Foam::pointPatchFieldMapper.
label nReconstructed() const
Return number of fields reconstructed.
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:48
pointPatchFieldReconstructor(const label size)
Construct given size.
Point field reconstructor.
dynamicFvMesh & mesh
void reconstructFields(const IOobjectList &objects, const HashSet< word > &selectedFields)
Reconstruct and write all fields.
pointFieldReconstructor(const pointMesh &mesh, const PtrList< pointMesh > &procMeshes, const PtrList< labelIOList > &pointProcAddressing, const PtrList< labelIOList > &boundaryProcAddressing)
Construct from components.
Mapper for sizing only - does not do any actual mapping.
objects
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:92
Namespace for OpenFOAM.
void operator=(const pointFieldReconstructor &)=delete
Disallow default bitwise assignment.
tmp< GeometricField< Type, pointPatchField, pointMesh > > reconstructField(const IOobject &fieldIoObject)
Reconstruct field.