diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 9a54c1361a..5c8254318e 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -209,198 +209,198 @@ void Foam::conformalVoronoiMesh::calcDualMesh } -// void Foam::conformalVoronoiMesh::calcTetMesh -// ( -// pointField& points, -// faceList& faces, -// labelList& owner, -// labelList& neighbour, -// wordList& patchNames, -// labelList& patchSizes, -// labelList& patchStarts -// ) -// { -// labelList vertexMap(number_of_vertices()); +void Foam::conformalVoronoiMesh::calcTetMesh +( + pointField& points, + faceList& faces, + labelList& owner, + labelList& neighbour, + wordList& patchTypes, + wordList& patchNames, + labelList& patchSizes, + labelList& patchStarts +) +{ + labelList vertexMap(number_of_vertices()); -// label vertI = 0; + label vertI = 0; -// points.setSize(number_of_vertices()); + points.setSize(number_of_vertices()); -// for -// ( -// Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); -// vit != finite_vertices_end(); -// ++vit -// ) -// { -// if (vit->internalPoint() || vit->pairPoint()) -// { -// vertexMap[vit->index()] = vertI; -// points[vertI] = topoint(vit->point()); -// vertI++; -// } -// } + for + ( + Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); + vit != finite_vertices_end(); + ++vit + ) + { + if (vit->internalPoint() || vit->pairPoint()) + { + vertexMap[vit->index()] = vertI; + points[vertI] = topoint(vit->point()); + vertI++; + } + } -// points.setSize(vertI); + points.setSize(vertI); -// label cellI = 0; + label cellI = 0; -// for -// ( -// Delaunay::Finite_cells_iterator cit = finite_cells_begin(); -// cit != finite_cells_end(); -// ++cit -// ) -// { -// if (cit->internalOrBoundaryDualVertex()) -// { -// cit->cellIndex() = cellI++; -// } -// else -// { -// cit->cellIndex() = -1; -// } -// } + for + ( + Delaunay::Finite_cells_iterator cit = finite_cells_begin(); + cit != finite_cells_end(); + ++cit + ) + { + if (cit->internalOrBoundaryDualVertex()) + { + cit->cellIndex() = cellI++; + } + else + { + cit->cellIndex() = -1; + } + } -// patchNames = geometryToConformTo_.patchNames(); + patchNames = geometryToConformTo_.patchNames(); -// patchNames.setSize(patchNames.size() + 1); + patchNames.setSize(patchNames.size() + 1); -// patchNames[patchNames.size() - 1] = "cvMesh_defaultPatch"; + patchNames[patchNames.size() - 1] = "cvMesh_defaultPatch"; + patchTypes.setSize(patchNames.size(), wallPolyPatch::typeName); -// label nPatches = patchNames.size(); + label nPatches = patchNames.size(); -// List > patchFaces(nPatches, DynamicList(0)); + List > patchFaces(nPatches, DynamicList(0)); -// List > patchOwners(nPatches, DynamicList