hexRef8Data.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) 2015-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::hexRef8Data
26 
27 Description
28  Various for reading/decomposing/reconstructing/distributing refinement
29  data.
30 
31 SourceFiles
32  hexRef8Data.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef hexRef8Data_H
37 #define hexRef8Data_H
38 
39 #include "labelIOList.H"
41 #include "UPtrList.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declaration of classes
49 class polyTopoChangeMap;
50 class polyDistributionMap;
51 class refinementHistory;
52 class fvMesh;
53 
54 /*---------------------------------------------------------------------------*\
55  Class hexRef8Data Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class hexRef8Data
59 {
60 
61 private:
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  // Constructors
77 
78  //- Construct read. Has special provision for only some processors
79  // having the files so can be used in redistribution.
80  hexRef8Data(const IOobject& io);
81 
82  //- Construct as subset
84  (
85  const IOobject& io,
86  const hexRef8Data&,
87  const labelList& cellMap,
88  const labelList& pointMap
89  );
90 
91  //- Construct from multiple hexRef8Data
93  (
94  const IOobject& io,
95  const UPtrList<const labelList>& cellMaps,
96  const UPtrList<const labelList>& pointMaps,
98  );
99 
100  //- Disallow default bitwise copy construction
101  hexRef8Data(const hexRef8Data&) = delete;
102 
103 
104  //- Destructor
105  ~hexRef8Data();
106 
107 
108  // Member Functions
109 
110  //- Parallel synchronise. This enforces valid objects on all processors
111  // (even if they don't have a mesh). Used by redistributePar.
112  void sync(const IOobject& io);
113 
114  //- In-place update for topology changes
115  void topoChange(const polyTopoChangeMap&);
116 
117  //- In-place distribute
118  void distribute(const polyDistributionMap&);
119 
120  //- Write
121  bool write() const;
122 
123 
124  // Member Operators
125 
126  //- Disallow default bitwise assignment
127  void operator=(const hexRef8Data&) = delete;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
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: UPtrList.H:66
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Various for reading/decomposing/reconstructing/distributing refinement data.
Definition: hexRef8Data.H:58
void operator=(const hexRef8Data &)=delete
Disallow default bitwise assignment.
void topoChange(const polyTopoChangeMap &)
In-place update for topology changes.
Definition: hexRef8Data.C:329
void distribute(const polyDistributionMap &)
In-place distribute.
Definition: hexRef8Data.C:352
void sync(const IOobject &io)
Parallel synchronise. This enforces valid objects on all processors.
Definition: hexRef8Data.C:271
~hexRef8Data()
Destructor.
Definition: hexRef8Data.C:265
hexRef8Data(const IOobject &io)
Construct read. Has special provision for only some processors.
Definition: hexRef8Data.C:40
bool write() const
Write.
Definition: hexRef8Data.C:372
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.
Namespace for OpenFOAM.