Skip to content

Commit

Permalink
Temporary work-around for un-related bug being addressed by PR #1271.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunney1 committed Feb 21, 2024
1 parent 3b8e997 commit 779de44
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/axom/quest/examples/quest_marching_cubes_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ struct ContourTestBase
}
repsTimer.stop();
SLIC_INFO(axom::fmt::format("Finished {} object reps x {} contour reps",
params.objectRepCount, params.contourGenCount));
params.objectRepCount,
params.contourGenCount));
printTimingStats(repsTimer, name() + " contour");

auto& mc = *mcPtr;
Expand All @@ -823,11 +824,11 @@ struct ContourTestBase
// Put contour mesh in a mint object for error checking and output.
std::string sidreGroupName = name() + "_mesh";
sidre::DataStore objectDS;
// While awaiting fix for PR #1271, don't use Sidre storage in contourMesh.
sidre::Group* meshGroup = objectDS.getRoot()->createGroup(sidreGroupName);
axom::mint::UnstructuredMesh<axom::mint::SINGLE_SHAPE> contourMesh(
DIM,
DIM == 2 ? mint::CellType::SEGMENT : mint::CellType::TRIANGLE,
meshGroup);
DIM == 2 ? mint::CellType::SEGMENT : mint::CellType::TRIANGLE);
axom::utilities::Timer extractTimer(false);
extractTimer.start();
mc.populateContourMesh(contourMesh, m_parentCellIdField, m_domainIdField);
Expand All @@ -846,10 +847,14 @@ struct ContourTestBase
checkCellsContainingContour(computationalMesh, contourMesh);
}

// Write contour mesh to file.
std::string outputName = name() + "_contour_mesh";
saveMesh(*meshGroup, outputName);
SLIC_INFO(axom::fmt::format("Wrote {} contour in {}", name(), outputName));
if(contourMesh.hasSidreGroup())
{
assert(contourMesh.getSidreGroup() == meshGroup);
// Write contour mesh to file.
std::string outputName = name() + "_contour_mesh";
saveMesh(*contourMesh.getSidreGroup(), outputName);
SLIC_INFO(axom::fmt::format("Wrote {} contour in {}", name(), outputName));
}

objectDS.getRoot()->destroyGroupAndData(sidreGroupName);

Expand Down

0 comments on commit 779de44

Please sign in to comment.