41 "void polyMeshGenAddressing::calcGlobalPointLabels() const"
42 ) <<
"Cannot calculate global point addressing "
71 forAll(procBoundaries, patchI)
73 const label start = procBoundaries[patchI].patchStart();
74 const label end = start + procBoundaries[patchI].patchSize();
76 std::map<label, std::pair<label, label> >& patchPointsMap =
79 for(
label faceI=start;faceI<end;++faceI)
81 const face&
f = faces[faceI];
85 std::map<label, std::pair<label, label> >::iterator it =
86 patchPointsMap.find(
f[pI]);
88 if( it != patchPointsMap.end() )
91 const std::pair<label, label> pp
94 (
f.size()-pI)%
f.size()
96 patchPointsMap.insert(std::make_pair(
f[pI], pp));
111 forAll(procBoundaries, patchI)
113 const std::map<label, std::pair<label, label> >& patchPointsMap =
115 std::map<label, std::pair<label, label> >::const_iterator it;
118 for(it=patchPointsMap.begin();it!=patchPointsMap.end();++it)
125 dataToSend.
append(it->second.first);
126 dataToSend.
append(it->second.second);
129 dataToSend.
append(pProcs(it->first, i));
135 procBoundaries[patchI].neiProcNo(),
138 toOtherProc << dataToSend;
141 forAll(procBoundaries, patchI)
146 procBoundaries[patchI].neiProcNo()
149 fromOtherProc >> receivedData;
151 const label start = procBoundaries[patchI].patchStart();
154 while( counter < receivedData.size() )
156 const face&
f = faces[start+receivedData[counter++]];
157 const label pI = receivedData[counter++];
158 const label nProcs = receivedData[counter++];
159 for(
label i=0;i<nProcs;++i)
161 const label neiProc = receivedData[counter++];
172 }
while( !finished );
175 label nLocalPoints(0);
190 localPoints[pI] =
false;
205 startPoint += nPointsAtProc[i];
208 if( localPoints[pI] )
216 forAll(procBoundaries, patchI)
218 const std::map<label, std::pair<label, label> >& patchPointsMap =
220 std::map<label, std::pair<label, label> >::const_iterator it;
223 for(it=patchPointsMap.begin();it!=patchPointsMap.end();++it)
231 dataToSend.
append(it->second.first);
232 dataToSend.
append(it->second.second);
240 procBoundaries[patchI].neiProcNo(),
243 toOtherProc << dataToSend;
246 forAll(procBoundaries, patchI)
251 procBoundaries[patchI].neiProcNo()
254 fromOtherProc >> receivedData;
256 const label start = procBoundaries[patchI].patchStart();
259 while( counter < receivedData.size() )
261 const face&
f = faces[start+receivedData[counter++]];
262 const label pI = receivedData[counter++];
263 const label globalLabel = receivedData[counter++];
274 "void polyMeshGenAddressing::"
275 "calcGlobalPointLabels() const"
276 ) <<
"Point labels on processors do not match!"
283 }
while( !finished );
312 label nBoundaryFaces = 0;
313 forAll(procBoundaries, patchI)
315 if( procBoundaries[patchI].owner() )
316 nBoundaryFaces += procBoundaries[patchI].patchSize();
326 startFace += numberOfInternalFaces[i];
329 for(
label faceI=0;faceI<nIntFaces;++faceI)
333 forAll(procBoundaries, patchI)
335 if( procBoundaries[patchI].owner() )
337 const label start = procBoundaries[patchI].patchStart();
338 labelList dataToSend(procBoundaries[patchI].patchSize());
342 dataToSend[bfI] = startFace++;
348 procBoundaries[patchI].neiProcNo(),
349 dataToSend.byteSize()
351 toOtherProc << dataToSend;
355 forAll(procBoundaries, patchI)
357 if( !procBoundaries[patchI].owner() )
362 procBoundaries[patchI].neiProcNo()
366 fromOtherProc >> receivedLabels;
368 const label start = procBoundaries[patchI].patchStart();
369 forAll(receivedLabels, bfI)
378 forAll(numberOfInternalFaces, procI)
379 startFace += numberOfInternalFaces[procI];
384 forAll(boundaries, patchI)
387 boundaries[patchI].patchSize();
392 forAll(boundaries, patchI)
394 const label start = boundaries[patchI].patchStart();
395 const label nBoundaryFaces = boundaries[patchI].patchSize();
398 startFace += numberOfBoundaryFaces[procI][patchI];
400 for(
label bfI=0;bfI<nBoundaryFaces;++bfI)
404 startFace += numberOfBoundaryFaces[procI][patchI];
425 startLabel += nCellsAtProc[i];
436 "void polyMeshGenAddressing::calcGlobalEdgeLabels() const"
437 ) <<
"Cannot calculate global edge addressing "
465 forAll(procBoundaries, patchI)
467 const label start = procBoundaries[patchI].patchStart();
468 const label end = start + procBoundaries[patchI].patchSize();
469 for(
label faceI=start;faceI<end;++faceI)
476 procBoundaries[patchI].myProcNo()
481 procBoundaries[patchI].neiProcNo()
494 forAll(procBoundaries, patchI)
496 const label start = procBoundaries[patchI].patchStart();
497 const label end = start + procBoundaries[patchI].patchSize();
511 for(
label faceI=start;faceI<end;++faceI)
516 const face&
f = faces[faceI];
522 dataToSend.
append(faceI-start);
523 dataToSend.
append((
f.size()-eI-1)%
f.size());
526 dataToSend.
append(eProcs(edgeI, i));
533 procBoundaries[patchI].neiProcNo(),
536 toOtherProc << dataToSend;
539 forAll(procBoundaries, patchI)
544 procBoundaries[patchI].neiProcNo()
547 fromOtherProc >> receivedData;
549 const label start = procBoundaries[patchI].patchStart();
552 while( counter < receivedData.size() )
554 const label faceI = start+receivedData[counter++];
555 const label eI = receivedData[counter++];
559 const label nProcs = receivedData[counter++];
560 for(
label i=0;i<nProcs;++i)
562 const label neiProc = receivedData[counter++];
563 if( !eProcs.
contains(edgeI, neiProc) )
565 eProcs.
append(edgeI, neiProc);
573 }
while( !finished );
576 label nLocalEdges(0);
583 if( eProcs(edgeI, procI) <
pMin )
584 pMin = eProcs(edgeI, procI);
592 localEdges[edgeI] =
false;
607 startEdge += nEdgesAtProc[i];
618 forAll(procBoundaries, patchI)
620 const label start = procBoundaries[patchI].patchStart();
621 const label end = start + procBoundaries[patchI].patchSize();
624 for(
label faceI=start;faceI<end;++faceI)
631 const face&
f = faces[faceI];
636 dataToSend.
append(faceI-start);
637 dataToSend.
append((
f.size()-eI-1)%
f.size());
646 procBoundaries[patchI].neiProcNo(),
649 toOtherProc << dataToSend;
652 forAll(procBoundaries, patchI)
657 procBoundaries[patchI].neiProcNo()
660 fromOtherProc >> receivedData;
662 const label start = procBoundaries[patchI].patchStart();
665 while( counter < receivedData.size() )
667 const label faceI = start+receivedData[counter++];
668 const label eI = receivedData[counter++];
672 const label globalLabel = receivedData[counter++];
683 "void polyMeshGenAddressing::"
684 "calcGlobalEdgeLabels() const"
685 ) <<
"Edge labels on processors do not match!"
692 }
while( !finished );
712 if( omp_in_parallel() )
715 "const labelLongList& polyMeshGenAddressing::"
716 "globalPointLabel() const"
717 ) <<
"Calculating addressing inside a parallel region."
732 if( omp_in_parallel() )
735 "const labelLongList& polyMeshGenAddressing"
736 "::globalFaceLabel() const"
737 ) <<
"Calculating addressing inside a parallel region."
760 if( omp_in_parallel() )
763 "const labelLongList& polyMeshGenAddressing"
764 "::globalEdgeLabel() const"
765 ) <<
"Calculating addressing inside a parallel region."
780 if( omp_in_parallel() )
783 "const VRWGraph& polyMeshGenAddressing::pointAtProcs() const"
784 ) <<
"Calculating addressing inside a parallel region."
799 if( omp_in_parallel() )
802 "const DynList<label>& polyMeshGenAddressing"
803 "::pointNeiProcs() const"
804 ) <<
"Calculating addressing inside a parallel region."
819 if( omp_in_parallel() )
822 "const Map<label>& polyMeshGenAddressing"
823 "::globalToLocalPointAddressing() const"
824 ) <<
"Calculating addressing inside a parallel region."
839 if( omp_in_parallel() )
842 "const VRWGraph& polyMeshGenAddressing::edgeAtProcs() const"
843 ) <<
"Calculating addressing inside a parallel region."
858 if( omp_in_parallel() )
861 "const DynList<label>& polyMeshGenAddressing::edgeNeiProcs() const"
862 ) <<
"Calculating addressing inside a parallel region."
877 if( omp_in_parallel() )
880 "const Map<label>& polyMeshGenAddressing"
881 "::globalToLocalEdgeAddressing() const"
882 ) <<
"Calculating addressing inside a parallel region."