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 | Copyright (C) 2015-2016 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 mapPolyMesh;
50 class mapDistributePolyMesh;
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  // Private Member Functions
75 
76  //- Disallow default bitwise copy construct
77  hexRef8Data(const hexRef8Data&);
78 
79  //- Disallow default bitwise assignment
80  void operator=(const hexRef8Data&);
81 
82 
83 public:
84 
85  // Constructors
86 
87  //- Construct read. Has special provision for only some processors
88  // having the files so can be used in redistribution.
89  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  //- In-place distribute
121  void distribute(const mapDistributePolyMesh&);
122 
123  //- Write
124  bool write() const;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
void sync(const IOobject &io)
Parallel synchronise. This enforces valid objects on all processors.
Definition: hexRef8Data.C:238
bool write() const
Write.
Definition: hexRef8Data.C:316
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:54
void distribute(const mapDistributePolyMesh &)
In-place distribute.
Definition: hexRef8Data.C:296
Various for reading/decomposing/reconstructing/distributing refinement data.
Definition: hexRef8Data.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
~hexRef8Data()
Destructor.
Definition: hexRef8Data.C:232
Namespace for OpenFOAM.