BUGFIX: Illegal use of uninitialised value (backport)
[foam-extend-3.2.git] / applications / utilities / parallelProcessing / decomposeSets / processorMeshes.H
blob6d8ce390cac85380e8eeba695bed57e7aecb4226
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::processorMeshes
28 Description
29     Container for processor mesh addressing.
31 SourceFiles
32     processorMeshes.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef processorMeshes_H
37 #define processorMeshes_H
39 #include "PtrList.H"
40 #include "fvMesh.H"
41 #include "labelIOList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                      Class processorMeshes Declaration
50 \*---------------------------------------------------------------------------*/
52 class processorMeshes
54     // Private data
56         //- Processor databases
57         PtrList<Time>& databases_;
59         const word meshName_;
61         //- List of processor meshes
62         PtrList<fvMesh> meshes_;
64         //- List of processor point addressing lists
65         PtrList<labelIOList> pointProcAddressing_;
67         //- List of processor face addressing lists
68         PtrList<labelIOList> faceProcAddressing_;
70         //- List of processor cell addressing lists
71         PtrList<labelIOList> cellProcAddressing_;
73         //- List of processor boundary addressing lists
74         PtrList<labelIOList> boundaryProcAddressing_;
77     // Private Member Functions
79         //- Disallow default bitwise copy construct
80         processorMeshes(const processorMeshes&);
82         //- Disallow default bitwise assignment
83         void operator=(const processorMeshes&);
86         //- Read all meshes
87         void readMeshes();
89         //- Read addressing
90         void readAddressing();
93 public:
95     // Constructors
97         //- Construct from components
98         processorMeshes(PtrList<Time>& databases, const word& meshName);
101     // Member Functions
103         //- Update the meshes based on the mesh files saved in
104         //  time directories
105         fvMesh::readUpdateState readUpdate();
107         //- Reconstruct point position after motion in parallel
108         void reconstructPoints(fvMesh& mesh);
110         PtrList<fvMesh>& meshes()
111         {
112             return meshes_;
113         }
115         //- Return point-processor addressing arrays
116         const PtrList<labelIOList>& pointProcAddressing() const
117         {
118             return pointProcAddressing_;
119         }
121         //- Return face-processor addressing arrays
122         const PtrList<labelIOList>& faceProcAddressing() const
123         {
124             return faceProcAddressing_;
125         }
127         //- Return cell-processor addressing arrays
128         const PtrList<labelIOList>& cellProcAddressing() const
129         {
130             return cellProcAddressing_;
131         }
133         //- Return boundary-processor addressing arrays
134         const PtrList<labelIOList>& boundaryProcAddressing() const
135         {
136             return boundaryProcAddressing_;
137         }
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 } // End namespace Foam
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 #endif
149 // ************************************************************************* //