Skip to content

Commit

Permalink
Merge pull request #29363 from NamjaeChoi/execution_group
Browse files Browse the repository at this point in the history
Let UserObject initialSetup honor execution group
  • Loading branch information
lindsayad authored Dec 6, 2024
2 parents 82cdfd9 + 7de4efa commit 7e73546
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/src/problems/FEProblemBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -1011,8 +1011,13 @@ FEProblemBase::initialSetup()
groupUserObjects(
theWarehouse(), getAuxiliarySystem(), _app.getExecuteOnEnum(), userobjs, depend_objects_ic);

std::map<int, std::vector<UserObject *>> group_userobjs;
for (auto obj : userobjs)
obj->initialSetup();
group_userobjs[obj->getParam<int>("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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
[../]
[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
n_step_growth = 1
growth_rate = growth_func_v
crack_front_nodes = '7 6 5 4'
execution_order_group = -2
[../]
[]

Expand Down

0 comments on commit 7e73546

Please sign in to comment.