MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / sendMesh

Function sendMesh

src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C:1179–1336  ·  view source on GitHub ↗

Send mesh and coupling data.

Source from the content-addressed store, hash-verified

1177
1178// Send mesh and coupling data.
1179void 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;

Callers 1

fvMeshDistribute.CFile · 0.85

Calls 8

forAllFunction · 0.50
nPointsMethod · 0.45
nFacesMethod · 0.45
nCellsMethod · 0.45
sizeMethod · 0.45
setSizeMethod · 0.45
pointsMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected