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-2024 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  // Private Data
61 
62  autoPtr<labelIOList> cellLevelPtr_;
63 
64  autoPtr<labelIOList> pointLevelPtr_;
65 
67 
68  autoPtr<refinementHistory> refHistoryPtr_;
69 
70 
71 public:
72 
73  // Constructors
74 
75  //- Construct read. Has special provision for only some processors
76  // having the files so can be used in redistribution.
77  hexRef8Data(const IOobject& io);
78 
79  //- Construct as subset
81  (
82  const IOobject& io,
83  const hexRef8Data&,
84  const labelList& cellMap,
85  const labelList& pointMap
86  );
87 
88  //- Construct from multiple hexRef8Data
90  (
91  const IOobject& io,
92  const UPtrList<const labelList>& cellMaps,
93  const UPtrList<const labelList>& pointMaps,
95  );
96 
97  //- Disallow default bitwise copy construction
98  hexRef8Data(const hexRef8Data&) = delete;
99 
100 
101  //- Destructor
102  ~hexRef8Data();
103 
104 
105  // Member Functions
106 
107  //- Parallel synchronise. This enforces valid objects on all processors
108  // (even if they don't have a mesh). Used by redistributePar.
109  void sync(const IOobject& io);
110 
111  //- In-place update for topology changes
112  void topoChange(const polyTopoChangeMap&);
113 
114  //- In-place distribute
115  void distribute(const polyDistributionMap&);
116 
117  //- Write
118  bool write() const;
119 
120 
121  // Member Operators
122 
123  //- Disallow default bitwise assignment
124  void operator=(const hexRef8Data&) = delete;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
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.