1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
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
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
29 Automatic faMesh decomposition class
32 Zeljko Tukovic, FSB Zagreb. All rights reserved
37 \*---------------------------------------------------------------------------*/
39 #ifndef faMeshDecomposition_H
40 #define faMeshDecomposition_H
44 #include "labelList.H"
54 /*---------------------------------------------------------------------------*\
55 Class faMeshDecomposition Declaration
56 \*---------------------------------------------------------------------------*/
58 class faMeshDecomposition
64 //- Mesh decomposition control dictionary
65 IOdictionary decompositionDict_;
67 //- Number of processors in decomposition
70 //- Is the decomposition data to be distributed for each processor
73 //- Processor label for each cell
74 labelList faceToProc_;
76 //- Face labels for each processor mesh
77 labelListList procFaceLabels_;
80 List<Map<label> > procMeshEdgesMap_;
82 //- Number of internal edges for each processor mesh
83 labelList procNInternalEdges_;
85 //- Edge labels for patches of processor meshes
86 List<List<List<label> > > procPatchEdgeLabels_;
88 //- Labels of points for each processor
89 labelListList procPatchPointAddressing_;
91 //- Labels of edges for each processor
92 labelListList procPatchEdgeAddressing_;
94 //- Labels of edges for each processor
95 labelListList procEdgeAddressing_;
97 //- Labels of faces for each processor
98 labelListList procFaceAddressing_;
100 //- Original patch index for every processor patch
101 labelListList procBoundaryAddressing_;
103 //- Sizes for processor mesh patches
104 // Excludes inter-processor boundaries
105 labelListList procPatchSize_;
107 //- Start indices for processor patches
108 // Excludes inter-processor boundaries
109 labelListList procPatchStartIndex_;
111 //- Neighbour processor ID for inter-processor boundaries
112 labelListList procNeighbourProcessors_;
114 //- Sizes for inter-processor patches
115 labelListList procProcessorPatchSize_;
117 //- Start indices for inter-processor patches
118 labelListList procProcessorPatchStartIndex_;
120 //- List of globally shared point labels
121 labelList globallySharedPoints_;
123 //- Are there cyclic-parallel faces
124 bool cyclicParallel_;
127 // Private Member Functions
129 void distributeFaces();
135 //- Construct from fvMesh
136 faMeshDecomposition(const fvMesh& mesh);
141 ~faMeshDecomposition();
146 //- Number of processor in decomposition
152 //- Is the decomposition data to be distributed for each processor
153 bool distributed() const
158 //- Decompose mesh. Optionally remove zero-sized patches.
159 void decomposeMesh(const bool filterEmptyPatches);
161 //- Write decomposition
162 bool writeDecomposition();
164 //- Cell-processor decomposition labels
165 const labelList& faceToProc() const
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 // ************************************************************************* //