diff --git a/applications/utilities/mesh/generation/CV3DMesher/CV3D.C b/applications/utilities/mesh/generation/CV3DMesher/CV3D.C index cfaa91ae1b..8afdd857d9 100644 --- a/applications/utilities/mesh/generation/CV3DMesher/CV3D.C +++ b/applications/utilities/mesh/generation/CV3DMesher/CV3D.C @@ -139,7 +139,9 @@ void Foam::CV3D::setVertexAlignmentDirections() if (spokeHitDistance < closestSpokeHitDistance) { - closestSpokeHitPoint = spokeHit.hitPoint(); + closestSpokeHitPoint = spokeHit.hitPoint(); + + closestSpokeHitDistance = spokeHitDistance; closestSpokeHitDistanceIndex = spokeHit.index(); } @@ -166,6 +168,8 @@ void Foam::CV3D::setVertexAlignmentDirections() { closestSpokeHitPoint = spokeHit.hitPoint(); + closestSpokeHitDistance = spokeHitDistance; + closestSpokeHitDistanceIndex = spokeHit.index(); } } @@ -629,311 +633,21 @@ void Foam::CV3D::relaxPoints(const scalar relaxation) // Rotate faces that are sufficiently large and well enough aligned with the // cell alignment direction(s) - // vector n2 = vector(1,1,1); + Info<< nl << "Dual face looping." << endl; - // n2 /= mag(n2); + vector n2 = vector(1,0,0); - // tensor R = rotationTensor(vector(1,0,0), n2); + n2 /= mag(n2); - // List globalAlignmentDirs(3); + tensor R = rotationTensor(vector(1,0,0), n2); - // globalAlignmentDirs[0] = R & vector(1,0,0); - // globalAlignmentDirs[1] = R & vector(0,1,0); - // globalAlignmentDirs[2] = R & vector(0,0,1); + List globalAlignmentDirs(3); - // Info<< "globalAlignmentDirs " << globalAlignmentDirs << endl; + globalAlignmentDirs[0] = R & vector(1,0,0); + globalAlignmentDirs[1] = R & vector(0,1,0); + globalAlignmentDirs[2] = R & vector(0,0,1); - // for - // ( - // Triangulation::Finite_edges_iterator eit = finite_edges_begin(); - // eit != finite_edges_end(); - // ++eit - // ) - // { - // if - // ( - // eit->first->vertex(eit->second)->internalOrBoundaryPoint() - // && eit->first->vertex(eit->third)->internalOrBoundaryPoint() - // ) - // { - // Cell_circulator ccStart = incident_cells(*eit); - // Cell_circulator cc = ccStart; - - // DynamicList