ENH: Descriptive messages for timeChecks.

This commit is contained in:
graham
2011-01-13 11:00:09 +00:00
parent c16b47c121
commit 1dffb47b28
5 changed files with 40 additions and 24 deletions

View File

@ -797,7 +797,7 @@ void Foam::conformalVoronoiMesh::insertInitialPoints()
std::vector<Point> initPts = initialPointsMethod_->initialPoints();
timeCheck();
timeCheck("After initial points call");
insertPoints(initPts);
@ -815,7 +815,7 @@ void Foam::conformalVoronoiMesh::storeSizesAndAlignments
const std::vector<Point>& storePts
)
{
timeCheck();
timeCheck("Start of storeSizesAndAlignments");
Info << nl << "Store size and alignment" << endl;
@ -838,11 +838,11 @@ void Foam::conformalVoronoiMesh::storeSizesAndAlignments
storedAlignments_[i] = requiredAlignment(sizeAndAlignmentLocations_[i]);
}
timeCheck();
timeCheck("Sizes and alignments calculated, build tree");
buildSizeAndAlignmentTree();
timeCheck();
timeCheck("Size and alignment tree built");
}
@ -1222,7 +1222,7 @@ Foam::conformalVoronoiMesh::~conformalVoronoiMesh()
void Foam::conformalVoronoiMesh::move()
{
timeCheck();
timeCheck("Start of move");
scalar relaxation = relaxationModel_->relaxation();
@ -1230,6 +1230,10 @@ void Foam::conformalVoronoiMesh::move()
pointField dualVertices(number_of_cells());
Info<< dualVertices.size() << endl;
timeCheck("Start of move - after dualVertices declaration");
label dualVertI = 0;
// Find the dual point of each tetrahedron and assign it an index.
@ -1258,13 +1262,17 @@ void Foam::conformalVoronoiMesh::move()
}
}
timeCheck("Start of move - before dualVertices.setSize");
dualVertices.setSize(dualVertI);
timeCheck();
Info<< dualVertices.size() << endl;
timeCheck("Dual vertices indexed");
setVertexSizeAndAlignment();
timeCheck();
timeCheck("Determined sizes and alignments");
Info<< nl << "Determining vertex displacements" << endl;
@ -1562,7 +1570,7 @@ void Foam::conformalVoronoiMesh::move()
startOfInternalPoints_ = number_of_vertices();
timeCheck();
timeCheck("Displacement calculated");
Info<< nl << "Inserting displaced tessellation" << endl;
@ -1575,13 +1583,13 @@ void Foam::conformalVoronoiMesh::move()
- number_of_vertices()
+ pointsAdded;
timeCheck();
timeCheck("Internal points inserted");
conformToSurface();
updateSizesAndAlignments(pointsToInsert);
timeCheck("After conformToSurface");
timeCheck();
updateSizesAndAlignments(pointsToInsert);
Info<< nl
<< "Total displacement = " << totalDisp << nl
@ -1589,6 +1597,8 @@ void Foam::conformalVoronoiMesh::move()
<< "Points added = " << pointsAdded << nl
<< "Points removed = " << pointsRemoved
<< endl;
timeCheck("Updated sizes and alignments (if required), end of move");
}

View File

@ -41,11 +41,11 @@ void Foam::conformalVoronoiMesh::calcDualMesh
bool filterFaces
)
{
timeCheck();
timeCheck("Start calcDualMesh");
setVertexSizeAndAlignment();
timeCheck();
timeCheck("After setVertexSizeAndAlignment");
// Dual cell indexing
@ -106,6 +106,8 @@ void Foam::conformalVoronoiMesh::calcDualMesh
mergeCloseDualVertices(points, boundaryPts);
}
timeCheck("After initial close point merge");
if (filterFaces)
{
label nInitialBadQualityFaces = checkPolyMeshQuality(points).size();
@ -189,7 +191,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh
{
Info<< nl << nConsecutiveEqualFaceSets
<< " consecutive iterations produced the same "
<< " bad quality faceSet, stopping filtering"
<< "bad quality faceSet, stopping filtering"
<< endl;
break;
@ -197,16 +199,20 @@ void Foam::conformalVoronoiMesh::calcDualMesh
}
else
{
nConsecutiveEqualFaceSets = 0;
lastWrongFaces = wrongFaces;
}
timeCheck("End of filtering iteration");
} while (nBadQualityFaces > nInitialBadQualityFaces);
}
}
// Final dual face and owner neighbour construction
timeCheck();
timeCheck("Before createFacesOwnerNeighbourAndPatches");
createFacesOwnerNeighbourAndPatches
(
@ -227,7 +233,7 @@ void Foam::conformalVoronoiMesh::calcDualMesh
removeUnusedPoints(faces, points);
timeCheck();
timeCheck("End of calcDualMesh");
}
@ -1436,7 +1442,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
labelList patchStarts;
pointField cellCentres;
timeCheck();
timeCheck("Start of checkPolyMeshQuality");
Info<< nl << "Creating polyMesh to assess quality" << endl;
@ -1490,7 +1496,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
Info<< "NOT OVERRIDING CELL CENTRES" << endl;
// mesh.overrideCellCentres(cellCentres);
timeCheck();
timeCheck("polyMesh created, checking quality");
labelHashSet wrongFaces(pMesh.nFaces()/100);
@ -1828,11 +1834,11 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
owner.setSize(nInternalFaces);
neighbour.setSize(nInternalFaces);
timeCheck();
timeCheck("polyMesh quality checked");
sortFaces(faces, owner, neighbour);
timeCheck();
timeCheck("faces, owner, neighbour sorted");
addPatches
(

View File

@ -75,6 +75,8 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
reconformationMode reconfMode
)
{
timeCheck("Start buildSurfaceConformation");
if (reconfMode == rmCoarse)
{
Info<< nl << "Build coarse surface conformation" << endl;
@ -100,8 +102,6 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation
return;
}
timeCheck();
startOfSurfacePointPairs_ = number_of_vertices();
// Initialise containers to store the edge conformation locations

View File

@ -369,7 +369,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes
) const
{
{
timeCheck();
timeCheck("Start writeCellSizes");
Info<< nl << "Create targetCellSize volScalarField" << endl;

View File

@ -94,7 +94,7 @@ void Foam::hierarchicalDensityWeightedStochastic::recurseAndFill
if (debug)
{
cvMesh_.timeCheck();
cvMesh_.timeCheck(newName);
}
if (geometry.overlaps(subBB))