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 (
int slave=1; slave<Pstream::nProcs(); ++slave)
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 (
int slave=1; slave<Pstream::nProcs(); ++slave)
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,
165 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs", select))
171 const word& derivedType,
178 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs", select))
194 <<
"Can use this decomposition method only for entire mesh" <<
nl
195 <<
"and supply one coordinate (cellCentre) for every cell." <<
nl
196 <<
"The number of coordinates " <<
points.size() <<
nl
197 <<
"The number of cells in the mesh " <<
mesh.nCells()
213 decomposeGeneral(cellCells.
m(), cellCells.
offsets(), pointWeights, decomp);
227 if (agglom.size() !=
mesh.nCells())
230 <<
"Size of cell-to-coarse map " << agglom.size()
231 <<
" differs from number of cells in mesh " <<
mesh.nCells()
251 decomposeGeneral(cellCells.
m(), cellCells.
offsets(), agglomWeights, decomp);
255 labelList fineDistribution(agglom.size());
257 forAll(fineDistribution, i)
259 fineDistribution[i] = decomp[agglom[i]];
262 return fineDistribution;
273 if (cellCentres.size() != globalCellCells.size())
276 <<
"Inconsistent number of cells (" << globalCellCells.size()
277 <<
") and number of cell centres (" << cellCentres.size()
289 decomposeGeneral(cellCells.
m(), cellCells.
offsets(), cellWeights, decomp);