Skip to content

Commit

Permalink
Merge pull request #1267 from LLNL/feature/gunney/closest-point-3d-tests
Browse files Browse the repository at this point in the history
Add 3D tests for DistributedClosestPoints
  • Loading branch information
gunney1 committed Feb 6, 2024
2 parents f77fd2e + 8617ed1 commit a29fc73
Show file tree
Hide file tree
Showing 3 changed files with 403 additions and 329 deletions.
2 changes: 1 addition & 1 deletion src/axom/quest/DistributedClosestPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void DistributedClosestPoint::computeClosestPoints(conduit::Node& query_node,
case 3:
m_dcp_3->setSquaredDistanceThreshold(m_sqDistanceThreshold);
m_dcp_3->setMpiCommunicator(m_mpiComm);
m_dcp_2->setOutputSwitches(m_outputRank,
m_dcp_3->setOutputSwitches(m_outputRank,
m_outputIndex,
m_outputDistance,
m_outputCoords,
Expand Down
25 changes: 19 additions & 6 deletions src/axom/quest/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,34 @@ if(AXOM_ENABLE_MPI AND AXOM_ENABLE_SIDRE AND HDF5_FOUND)
endif()

# Non-zero empty-rank probability tests domain underloading case
set(_meshes "mdmesh.2x1" "mdmesh.2x3")
set(_meshes "mdmesh.2x1" "mdmesh.2x3" "mdmesh.2x2x1" "mdmeshg.2x2x1")
# The mdmesh.* files were generated by these commands:
# src/tools/gen-multidom-structured-mesh.py -ml=0,0 -mu=2,2 -ms=100,100 -dc=2,1 -o mdmesh.2x1
# src/tools/gen-multidom-structured-mesh.py -ml=0,0 -mu=2,2 -ms=100,100 -dc=2,3 -o mdmesh.2x3
# src/tools/gen-multidom-structured-mesh.py -ml=0,0,0 -mu=2,2,2 -ms=20,20,15 -dc=2,2,1 -o mdmeshg.2x2x1 --strided
foreach(_pol ${_policies})
foreach(_mesh ${_meshes})
# Add test with data on all ranks
set(_test "quest_distributed_closest_point_run_2D_${_pol}_${_mesh}")
# Determine problem dimension by mesh filename.
# and set dimension-dependent arguments.
string(REGEX MATCH "\\.[0-9]+(x[0-9]+)+$" _sizes "${_mesh}")
string(REGEX MATCHALL "[0-9]+" _sizes ${_sizes})
list(LENGTH _sizes _ndim)

if(_ndim EQUAL 2)
set(_center 0.7 0.9)
elseif(_ndim EQUAL 3)
set(_center 0.7 0.9 0.5)
endif()

set(_test "quest_distributed_closest_point_run_${_ndim}D_${_pol}_${_mesh}")
axom_add_test(
NAME ${_test}
COMMAND quest_distributed_distance_query_ex
--mesh-file ${quest_data_dir}/${_mesh}.root
--num-samples 500
--center 1.2 1.5
--radius 0.75
--long-point-count 60
--center ${_center}
--radius 0.9
--lat-point-count 30
--obj-domain-count-range 0 2
--dist-threshold .3
--no-random-spacing
Expand Down

0 comments on commit a29fc73

Please sign in to comment.