83 int main(
int argc,
char *argv[])
92 const word dictName(
"blockMeshDict");
103 Info<<
nl <<
"Generating mesh for region " << regionName <<
endl;
154 <<
"Cannot open mesh description file\n "
160 Info<<
nl <<
"Creating block mesh from\n "
171 fileName objMeshFile(
"blockTopology.obj");
173 OFstream str(runTime.path()/objMeshFile);
175 Info<<
nl <<
"Dumping block structure as Lightwave obj format"
176 <<
" to " << objMeshFile <<
endl;
178 blocks.writeTopology(str);
183 fileName objCcFile(
"blockCentres.obj");
185 OFstream str(runTime.path()/objCcFile);
187 Info<<
nl <<
"Dumping block centres as Lightwave obj format"
188 <<
" to " << objCcFile <<
endl;
190 const polyMesh& topo = blocks.topology();
194 forAll(cellCentres, cellI)
197 const point& cc = cellCentres[cellI];
199 str <<
"v " << cc.
x() <<
' ' << cc.
y() <<
' ' << cc.
z() <<
nl;
210 Info<<
nl <<
"Creating mesh from block mesh" <<
endl;
250 if (meshDict.found(
"mergePatchPairs"))
254 meshDict.lookup(
"mergePatchPairs")
261 Info<<
nl <<
"There are no merge patch pairs edges" <<
endl;
268 label nZones = blocks.numZonedBlocks();
288 const block&
b = blocks[blockI];
298 if (iter == zoneMap.
end())
302 Info<<
" " << zoneI <<
'\t' << zoneName <<
endl;
304 zoneMap.insert(zoneName, zoneI);
313 zoneCells[zoneI].append(cellI++);
325 Info<<
nl <<
"Writing cell zones as cellSets" <<
endl;
329 label zoneI = iter();
334 zoneCells[zoneI].shrink(),
340 cellSet cset(
mesh, iter.key(), zoneCells[zoneI].shrink());
358 <<
"Failed writing polyMesh."