Skip to content

Panzer/umr test fix#13735

Closed
bricar wants to merge 1 commit intotrilinos:developfrom
bricar:panzer/umr_test_fix
Closed

Panzer/umr test fix#13735
bricar wants to merge 1 commit intotrilinos:developfrom
bricar:panzer/umr_test_fix

Conversation

@bricar
Copy link
Contributor

@bricar bricar commented Jan 20, 2025

@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

* 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 bricar requested a review from a team as a code owner January 20, 2025 16:32
@cgcgcg cgcgcg changed the base branch from master to develop January 20, 2025 16:35
@cgcgcg
Copy link
Contributor

cgcgcg commented Jan 20, 2025

@bricar Your commit needs to be signed. See e.g. https://github.com/orgs/trilinos/discussions/13497

@trilinos-autotester
Copy link
Contributor

Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging
NO INSPECTION HAS BEEN PERFORMED ON THIS PULL REQUEST! - This PR must be inspected by setting label 'AT: PRE-TEST INSPECTED'.

@rppawlo rppawlo self-assigned this Jan 20, 2025
@rppawlo rppawlo added pkg: Panzer client: EMPIRE All issues that most directly target the ATDM EMPIRE code PA: Discretizations Issues that fall under the Trilinos Discretizations Product Area labels Jan 20, 2025
@danielsjensen1
Copy link

@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 pl->set("Geometry File Name","meshes/2block_cylinders_30deg.stp"); line anymore but removing it breaks something so I didn't include it in the patch below.

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

@github-actions
Copy link

This Pull Request has been marked for closure due to inactivity.
Because of the changing nature of the Trilinos source due to active development, a pull request with no activity for 365 days is considered to be abandoned and will be automatically closed after 30 additional days of inactivity from when it was marked inactive.
If this should be kept open, please post a comment and/or remove the label MARKED_FOR_CLOSURE to reset the inactivity timer.
If it is ok for this pull request to be closed, feel free to go ahead and close it. Please do not add any comments or change any labels or otherwise touch this issue unless your intention is to reset the inactivity counter for an additional year.

@github-actions github-actions bot added the MARKED_FOR_CLOSURE Issue or PR is marked for auto-closure by the GitHub Actions bot. label Jan 21, 2026
@github-actions
Copy link

This Pull Request has been automatically closed due to 395 days of inactivity.

@github-actions github-actions bot added the CLOSED_DUE_TO_INACTIVITY Issue or PR has been closed by the GitHub Actions bot due to inactivity. label Feb 21, 2026
@github-actions github-actions bot closed this Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client: EMPIRE All issues that most directly target the ATDM EMPIRE code CLOSED_DUE_TO_INACTIVITY Issue or PR has been closed by the GitHub Actions bot due to inactivity. MARKED_FOR_CLOSURE Issue or PR is marked for auto-closure by the GitHub Actions bot. PA: Discretizations Issues that fall under the Trilinos Discretizations Product Area pkg: Panzer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants