42 if (!Pstream::parRun())
44 return decomposeSerial
55 Info<<
type() <<
"Decomp : running in parallel."
56 <<
" Decomposing all of graph on master processor." <<
endl;
62 if (Pstream::master())
69 label nTotalCells = 0;
72 allXadj[nTotalCells] = xadj[celli];
73 allWeights[nTotalCells++] = cWeights[celli];
75 nTotalConnections = 0;
78 allAdjncy[nTotalConnections++] = adjncy[i];
81 for (
const int slave : Pstream::subProcs())
83 IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
91 allXadj[nTotalCells] = nTotalConnections+nbrXadj[celli];
92 allWeights[nTotalCells++] = nbrWeights[celli];
97 allAdjncy[nTotalConnections++] = nbrAdjncy[i];
100 allXadj[nTotalCells] = nTotalConnections;
113 for (
const int slave : Pstream::subProcs())
115 OPstream toSlave(Pstream::commsTypes::scheduled, slave);
116 toSlave << SubList<label>
119 globalCells.localSize(slave),
120 globalCells.offset(slave)
133 Pstream::commsTypes::scheduled,
145 Pstream::commsTypes::scheduled,
148 fromMaster >> decomp;
159 const word& derivedType,
166 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs", select))
182 <<
"Can only use this decomposition method for entire mesh" <<
nl
183 <<
"and supply one coordinate (cellCentre) for every cell." <<
nl
184 <<
"The number of coordinates " <<
points.size() <<
nl
185 <<
"The number of cells in the mesh " <<
mesh.nCells() <<
nl
201 decomposeGeneral(cellCells.
m(), cellCells.
offsets(), pointWeights, decomp);
215 if (agglom.size() !=
mesh.nCells())
218 <<
"Size of cell-to-coarse map " << agglom.size()
219 <<
" differs from number of cells in mesh " <<
mesh.nCells()
239 decomposeGeneral(cellCells.
m(), cellCells.
offsets(), agglomWeights, decomp);
243 labelList fineDistribution(agglom.size());
245 forAll(fineDistribution, i)
247 fineDistribution[i] = decomp[agglom[i]];
250 return fineDistribution;
261 if (cellCentres.size() != globalCellCells.size())
264 <<
"Inconsistent number of cells (" << globalCellCells.size()
265 <<
") and number of cell centres (" << cellCentres.size()
277 decomposeGeneral(cellCells.
m(), cellCells.
offsets(), cellWeights, decomp);