diff --git a/framework/src/userobjects/ElementSubdomainModifierBase.C b/framework/src/userobjects/ElementSubdomainModifierBase.C index 01e6fed54cc5..0094c723b9f7 100644 --- a/framework/src/userobjects/ElementSubdomainModifierBase.C +++ b/framework/src/userobjects/ElementSubdomainModifierBase.C @@ -368,9 +368,9 @@ ElementSubdomainModifierBase::applyMovingBoundaryChanges(MooseMesh & mesh) Parallel::push_parallel_vector_data( bnd_info.comm(), add_ghost_sides, - [&mesh, &bnd_info, this]( - processor_id_type, - const std::vector> & received) + [&mesh, + &bnd_info](processor_id_type, + const std::vector> & received) { for (const auto & [elem_id, side, bnd] : received) bnd_info.add_side(mesh.elemPtr(elem_id), side, bnd); @@ -379,9 +379,9 @@ ElementSubdomainModifierBase::applyMovingBoundaryChanges(MooseMesh & mesh) Parallel::push_parallel_vector_data( bnd_info.comm(), remove_ghost_sides, - [&mesh, &bnd_info, this]( - processor_id_type, - const std::vector> & received) + [&mesh, + &bnd_info](processor_id_type, + const std::vector> & received) { for (const auto & [elem_id, side, bnd] : received) bnd_info.remove_side(mesh.elemPtr(elem_id), side, bnd); diff --git a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e index 5ff07a23c1e4..fa7fdc037e00 100644 Binary files a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e and b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e differ diff --git a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s002 b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s002 index 98eefa33570d..fa9fee753771 100644 Binary files a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s002 and b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s002 differ diff --git a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s003 b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s003 index ebb1e7ac0210..015e8375ab46 100644 Binary files a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s003 and b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s003 differ diff --git a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s004 b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s004 index 5fe619e9310a..7ae7a94be49c 100644 Binary files a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s004 and b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s004 differ diff --git a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s005 b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s005 index a1a0a04a7b55..9e98fc550ec7 100644 Binary files a/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s005 and b/modules/xfem/test/tests/moving_interface/gold/moving_bimaterial_finite_strain_esm_out.e-s005 differ diff --git a/modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i b/modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i index 4e57e6eb04b9..e7762a425120 100644 --- a/modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i +++ b/modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i @@ -20,8 +20,7 @@ [esm] type = CutElementSubdomainModifier geometric_cut_userobject = level_set_cut_uo - initialize_variables = 'disp_x disp_y' - initialization_strategy = 'NEAREST' + reinitialize_subdomains = '' #no reinitialization of variables or material properties [] [] diff --git a/modules/xfem/test/tests/moving_interface/test_level_set_subdomain_change.i b/modules/xfem/test/tests/moving_interface/test_level_set_subdomain_change.i new file mode 100644 index 000000000000..83a036a550fb --- /dev/null +++ b/modules/xfem/test/tests/moving_interface/test_level_set_subdomain_change.i @@ -0,0 +1,112 @@ +[Problem] + solve = false +[] + +[XFEM] + output_cut_plane = true +[] + +[UserObjects] + [level_set_cut_uo] + type = LevelSetCutUserObject + level_set_var = ls + heal_always = true + [] + [esm] + type = CutElementSubdomainModifier + geometric_cut_userobject = level_set_cut_uo + reinitialize_subdomains = '' + [] +[] + +[Mesh] + use_displaced_mesh = true + [generated_mesh] + type = GeneratedMeshGenerator + dim = 2 + nx = 10 + ny = 10 + xmin = 0 + xmax = 5 + ymin = 0 + ymax = 5 + elem_type = QUAD4 + [] + [bottom] + type = SubdomainBoundingBoxGenerator + input = generated_mesh + block_id = 0 + bottom_left = '0 0 0' + top_right = '5 2.5 0' + [] + [top] + type = SubdomainBoundingBoxGenerator + input = bottom + block_id = 1 + bottom_left = '0 2.5 0' + top_right = '5 5 0' + [] +[] + +[Functions] + [ls_func] + type = ParsedFunction + expression = 'y-2.73+t' + [] +[] + +[AuxVariables] + [ls] + [] + [u] + [] +[] + +[ICs] + [u_1] + type = ConstantIC + variable = 'u' + value = 1 + block = 0 + [] + [u_2] + type = ConstantIC + variable = 'u' + value = 2 + block = 1 + [] +[] + +[AuxKernels] + [ls_function] + type = FunctionAux + variable = ls + function = ls_func + [] +[] + +[Executioner] + type = Transient + + solve_type = NEWTON + petsc_options_iname = '-pc_type' + petsc_options_value = 'lu' + automatic_scaling = true + + # controls for nonlinear iterations + nl_max_its = 15 + nl_rel_tol = 1e-13 + nl_abs_tol = 1e-50 + + # time control + start_time = 0.0 + dt = 0.1 + num_steps = 4 + + max_xfem_update = 1 +[] + +[Outputs] + print_linear_residuals = false + exodus = true +[] diff --git a/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e b/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e index e8f0301735a8..c43237c02d48 100644 Binary files a/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e and b/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e differ diff --git a/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s004 b/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s002 similarity index 80% rename from test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s004 rename to test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s002 index 9f8fe245047d..60be3837ddae 100644 Binary files a/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s004 and b/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s002 differ diff --git a/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s006 b/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s003 similarity index 80% rename from test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s006 rename to test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s003 index 36592ae2a1f6..09023d3603d2 100644 Binary files a/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s006 and b/test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e-s003 differ diff --git a/test/tests/mesh/add_subdomain_ids/tests b/test/tests/mesh/add_subdomain_ids/tests index d69da680868b..9a29bdb7c6e1 100644 --- a/test/tests/mesh/add_subdomain_ids/tests +++ b/test/tests/mesh/add_subdomain_ids/tests @@ -19,7 +19,7 @@ [add_subdomain_names] type = Exodiff input = add_subdomain_names.i - exodiff = 'add_subdomain_names_out.e add_subdomain_names_out.e-s004 add_subdomain_names_out.e-s006' + exodiff = 'add_subdomain_names_out.e add_subdomain_names_out.e-s002 add_subdomain_names_out.e-s003' exodiff_opts = '-pedantic' issues = '#27474' design = MooseMesh.md