From 338b1ea79bc6ef2dd260247a12f1ea71f2362e41 Mon Sep 17 00:00:00 2001 From: Namjae Choi Date: Thu, 5 Dec 2024 14:14:50 -0700 Subject: [PATCH 1/2] Let UserObject initialSetup honor execution group #29362 --- framework/src/problems/FEProblemBase.C | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/src/problems/FEProblemBase.C b/framework/src/problems/FEProblemBase.C index 098d4485cf13..436636f0d747 100644 --- a/framework/src/problems/FEProblemBase.C +++ b/framework/src/problems/FEProblemBase.C @@ -1011,8 +1011,13 @@ FEProblemBase::initialSetup() groupUserObjects( theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic); + std::map> group_userobjs; for (auto obj : userobjs) - obj->initialSetup(); + group_userobjs[obj->getParam("execution_order_group")].push_back(obj); + + for (auto & [group, objs] : group_userobjs) + for (auto obj : objs) + obj->initialSetup(); // check if jacobian calculation is done in userobject for (THREAD_ID tid = 0; tid < n_threads; ++tid) From 7de4efaec4332b3dda35f4a1127ae7d56b8e3e06 Mon Sep 17 00:00:00 2001 From: Namjae Choi Date: Thu, 5 Dec 2024 20:27:57 -0700 Subject: [PATCH 2/2] Fix tests #29362 --- .../test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i | 1 + .../xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i b/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i index 9ef67bdf8933..3b397662832d 100644 --- a/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i +++ b/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i @@ -37,6 +37,7 @@ growth_direction_z = growth_func_z growth_rate = growth_func_v crack_front_nodes = '7 6 5 4' + execution_order_group = -2 [../] [] diff --git a/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i b/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i index 20dcb69735b9..6eb48ea85e28 100644 --- a/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i +++ b/modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i @@ -33,6 +33,7 @@ n_step_growth = 1 growth_rate = growth_func_v crack_front_nodes = '7 6 5 4' + execution_order_group = -2 [../] []