1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::processorMeshesReconstructor
30 processorMeshesReconstructor.C
31 processorMeshesRebuild.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef processorMeshesReconstructor_H
36 #define processorMeshesReconstructor_H
39 #include "objectRegistry.H"
42 #include "labelIOList.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 // Forward declaration of friend functions and operators
51 class processorPolyPatch;
53 /*---------------------------------------------------------------------------*\
54 Class processorMeshesReconstructor Declaration
55 \*---------------------------------------------------------------------------*/
57 class processorMeshesReconstructor
61 //- Processor databases
62 PtrList<Time>& databases_;
66 //- List of processor meshes
67 PtrList<fvMesh> meshes_;
69 //- List of processor point addressing lists
70 PtrList<labelIOList> pointProcAddressing_;
72 //- List of processor face addressing lists
73 PtrList<labelIOList> faceProcAddressing_;
75 //- List of processor cell addressing lists
76 PtrList<labelIOList> cellProcAddressing_;
78 //- List of processor boundary addressing lists
79 PtrList<labelIOList> boundaryProcAddressing_;
82 // Private Member Functions
84 //- Disallow default bitwise copy construct
85 processorMeshesReconstructor(const processorMeshesReconstructor&);
87 //- Disallow default bitwise assignment
88 void operator=(const processorMeshesReconstructor&);
94 //- Attempt to read mapping. If not available, return false
97 //- Return neighbour processor patch
98 const processorPolyPatch& neighbourProcPatch
100 const processorPolyPatch& procPatch
103 //- Return neighbour processor patch
104 labelList procPatchPointMapping
106 const processorPolyPatch& procPatch
109 //- Clear reconstruction maps
117 //- Construct from components
118 processorMeshesReconstructor
120 PtrList<Time>& databases,
125 // Destructor - default
130 //- Update the meshes based on the mesh files saved in
132 fvMesh::readUpdateState readUpdate();
134 //- Reconstruct mesh after topology change in parallel
135 autoPtr<fvMesh> reconstructMesh(const Time& db);
137 //- Reconstruct point position after motion in parallel
138 void reconstructPoints(fvMesh& mesh) const;
141 const PtrList<fvMesh>& meshes()
146 //- Return point-processor addressing arrays
147 const PtrList<labelIOList>& pointProcAddressing() const;
149 //- Return face-processor addressing arrays
150 const PtrList<labelIOList>& faceProcAddressing() const;
152 //- Return cell-processor addressing arrays
153 const PtrList<labelIOList>& cellProcAddressing() const;
155 //- Return boundary-processor addressing arrays
156 const PtrList<labelIOList>& boundaryProcAddressing() const;
160 void writeAddressing();
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 // ************************************************************************* //