81 int main(
int argc,
char *argv[])
93 Info<<
"Extracting triSurface from boundaryMesh ..."
96 Pout<<
"Reading mesh from time " << runTime.value() <<
endl;
100 bool includeProcPatches =
130 << patchName << endl <<
"Patches are " << bMesh.
names()
133 includePatches.insert(patchI);
142 if (includeProcPatches || !isA<processorPolyPatch>(patch))
144 includePatches.insert(patchI);
148 Pout<< patch.
name() <<
" : skipped since processorPatch"
167 Info<<
"Writing surface to " << outFileName <<
endl;
169 localSurface.
write(outFileName);
174 fileName localPath = runTime.
path()/runTime.caseName() +
".ftr";
176 Pout<<
"Writing local surface to " << localPath <<
endl;
178 localSurface.
write(localPath);
211 ListListOps::combine<pointField>
220 forAll(gatheredPatches, procI)
222 nPatches += gatheredPatches[procI].size();
228 forAll(gatheredFaces, procI)
230 nFaces += gatheredFaces[procI].size();
253 label pointOffset = 0;
257 Info<<
"Processor " << procI << endl
258 <<
"-----------" <<
endl;
261 gatheredPatches[procI];
270 if (!nameToIndex.found(sp.
name()))
272 nameToIndex.insert(sp.
name(), newPatchI);
274 localToGlobal[patchI] = newPatchI;
276 allPatches[newPatchI] = sp;
282 localToGlobal[patchI] = nameToIndex[sp.
name()];
286 Info<<
"Local patch to global patch mapping:"
291 Info<<
" name : " << patches[patchI].name() << endl
292 <<
" local : " << patchI << endl
293 <<
" global : " << localToGlobal[patchI]
297 Info<<
"Local points added in global points starting at "
310 allFaces[newFaceI++] =
320 pointOffset += gatheredPoints[procI].
size();
324 allPatches.setSize(newPatchI);
329 triSurface allSurf(allFaces, allPatches, allPoints);
332 allSurf.cleanup(
false);
336 label slashIndex = runTime.caseName().find_last_of(
'/');
338 fileName globalCasePath(runTime.caseName().substr(0, slashIndex));
340 Info<<
"Writing merged surface to " << globalCasePath <<
endl;
350 allSurf.write(globalPath);