| 91 | |
| 92 | |
| 93 | void Foam::fvMeshSubset::doCoupledPatches |
| 94 | ( |
| 95 | const bool syncPar, |
| 96 | labelList& nCellsUsingFace |
| 97 | ) const |
| 98 | { |
| 99 | // Synchronize nCellsUsingFace on both sides of coupled patches. |
| 100 | // Marks faces that become 'uncoupled' with 3. |
| 101 | |
| 102 | const polyBoundaryMesh& oldPatches = baseMesh().boundaryMesh(); |
| 103 | |
| 104 | label nUncoupled = 0; |
| 105 | |
| 106 | if (syncPar && Pstream::parRun()) |
| 107 | { |
| 108 | PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); |
| 109 | |
| 110 | // Send face usage across processor patches |
| 111 | forAll(oldPatches, oldPatchi) |
| 112 | { |
| 113 | const polyPatch& pp = oldPatches[oldPatchi]; |
| 114 | |
| 115 | if (isA<processorPolyPatch>(pp)) |
| 116 | { |
| 117 | const processorPolyPatch& procPatch = |
| 118 | refCast<const processorPolyPatch>(pp); |
| 119 | |
| 120 | UOPstream toNeighbour(procPatch.neighbProcNo(), pBufs); |
| 121 | |
| 122 | toNeighbour |
| 123 | << SubList<label>(nCellsUsingFace, pp.size(), pp.start()); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | pBufs.finishedSends(); |
| 128 | |
| 129 | // Receive face usage count and check for faces that become uncoupled. |
| 130 | forAll(oldPatches, oldPatchi) |
| 131 | { |
| 132 | const polyPatch& pp = oldPatches[oldPatchi]; |
| 133 | |
| 134 | if (isA<processorPolyPatch>(pp)) |
| 135 | { |
| 136 | const processorPolyPatch& procPatch = |
| 137 | refCast<const processorPolyPatch>(pp); |
| 138 | |
| 139 | UIPstream fromNeighbour(procPatch.neighbProcNo(), pBufs); |
| 140 | |
| 141 | labelList nbrCellsUsingFace(fromNeighbour); |
| 142 | |
| 143 | // Combine with this side. |
| 144 | |
| 145 | forAll(pp, i) |
| 146 | { |
| 147 | if |
| 148 | ( |
| 149 | nCellsUsingFace[pp.start()+i] == 1 |
| 150 | && nbrCellsUsingFace[i] == 0 |
no test coverage detected