Send mesh and coupling data.
| 1177 | |
| 1178 | // Send mesh and coupling data. |
| 1179 | void Foam::fvMeshDistribute::sendMesh |
| 1180 | ( |
| 1181 | const label domain, |
| 1182 | const fvMesh& mesh, |
| 1183 | |
| 1184 | const wordList& pointZoneNames, |
| 1185 | const wordList& faceZoneNames, |
| 1186 | const wordList& cellZoneNames, |
| 1187 | |
| 1188 | const labelList& sourceFace, |
| 1189 | const labelList& sourceProc, |
| 1190 | const labelList& sourcePatch, |
| 1191 | const labelList& sourceNewNbrProc, |
| 1192 | Ostream& toDomain |
| 1193 | ) |
| 1194 | { |
| 1195 | if (debug) |
| 1196 | { |
| 1197 | Pout<< "Sending to domain " << domain << nl |
| 1198 | << " nPoints:" << mesh.nPoints() << nl |
| 1199 | << " nFaces:" << mesh.nFaces() << nl |
| 1200 | << " nCells:" << mesh.nCells() << nl |
| 1201 | << " nPatches:" << mesh.boundaryMesh().size() << nl |
| 1202 | << endl; |
| 1203 | } |
| 1204 | |
| 1205 | // Assume sparse, possibly overlapping point zones. Get contents |
| 1206 | // in merged-zone indices. |
| 1207 | CompactListList<label> zonePoints; |
| 1208 | { |
| 1209 | const pointZoneMesh& pointZones = mesh.pointZones(); |
| 1210 | |
| 1211 | labelList rowSizes(pointZoneNames.size(), 0); |
| 1212 | |
| 1213 | forAll(pointZoneNames, nameI) |
| 1214 | { |
| 1215 | label myZoneID = pointZones.findZoneID(pointZoneNames[nameI]); |
| 1216 | |
| 1217 | if (myZoneID != -1) |
| 1218 | { |
| 1219 | rowSizes[nameI] = pointZones[myZoneID].size(); |
| 1220 | } |
| 1221 | } |
| 1222 | zonePoints.setSize(rowSizes); |
| 1223 | |
| 1224 | forAll(pointZoneNames, nameI) |
| 1225 | { |
| 1226 | label myZoneID = pointZones.findZoneID(pointZoneNames[nameI]); |
| 1227 | |
| 1228 | if (myZoneID != -1) |
| 1229 | { |
| 1230 | zonePoints[nameI].deepCopy(pointZones[myZoneID]); |
| 1231 | } |
| 1232 | } |
| 1233 | } |
| 1234 | |
| 1235 | // Assume sparse, possibly overlapping face zones |
| 1236 | CompactListList<label> zoneFaces; |