Skip to content

Commit

Permalink
Improve output formatting and fix an error in computing tolerance in 3D.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunney1 committed Jul 10, 2024
1 parent 662f2cc commit 30a4b72
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -983,11 +983,6 @@ class QueryMeshWrapper
SLIC_ASSERT(queryPts.size() == cpCoords.size());
SLIC_ASSERT(queryPts.size() == cpIndices.size());

if(params.isVerbose())
{
SLIC_INFO(axom::fmt::format("Closest points ({}):", cpCoords.size()));
}

/*
Allowable slack is half the arclength between 2 adjacent object
points. A query point on the object can correctly have that
Expand All @@ -999,7 +994,7 @@ class QueryMeshWrapper
const double longSpacing =
2 * M_PI * params.circleRadius / params.longPointCount;
const double latSpacing = params.circleRadius * M_PI / 180 *
(params.latRange[1] - params.latRange[0]) / params.latPointCount;
(params.latRange[1] - params.latRange[0]) / (params.latPointCount - 1);
const double avgObjectRes = DIM == 2
? longSpacing
: std::sqrt(longSpacing * longSpacing + latSpacing * latSpacing);
Expand Down Expand Up @@ -1572,13 +1567,13 @@ int main(int argc, char** argv)
getIntMinMax(int(query.searchCount()), minSearchCount, maxSearchCount, sumSearchCount);

SLIC_INFO(axom::fmt::format(
"Initialization with policy {} took {{avg:{}, min:{}, max:{}}} seconds",
"Initialization with policy {} took {{avg:{:.5f}, min:{:.5f}, max:{:.5f}}} seconds",
axom::runtime_policy::s_policyToName.at(params.policy),
sumInit / num_ranks,
minInit,
maxInit));
SLIC_INFO(axom::fmt::format(
"Query with policy {} took {{avg:{}, min:{}, max:{}}} seconds",
"Query with policy {} took {{avg:{:.5f}, min:{:.5f}, max:{:.5f}}} seconds",
axom::runtime_policy::s_policyToName.at(params.policy),
sumQuery / num_ranks,
minQuery,
Expand All @@ -1589,7 +1584,7 @@ int main(int argc, char** argv)
minSearchCount,
maxSearchCount));
SLIC_INFO(axom::fmt::format(
"Effective distance threshold {{avg:{}, min:{}, max:{}}}",
"Effective distance threshold {{avg:{:.5f}, min:{:.5f}, max:{:.5f}}}",
sumFilterDist / num_ranks,
minFilterDist,
maxFilterDist));
Expand Down Expand Up @@ -1642,6 +1637,7 @@ int main(int argc, char** argv)

queryMeshWrapper.saveMesh(params.distanceFile);

axom::slic::flushStreams();
if(errCount)
{
SLIC_INFO(axom::fmt::format(" Error exit: {} errors found.", errCount));
Expand Down

0 comments on commit 30a4b72

Please sign in to comment.