Skip to content

Commit

Permalink
debugging from checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendy-Ji committed Jul 25, 2024
1 parent b151191 commit fee45dd
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 9 deletions.
12 changes: 6 additions & 6 deletions framework/src/userobjects/ElementSubdomainModifierBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::tuple<dof_id_type, unsigned short, BoundaryID>> & received)
[&mesh,
&bnd_info](processor_id_type,
const std::vector<std::tuple<dof_id_type, unsigned short, BoundaryID>> & received)
{
for (const auto & [elem_id, side, bnd] : received)
bnd_info.add_side(mesh.elemPtr(elem_id), side, bnd);
Expand All @@ -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<std::tuple<dof_id_type, unsigned short, BoundaryID>> & received)
[&mesh,
&bnd_info](processor_id_type,
const std::vector<std::tuple<dof_id_type, unsigned short, BoundaryID>> & received)
{
for (const auto & [elem_id, side, bnd] : received)
bnd_info.remove_side(mesh.elemPtr(elem_id), side, bnd);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
[]
[]

Expand Down
Original file line number Diff line number Diff line change
@@ -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
[]
Binary file modified test/tests/mesh/add_subdomain_ids/gold/add_subdomain_names_out.e
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion test/tests/mesh/add_subdomain_ids/tests
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fee45dd

Please sign in to comment.