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/>.
28 Automatic faMesh decomposition class
31 Zeljko Tukovic, FSB Zagreb. All rights reserved
36 \*---------------------------------------------------------------------------*/
38 #ifndef faMeshDecomposition_H
39 #define faMeshDecomposition_H
43 #include "labelList.H"
53 /*---------------------------------------------------------------------------*\
54 Class faMeshDecomposition Declaration
55 \*---------------------------------------------------------------------------*/
57 class faMeshDecomposition
63 //- Mesh decomposition control dictionary
64 IOdictionary decompositionDict_;
66 //- Number of processors in decomposition
69 //- Is the decomposition data to be distributed for each processor
72 //- Processor label for each cell
73 labelList faceToProc_;
75 //- Face labels for each processor mesh
76 labelListList procFaceLabels_;
79 List<Map<label> > procMeshEdgesMap_;
81 //- Number of internal edges for each processor mesh
82 labelList procNInternalEdges_;
84 //- Edge labels for patches of processor meshes
85 List<List<List<label> > > procPatchEdgeLabels_;
87 //- Labels of points for each processor
88 labelListList procPatchPointAddressing_;
90 //- Labels of edges for each processor
91 labelListList procPatchEdgeAddressing_;
93 //- Labels of edges for each processor
94 labelListList procEdgeAddressing_;
96 //- Labels of faces for each processor
97 labelListList procFaceAddressing_;
99 //- Original patch index for every processor patch
100 labelListList procBoundaryAddressing_;
102 //- Sizes for processor mesh patches
103 // Excludes inter-processor boundaries
104 labelListList procPatchSize_;
106 //- Start indices for processor patches
107 // Excludes inter-processor boundaries
108 labelListList procPatchStartIndex_;
110 //- Neighbour processor ID for inter-processor boundaries
111 labelListList procNeighbourProcessors_;
113 //- Sizes for inter-processor patches
114 labelListList procProcessorPatchSize_;
116 //- Start indices for inter-processor patches
117 labelListList procProcessorPatchStartIndex_;
119 //- List of globally shared point labels
120 labelList globallySharedPoints_;
122 //- Are there cyclic-parallel faces
123 bool cyclicParallel_;
126 // Private Member Functions
128 void distributeFaces();
134 //- Construct from fvMesh
135 faMeshDecomposition(const fvMesh& mesh);
140 ~faMeshDecomposition();
145 //- Number of processor in decomposition
151 //- Is the decomposition data to be distributed for each processor
152 bool distributed() const
157 //- Decompose mesh. Optionally remove zero-sized patches.
158 void decomposeMesh(const bool filterEmptyPatches);
160 //- Write decomposition
161 bool writeDecomposition();
163 //- Cell-processor decomposition labels
164 const labelList& faceToProc() const
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 // ************************************************************************* //