// Make polyhedral mesh data (packing) void starMesh::createPolyMeshData() { Info << "Creating a polyMesh" << endl; createPolyCells(); Info<< "\nNumber of internal faces: " << nInternalFaces_ << endl; createPolyBoundary(); }
// Make polyhedral mesh data (packing) void sammMesh::createPolyMeshData() { Info << "Creating a polyMesh" << endl; createPolyCells(); Info<< "\nNumber of internal faces: " << nInternalFaces_ << endl; createPolyBoundary(); label nProblemCells = 0; // check that there is no zeros in the cellPolys_ forAll (cellPolys_, cellI) { const labelList& curFaceLabels = cellPolys_[cellI]; forAll (curFaceLabels, faceI) { if (curFaceLabels[faceI] == -1) { Info << "cell " << cellI << " has got an unmatched face. " << "Index: " << cellShapes_[cellI].model().index() << endl // << "cell shape: " << cellShapes_[cellI] << endl // << "shape faces: " << cellShapes_[cellI].faces() << endl << "cellPolys: " << cellPolys_[cellI] << endl // << "cell faces: " << cellFaces_[cellI] << endl; nProblemCells++; break; } } } if (nProblemCells > 0) { Info << "Number of problem cells: " << nProblemCells << endl; } }
Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh ( const objectRegistry& registry ) { readGeometry(); Info<< "Creating a polyMesh" << endl; createPolyCells(); Info<< "Number of internal faces: " << nInternalFaces_ << endl; createPolyBoundary(); clearExtraStorage(); autoPtr<polyMesh> mesh ( new polyMesh ( IOobject ( polyMesh::defaultRegion, "constant", registry ), xferMove(points_), xferMove(meshFaces_), xferMove(cellPolys_) ) ); // adding patches also checks the mesh mesh().addPatches(polyBoundaryPatches(mesh)); warnDuplicates("boundaries", mesh().boundaryMesh().names()); addCellZones(mesh()); addFaceZones(mesh()); return mesh; }