hexRef8Data.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) 2015-2016 OpenFOAM Foundation
9  Copyright (C) 2017-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::hexRef8Data
29 
30 Description
31  Various for reading/decomposing/reconstructing/distributing refinement
32  data.
33 
34 SourceFiles
35  hexRef8Data.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Foam_hexRef8Data_H
40 #define Foam_hexRef8Data_H
41 
42 #include "labelIOList.H"
44 #include "UPtrList.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward Declarations
52 class mapPolyMesh;
53 class mapDistributePolyMesh;
54 class refinementHistory;
55 class fvMesh;
56 
57 /*---------------------------------------------------------------------------*\
58  Class hexRef8Data Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 class hexRef8Data
62 {
63  // Private Data
64 
65  autoPtr<labelIOList> cellLevelPtr_;
66 
67  autoPtr<labelIOList> pointLevelPtr_;
68 
70 
71  autoPtr<refinementHistory> refHistoryPtr_;
72 
73 
74 public:
75 
76  // Generated Methods
77 
78  //- No copy construct
79  hexRef8Data(const hexRef8Data&) = delete;
80 
81  //- No copy assignment
82  void operator=(const hexRef8Data&) = delete;
83 
84 
85  // Constructors
86 
87  //- Construct from IOobject, reading if MUST_READ or LAZY_READ.
88  //- Use sync() if used in redistributing to different number of ranks
89  explicit hexRef8Data(const IOobject& io);
90 
91  //- Construct as subset
93  (
94  const IOobject& io,
95  const hexRef8Data&,
96  const labelList& cellMap,
97  const labelList& pointMap
98  );
99 
100  //- Construct from multiple hexRef8Data
102  (
103  const IOobject& io,
104  const UPtrList<const labelList>& cellMaps,
105  const UPtrList<const labelList>& pointMaps,
107  );
108 
109 
110  //- Destructor
111  ~hexRef8Data();
112 
113 
114  // Member Functions
115 
116  //- Parallel synchronise. This enforces valid objects on all processors
117  //- (even if they don't have a mesh). Used by redistributePar.
118  void sync(const IOobject& io);
119 
120  //- Update local numbering for changed mesh.
121  void updateMesh(const mapPolyMesh&);
122 
123  //- In-place distribute
124  void distribute(const mapDistributePolyMesh&);
125 
126  //- Write
127  bool write() const;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
void operator=(const hexRef8Data &)=delete
No copy assignment.
void sync(const IOobject &io)
Parallel synchronise. This enforces valid objects on all processors (even if they don&#39;t have a mesh)...
Definition: hexRef8Data.C:239
Various UniformDimensionedField types.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
void updateMesh(const mapPolyMesh &)
Update local numbering for changed mesh.
Definition: hexRef8Data.C:308
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Definition: HashTable.H:106
bool write() const
Write.
Definition: hexRef8Data.C:399
void distribute(const mapDistributePolyMesh &)
In-place distribute.
Definition: hexRef8Data.C:379
Various for reading/decomposing/reconstructing/distributing refinement data.
Definition: hexRef8Data.H:56
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
~hexRef8Data()
Destructor.
Definition: hexRef8Data.C:233
Namespace for OpenFOAM.
hexRef8Data(const hexRef8Data &)=delete
No copy construct.