-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Panzer/umr test fix #13735
base: develop
Are you sure you want to change the base?
Panzer/umr test fix #13735
Conversation
* change input mesh to one with extra geometry association data * the cmd used to make this mesh: /projects/cubit/extra -a -g 2block_cylinders_30deg.stp 2block_cylinders_30deg.g
@bricar Your commit needs to be signed. See e.g. https://github.com/orgs/trilinos/discussions/13497 |
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
@bricar I have some suggestions for this merge request and attached a patch since I can't push to your branch. The first change just updates the CMake command to copy the new *.a.g mesh file instead of the old *.g one. The second change adds a test to check for snapping. Finally, I'm guessing we don't need the diff --git a/packages/panzer/adapters-stk/test/stk_interface_test/CMakeLists.txt b/packages/panzer/adapters-stk/test/stk_interface_test/CMakeLists.txt
index 897aad0c239..66520e76049 100644
--- a/packages/panzer/adapters-stk/test/stk_interface_test/CMakeLists.txt
+++ b/packages/panzer/adapters-stk/test/stk_interface_test/CMakeLists.txt
@@ -178,7 +178,7 @@ ENDIF()
# This test appears to have fallen into disrepair. #3719
TRIBITS_COPY_FILES_TO_BINARY_DIR(stk_interface_copy
- SOURCE_FILES basic.gen basic.gen.2.0 basic.gen.2.1 basic3d.gen basic3d.gen.2.0 basic3d.gen.2.1 twoblock_cube.gen twoblock_cube.gen.2.0 twoblock_cube.gen.2.1 quad8.jou quad8.gen 2block_cylinders_30deg.g 2block_cylinders_30deg.stp
+ SOURCE_FILES basic.gen basic.gen.2.0 basic.gen.2.1 basic3d.gen basic3d.gen.2.0 basic3d.gen.2.1 twoblock_cube.gen twoblock_cube.gen.2.0 twoblock_cube.gen.2.1 quad8.jou quad8.gen 2block_cylinders_30deg.a.g 2block_cylinders_30deg.stp
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/meshes"
DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/meshes"
EXEDEPS tExodusReaderFactory
diff --git a/packages/panzer/adapters-stk/test/stk_interface_test/tExodusReaderFactory.cpp b/packages/panzer/adapters-stk/test/stk_interface_test/tExodusReaderFactory.cpp
index 4b00834d175..769d1933acd 100644
--- a/packages/panzer/adapters-stk/test/stk_interface_test/tExodusReaderFactory.cpp
+++ b/packages/panzer/adapters-stk/test/stk_interface_test/tExodusReaderFactory.cpp
@@ -728,6 +728,21 @@ TEUCHOS_UNIT_TEST(tExodusReaderFactory, umr_refine_once_with_geometry)
TEST_EQUALITY((int) globalCounts[mesh->getFaceRank()],x.second*4);
}
+ if (x.first == "inner") {
+ // The inner surface has an xy magnitude of 1 while the outer surface has a magnitude of 2
+ constexpr double inner_radius = 1.0, tol = 1e-10;
+ stk::mesh::Selector ss_selector = *ss_part;
+ const bool sort_by_gid = true;
+ std::vector<stk::mesh::Entity> nodes;
+ stk::mesh::get_selected_entities(ss_selector, mesh->getBulkData()->buckets(mesh->getNodeRank()), nodes, sort_by_gid);
+ for (auto&& node : nodes) {
+ const double* coords = mesh->getNodeCoordinates(node);
+ const double x = coords[0], y = coords[1];
+ const double xymag = std::sqrt(x * x + y * y);
+ TEST_FLOATING_EQUALITY(inner_radius, xymag, tol);
+ }
+ }
+ }
mesh->writeToExodus("meshes/2block_cylinders_30deg.r1.g");
}
#endif |
@trilinos/panzer
Motivation
UMR unit test was not snapping to geometry. Update mesh to have geometry association stored on the mesh. New mesh ends with ".a.g" instead of just ".g". Command to do this was: /projects/cubit/extra -a -g 2block_cylinders_30deg.stp 2block_cylinders_30deg.g.
Test still does not check that coordinates were snapped to geometry. This could be done with more work.
I did not verify the build and test myself. This was done by Ryan Viertel.
Related Issues
Stakeholder Feedback
Testing