- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Description:The name of the variable that this residual object operates on
 
NormalNodalLMMechanicalContact
The NormalNodalLMMechanicalContact class is used to ensure that the Karush-Kuhn-Tucker conditions of mechanical contact are satisfied:
where is the gap and is the contact pressure, a Lagrange multipler variable living on the secondary face. This object enforces constraints nodally so that zero penetration of nodes is observed into the primary face.
The ncp_function_type parameter specifies the type of nonlinear complimentarity problem (NCP) function to use. The options are either min, which is just the min function, or fb which represents the Fischer-Burmeister function. In our experience, the min function achieves better convergence in the non-linear solve. The c parameter is used to balance the size of the gap and the normal contact pressure. If the contact pressure is of order 10000, and the gap is of order .01, then c should be set to 1e6 in order to bring components of the NCP function onto the same level and achieve optimal convergence in the non-linear solve.
Implements the KKT conditions for normal contact using an NCP function. Requires that either the gap distance or the normal contact pressure (represented by the value of variable) is zero. The LM variable must be of the same order as the mesh
Input Parameters
- c1Parameter for balancing the size of the gap and contact pressure
Default:1
C++ Type:double
Options:
Description:Parameter for balancing the size of the gap and contact pressure
 - disp_yThe y displacement
C++ Type:std::vector<VariableName>
Options:
Description:The y displacement
 - disp_zThe z displacement
C++ Type:std::vector<VariableName>
Options:
Description:The z displacement
 - ncp_function_typeminThe type of NCP function to use
Default:min
C++ Type:MooseEnum
Options:min, fb
Description:The type of NCP function to use
 - normal_smoothing_distanceDistance from edge in parametric coordinates over which to smooth contact normal
C++ Type:double
Options:
Description:Distance from edge in parametric coordinates over which to smooth contact normal
 - normal_smoothing_methodMethod to use to smooth normals (edge_based|nodal_normal_based)
C++ Type:std::string
Options:
Description:Method to use to smooth normals (edge_based|nodal_normal_based)
 - orderFIRSTThe finite element order used for projections
Default:FIRST
C++ Type:MooseEnum
Options:FIRST, SECOND, THIRD, FOURTH
Description:The finite element order used for projections
 - primaryThe boundary ID associated with the primary side
C++ Type:BoundaryName
Options:
Description:The boundary ID associated with the primary side
 - primary_variableThe variable on the primary side of the domain
C++ Type:std::vector<VariableName>
Options:
Description:The variable on the primary side of the domain
 - secondaryThe boundary ID associated with the secondary side
C++ Type:BoundaryName
Options:
Description:The boundary ID associated with the secondary side
 - tangential_toleranceTangential distance to extend edges of contact surfaces
C++ Type:double
Options:
Description:Tangential distance to extend edges of contact surfaces
 
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
 - enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
 - implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Options:
Description:Determines whether this object is calculated using an implicit or explicit form
 - seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Options:
Description:The seed for the master random number generator
 - use_displaced_meshTrueWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:True
C++ Type:bool
Options:
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
 
Advanced Parameters
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Options:
Description:The extra tags for the matrices this Kernel should fill
 - extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Options:
Description:The extra tags for the vectors this Kernel should fill
 - matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Description:The tag for the matrices this Kernel should fill
 - vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Description:The tag for the vectors this Kernel should fill
 
Tagging Parameters
Input Files
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite_noaction.i)
 - (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite_noaction.i)
 - (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-nodal-disp.i)
 - (modules/contact/examples/2d_indenter/indenter_rz_fine.i)
 - (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-mortar-disp.i)
 - (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-lm-mortar-disp.i)
 - (modules/contact/test/tests/mortar_tm/2d/frictionless_first/finite_noaction.i)
 - (modules/contact/test/tests/sliding_block/in_and_out/frictionless_lm.i)
 - (modules/contact/test/tests/mortar_tm/2d/frictionless_second/finite_noaction.i)
 - (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-fb-tangential-lm-mortar-disp.i)
 - (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-mortar-disp.i)
 - (modules/contact/test/tests/sliding_block/in_and_out/frictional_lm.i)
 - (modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
 - (modules/contact/test/tests/mechanical-small-problem/frictionless-nodal-lm-mortar-disp.i)
 - (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-nodal-disp.i)
 
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite_noaction.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_noaction'
[Problem]
  coord_type = RZ
[]
[Mesh]
  patch_size = 80
  patch_update_strategy = auto
  [./plank]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 0.6
    ymin = -10
    ymax = 10
    nx = 2
    ny = 67
    elem_type = ${elem}
    boundary_name_prefix = plank
  [../]
  [./plank_id]
    type = SubdomainIDGenerator
    input = plank
    subdomain_id = 1
  [../]
  [./block]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0.61
    xmax = 1.21
    ymin = 9.2
    ymax = 10.0
    nx = 3
    ny = 4
    elem_type = ${elem}
    boundary_name_prefix = block
    boundary_id_offset = 10
  [../]
  [./block_id]
    type = SubdomainIDGenerator
    input = block
    subdomain_id = 2
  [../]
  [./combined]
    type = MeshCollectionGenerator
    inputs = 'plank_id block_id'
  [../]
  [./block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block_id = '1 2'
    new_block_name = 'plank block'
  [../]
  [./secondary]
    input = block_rename
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'block_left'
    new_block_id = '30'
    new_block_name = 'frictionless_secondary_subdomain'
  [../]
  [./primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'plank_right'
    new_block_id = '20'
    new_block_name = 'frictionless_primary_subdomain'
  [../]
[]
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Variables]
  [./disp_x]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./disp_y]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./frictionless_normal_lm]
    order = ${order}
    block = 'frictionless_secondary_subdomain'
  [../]
[]
[Modules/TensorMechanics/Master]
  [./block]
    strain = FINITE
    generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
    block = 'block'
  [../]
  [./plank]
    strain = FINITE
    generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
    block = 'plank'
    eigenstrain_names = 'swell'
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = block_left
    primary = plank_right
    variable = frictionless_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
    use_displaced_mesh = true
  [../]
  [./normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
  [./normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    boundary = plank_left
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    boundary = plank_bottom
    value = 0.0
  [../]
  [./right_x]
    type = DirichletBC
    variable = disp_x
    boundary = block_right
    value = 0
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = block_right
    function = '-t'
  [../]
[]
[Materials]
  [./plank]
    type = ComputeIsotropicElasticityTensor
    block = 'plank'
    poissons_ratio = 0.3
    youngs_modulus = ${E_plank}
  [../]
  [./block]
    type = ComputeIsotropicElasticityTensor
    block = 'block'
    poissons_ratio = 0.3
    youngs_modulus = ${E_block}
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = 'plank block'
  [../]
  [./swell]
    type = ComputeEigenstrain
    block = 'plank'
    eigenstrain_name = swell
    eigen_base = '1 0 0 0 0 0 0 0 0'
    prefactor = swell_mat
  [../]
  [./swell_mat]
    type = GenericFunctionMaterial
    prop_names = 'swell_mat'
    prop_values = '7e-2*(1-cos(4*t))'
    block = 'plank'
  [../]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason'
  petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       1e-5          NONZERO               1e-15'
  end_time = 10
  dt = 0.1
  dtmin = 0.1
  timestep_tolerance = 1e-6
  line_search = 'contact'
  snesmf_reuse_base = false
[]
[Postprocessors]
  [./nl_its]
    type = NumNonlinearIterations
  [../]
  [./total_nl_its]
    type = CumulativeValuePostprocessor
    postprocessor = nl_its
  [../]
  [./l_its]
    type = NumLinearIterations
  [../]
  [./total_l_its]
    type = CumulativeValuePostprocessor
    postprocessor = l_its
  [../]
  [./contact]
    type = ContactDOFSetSize
    variable = frictionless_normal_lm
    subdomain = frictionless_secondary_subdomain
  [../]
  [./avg_hydro]
    type = ElementAverageValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./max_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./min_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
    value_type = min
  [../]
  [./avg_vonmises]
    type = ElementAverageValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./max_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./min_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
    value_type = min
  [../]
[]
[Outputs]
  exodus = true
  file_base = ${name}
  [./comp]
    type = CSV
    show = 'contact'
  [../]
  [./out]
    type = CSV
    file_base = '${name}_out'
  [../]
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite_noaction.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_noaction'
[Problem]
  coord_type = RZ
[]
[Mesh]
  patch_size = 80
  patch_update_strategy = auto
  [./plank]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 0.6
    ymin = 0
    ymax = 10
    nx = 2
    ny = 33
    elem_type = ${elem}
    boundary_name_prefix = plank
  [../]
  [./plank_id]
    type = SubdomainIDGenerator
    input = plank
    subdomain_id = 1
  [../]
  [./block]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0.61
    xmax = 1.21
    ymin = 9.2
    ymax = 10.0
    nx = 3
    ny = 4
    elem_type = ${elem}
    boundary_name_prefix = block
    boundary_id_offset = 10
  [../]
  [./block_id]
    type = SubdomainIDGenerator
    input = block
    subdomain_id = 2
  [../]
  [./combined]
    type = MeshCollectionGenerator
    inputs = 'plank_id block_id'
  [../]
  [./block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block_id = '1 2'
    new_block_name = 'plank block'
  [../]
  [./secondary]
    input = block_rename
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'block_left'
    new_block_id = '30'
    new_block_name = 'frictionless_secondary_subdomain'
  [../]
  [./primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'plank_right'
    new_block_id = '20'
    new_block_name = 'frictionless_primary_subdomain'
  [../]
[]
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Variables]
  [./disp_x]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./disp_y]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./frictionless_normal_lm]
    order = ${order}
    block = 'frictionless_secondary_subdomain'
  [../]
[]
[Modules/TensorMechanics/Master]
  [./block]
    strain = FINITE
    generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
    block = 'block'
  [../]
  [./plank]
    strain = FINITE
    generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
    block = 'plank'
    eigenstrain_names = 'swell'
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = block_left
    primary = plank_right
    variable = frictionless_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
    use_displaced_mesh = true
  [../]
  [./normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
  [./normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    preset = false
    boundary = plank_left
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    preset = false
    boundary = plank_bottom
    value = 0.0
  [../]
  [./right_x]
    type = DirichletBC
    variable = disp_x
    preset = false
    boundary = block_right
    value = 0
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    preset = false
    boundary = block_right
    function = '-t'
  [../]
[]
[Materials]
  [./plank]
    type = ComputeIsotropicElasticityTensor
    block = 'plank'
    poissons_ratio = 0.3
    youngs_modulus = ${E_plank}
  [../]
  [./block]
    type = ComputeIsotropicElasticityTensor
    block = 'block'
    poissons_ratio = 0.3
    youngs_modulus = ${E_block}
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = 'plank block'
  [../]
  [./swell]
    type = ComputeEigenstrain
    block = 'plank'
    eigenstrain_name = swell
    eigen_base = '1 0 0 0 0 0 0 0 0'
    prefactor = swell_mat
  [../]
  [./swell_mat]
    type = GenericFunctionMaterial
    prop_names = 'swell_mat'
    prop_values = '7e-2*(1-cos(4*t))'
    block = 'plank'
  [../]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason'
  petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       1e-5          NONZERO               1e-15'
  end_time = 5
  dt = 0.1
  dtmin = 0.1
  timestep_tolerance = 1e-6
  line_search = 'contact'
  snesmf_reuse_base = false
[]
[Postprocessors]
  [./nl_its]
    type = NumNonlinearIterations
  [../]
  [./total_nl_its]
    type = CumulativeValuePostprocessor
    postprocessor = nl_its
  [../]
  [./l_its]
    type = NumLinearIterations
  [../]
  [./total_l_its]
    type = CumulativeValuePostprocessor
    postprocessor = l_its
  [../]
  [./contact]
    type = ContactDOFSetSize
    variable = frictionless_normal_lm
    subdomain = frictionless_secondary_subdomain
  [../]
  [./avg_hydro]
    type = ElementAverageValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./max_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./min_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
    value_type = min
  [../]
  [./avg_vonmises]
    type = ElementAverageValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./max_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./min_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
    value_type = min
  [../]
[]
[Outputs]
  exodus = true
  file_base = ${name}
  [./comp]
    type = CSV
    show = 'contact'
  [../]
  [./out]
    type = CSV
    file_base = '${name}_out'
  [../]
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-nodal-disp.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
  scaling = 1e0
[]
[Mesh]
  file = long-bottom-block-1elem-blocks.e
[]
[Problem]
  kernel_coverage_check = false
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./normal_lm]
    block = 3
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 10
    primary = 20
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = 'fb'
  [../]
  [./disp_x]
    type = NormalNodalMechanicalContact
    secondary = 10
    primary = 20
    variable = disp_x
    primary_variable = disp_x
    lambda = normal_lm
    component = x
  [../]
  [./disp_y]
    type = NormalNodalMechanicalContact
    secondary = 10
    primary = 20
    variable = disp_y
    primary_variable = disp_y
    lambda = normal_lm
    component = y
  [../]
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    preset = false
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    preset = false
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    preset = false
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    preset = false
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  active = 'num_nl cumulative contact'
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/examples/2d_indenter/indenter_rz_fine.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Problem]
  coord_type = RZ
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Mesh]
  patch_update_strategy = auto
  patch_size = 2
  partitioner = centroid
  centroid_partitioner_direction = y
  [simple_mesh]
    type = FileMeshGenerator
    file = indenter_rz_fine_bigsideset.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '4'
    new_block_id = '10001'
    new_block_name = 'secondary_lower'
    input = simple_mesh
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '6'
    new_block_id = '10000'
    new_block_name = 'primary_lower'
    input = secondary
  []
  # For NodalVariableValue to work with distributed mesh
  allow_renumbering = false
[../]
[Functions]
  [disp_y]
    type = PiecewiseLinear
    x = '0.  1.0     2.0    2.6   3.0'
    y = '0.  -4.5   -5.7   -5.7  -4.0'
  []
[]
[Variables]
  [disp_x]
    order = FIRST
    family = LAGRANGE
    block = '1 2'
  []
  [disp_y]
    order = FIRST
    family = LAGRANGE
    block = '1 2'
  []
  [frictionless_normal_lm]
    block = 'secondary_lower'
  []
[]
[AuxVariables]
  [saved_x]
  []
  [saved_y]
  []
[]
[Modules/TensorMechanics/Master]
  [all]
    add_variables = true
    strain = FINITE
    block = '1 2'
    use_automatic_differentiation = false
    generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
    save_in = 'saved_x saved_y'
  []
[]
[BCs]
  # Symmetries of the Problem
  [symm_x_indenter]
    type = DirichletBC
    variable = disp_x
    boundary = 5
    value = 0.0
  []
  [symm_x_material]
    type = DirichletBC
    variable = disp_x
    boundary = 9
    value = 0.0
  []
  # Material should not fly away
  [material_base_y]
    type = DirichletBC
    variable = disp_y
    boundary = 8
    value = 0.0
  []
  # Drive indenter motion
  [disp_y]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 1
    function = disp_y
  []
[]
[Constraints]
  # All constraints below for mechanical contact (Mortar)
  [lm]
    type = NormalNodalLMMechanicalContact
    secondary = '4'
    primary = 6
    variable = frictionless_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    use_displaced_mesh = true
    tangential_tolerance = 0.01
  []
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '6'
    secondary_boundary = '4'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    variable = frictionless_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = true
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '6'
    secondary_boundary = '4'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    variable = frictionless_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = true
  []
[../]
[UserObjects]
  [slip_rate_gss]
    type = CrystalPlasticitySlipRateGSS
    variable_size = 48
    slip_sys_file_name = input_slip_sys_bcc48.txt
    num_slip_sys_flowrate_props = 2
    flowprops = '1 48 0.0001 0.01'
    uo_state_var_name = state_var_gss
    slip_incr_tol = 10.0
    block = 2
  []
  [slip_resistance_gss]
    type = CrystalPlasticitySlipResistanceGSS
    variable_size = 48
    uo_state_var_name = state_var_gss
    block = 2
  []
  [state_var_gss]
    type = CrystalPlasticityStateVariable
    variable_size = 48
    groups = '0 24 48'
    group_values = '900 1000' #120
    uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
    scale_factor = 1.0
    block = 2
  []
  [state_var_evol_rate_comp_gss]
    type = CrystalPlasticityStateVarRateComponentGSS
    variable_size = 48
    hprops = '1.4 1000 1200 2.5'
    uo_slip_rate_name = slip_rate_gss
    uo_state_var_name = state_var_gss
    block = 2
  []
[]
[Materials]
  [tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1.0e7
    poissons_ratio = 0.25
  []
  [stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [crysp]
    type = FiniteStrainUObasedCP
    block = 2
    stol = 1e-2
    tan_mod_type = exact
    uo_slip_rates = 'slip_rate_gss'
    uo_slip_resistances = 'slip_resistance_gss'
    uo_state_vars = 'state_var_gss'
    uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
    maximum_substep_iteration = 20
  []
  [elasticity_tensor]
    type = ComputeElasticityTensorCP
    block = 2
    C_ijkl = '265190 113650 113650 265190 113650 265190 75769 75769 75760'
    fill_method = symmetric9
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
                        '-pc_factor_shift_amount'
  petsc_options_value = 'lu       basic                 NONZERO               1e-15'
  line_search = 'none'
  automatic_scaling = true
  nl_abs_tol = 1.5e-07
  nl_rel_tol = 1.5e-07
  l_max_its = 40
  l_abs_tol = 1e-08
  l_tol = 1e-08
  start_time = 0.0
  dt = 0.01
  end_time = 3.0 # Executioner
[]
[Postprocessors]
  [maxdisp]
    type = NodalVariableValue
    nodeid = 39
    variable = disp_y
  []
  [resid_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
[]
[Outputs]
  [out]
    type = Exodus
    elemental_as_nodal = true
  []
  perf_graph = true
  csv = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-mortar-disp.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
  scaling = 1e0
[]
[Mesh]
  file = long-bottom-block-1elem-blocks.e
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./normal_lm]
    block = 3
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 10
    primary = 20
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = 'fb'
  [../]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  active = 'num_nl cumulative contact'
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-lm-mortar-disp.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
  scaling = 1e0
[]
[Mesh]
  file = long-bottom-block-1elem-blocks.e
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./normal_lm]
    block = 3
  [../]
  [./tangential_lm]
    block = 3
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [normal_lm]
    type = NormalNodalLMMechanicalContact
    primary = 20
    secondary = 10
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
  []
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_lm]
    type = TangentialNodalLMMechanicalContact
    primary = 20
    secondary = 10
    variable = tangential_lm
    primary_variable = disp_x
    disp_y = disp_y
    contact_pressure = normal_lm
    ncp_function_type = min
    mu = .1
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = tangential_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = tangential_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  [exodus]
    type = Exodus
    sync_times = '0 5 10 15 20 25 30 35 40 45 50'
    file_base = frictional-nodal-min-lm-mortar-disp_out
  []
  [dof]
    type = DOFMap
    execute_on = 'initial'
  []
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_first/finite_noaction.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_noaction'
[Mesh]
  patch_size = 80
  patch_update_strategy = auto
  [./plank]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = -0.3
    xmax = 0.3
    ymin = -10
    ymax = 10
    nx = 2
    ny = 67
    elem_type = ${elem}
    boundary_name_prefix = plank
  [../]
  [./plank_id]
    type = SubdomainIDGenerator
    input = plank
    subdomain_id = 1
  [../]
  [./block]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0.31
    xmax = 0.91
    ymin = 7.7
    ymax = 8.5
    nx = 3
    ny = 4
    elem_type = ${elem}
    boundary_name_prefix = block
    boundary_id_offset = 10
  [../]
  [./block_id]
    type = SubdomainIDGenerator
    input = block
    subdomain_id = 2
  [../]
  [./combined]
    type = MeshCollectionGenerator
    inputs = 'plank_id block_id'
  [../]
  [./block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block_id = '1 2'
    new_block_name = 'plank block'
  [../]
  [./secondary]
    input = block_rename
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'block_left'
    new_block_id = '30'
    new_block_name = 'frictionless_secondary_subdomain'
  [../]
  [./primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'plank_right'
    new_block_id = '20'
    new_block_name = 'frictionless_primary_subdomain'
  [../]
[]
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Variables]
  [./disp_x]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./disp_y]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./frictionless_normal_lm]
    order = ${order}
    block = 'frictionless_secondary_subdomain'
  [../]
[]
[Modules/TensorMechanics/Master]
  [./action]
    strain = FINITE
    generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
    block = 'plank block'
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = block_left
    primary = plank_right
    variable = frictionless_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
    use_displaced_mesh = true
  [../]
  [./normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
  [./normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    boundary = plank_left
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    boundary = plank_bottom
    value = 0.0
  [../]
  [./right_x]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = block_right
    function = '-0.04*sin(4*(t+1.5))+0.02'
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = block_right
    function = '-t'
  [../]
[]
[Materials]
  [./plank]
    type = ComputeIsotropicElasticityTensor
    block = 'plank'
    poissons_ratio = 0.3
    youngs_modulus = ${E_plank}
  [../]
  [./block]
    type = ComputeIsotropicElasticityTensor
    block = 'block'
    poissons_ratio = 0.3
    youngs_modulus = ${E_block}
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = 'plank block'
  [../]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason'
  petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       1e-5          NONZERO               1e-15'
  end_time = 13.5
  dt = 0.1
  dtmin = 0.1
  timestep_tolerance = 1e-6
  line_search = 'contact'
  snesmf_reuse_base = false
[]
[Postprocessors]
  [./nl_its]
    type = NumNonlinearIterations
  [../]
  [./total_nl_its]
    type = CumulativeValuePostprocessor
    postprocessor = nl_its
  [../]
  [./l_its]
    type = NumLinearIterations
  [../]
  [./total_l_its]
    type = CumulativeValuePostprocessor
    postprocessor = l_its
  [../]
  [./contact]
    type = ContactDOFSetSize
    variable = frictionless_normal_lm
    subdomain = frictionless_secondary_subdomain
  [../]
  [./avg_hydro]
    type = ElementAverageValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./max_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./min_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
    value_type = min
  [../]
  [./avg_vonmises]
    type = ElementAverageValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./max_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./min_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
    value_type = min
  [../]
[]
[Outputs]
  exodus = true
  file_base = ${name}
  [./comp]
    type = CSV
    show = 'contact'
  [../]
  [./out]
    type = CSV
    file_base = '${name}_out'
  [../]
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictionless_lm.i)
[Mesh]
  patch_size = 80
  [file]
    type = FileMeshGenerator
    file = sliding_elastic_blocks_2d.e
  []
  [secondary]
    input = file
    type = LowerDBlockFromSidesetGenerator
    sidesets = '3'
    new_block_id = '30'
  []
  [primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = '2'
    new_block_id = '20'
  []
[]
[GlobalParams]
  displacements = 'disp_x disp_y'
  volumetric_locking_correction = false
[]
[Modules/TensorMechanics/Master]
  [./all]
    add_variables = true
    strain = FINITE
    block = '1 2'
  [../]
[]
[Variables]
  [normal_lm]
    block = '30'
  []
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    boundary = 1
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    boundary = 1
    value = 0.0
  [../]
  [./right_x]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = horizontal_movement
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = vertical_movement
  [../]
[]
[Materials]
  [./left]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    constant_on = SUBDOMAIN
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
  petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       1e-5          NONZERO               1e-15'
  end_time = 15
  dt = 0.1
  dtmin = 0.01
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  timestep_tolerance = 1e-6
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  sync_times = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'
  [out]
    type = Exodus
    sync_only = true
  []
  [dof]
    execute_on = 'initial'
    type = DOFMap
  []
  [csv]
    type = CSV
    execute_on = 'nonlinear timestep_end'
  []
[]
[Functions]
  [./vertical_movement]
    type = ParsedFunction
    value = -t
  [../]
  [./horizontal_movement]
    type = ParsedFunction
    value = -0.04*sin(4*t)+0.02
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 3
    primary = 2
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
    use_displaced_mesh = true
  [../]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[Postprocessors]
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [lin]
    type = NumLinearIterations
  []
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '30'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_second/finite_noaction.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_noaction'
[Mesh]
  patch_size = 80
  patch_update_strategy = auto
  [./plank]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = -0.3
    xmax = 0.3
    ymin = -10
    ymax = 10
    nx = 2
    ny = 67
    elem_type = ${elem}
    boundary_name_prefix = plank
  [../]
  [./plank_id]
    type = SubdomainIDGenerator
    input = plank
    subdomain_id = 1
  [../]
  [./block]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0.31
    xmax = 0.91
    ymin = 7.7
    ymax = 8.5
    nx = 3
    ny = 4
    elem_type = ${elem}
    boundary_name_prefix = block
    boundary_id_offset = 10
  [../]
  [./block_id]
    type = SubdomainIDGenerator
    input = block
    subdomain_id = 2
  [../]
  [./combined]
    type = MeshCollectionGenerator
    inputs = 'plank_id block_id'
  [../]
  [./block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block_id = '1 2'
    new_block_name = 'plank block'
  [../]
  [./secondary]
    input = block_rename
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'block_left'
    new_block_id = '30'
    new_block_name = 'frictionless_secondary_subdomain'
  [../]
  [./primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'plank_right'
    new_block_id = '20'
    new_block_name = 'frictionless_primary_subdomain'
  [../]
[]
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Variables]
  [./disp_x]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./disp_y]
    order = ${order}
    block = 'plank block'
    scaling = ${fparse 2.0 / (E_plank + E_block)}
  [../]
  [./frictionless_normal_lm]
    order = ${order}
    block = 'frictionless_secondary_subdomain'
  [../]
[]
[Modules/TensorMechanics/Master]
  [./action]
    strain = FINITE
    generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
    block = 'plank block'
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = block_left
    primary = plank_right
    variable = frictionless_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
    use_displaced_mesh = true
  [../]
  [./normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
  [./normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = plank_right
    secondary_boundary = block_left
    primary_subdomain = frictionless_primary_subdomain
    secondary_subdomain = frictionless_secondary_subdomain
    variable = frictionless_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  [../]
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    preset = false
    boundary = plank_left
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    preset = false
    boundary = plank_bottom
    value = 0.0
  [../]
  [./right_x]
    type = FunctionDirichletBC
    variable = disp_x
    preset = false
    boundary = block_right
    function = '-0.04*sin(4*(t+1.5))+0.02'
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    preset = false
    boundary = block_right
    function = '-t'
  [../]
[]
[Materials]
  [./plank]
    type = ComputeIsotropicElasticityTensor
    block = 'plank'
    poissons_ratio = 0.3
    youngs_modulus = ${E_plank}
  [../]
  [./block]
    type = ComputeIsotropicElasticityTensor
    block = 'block'
    poissons_ratio = 0.3
    youngs_modulus = ${E_block}
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = 'plank block'
  [../]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason'
  petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       1e-5          NONZERO               1e-15'
  end_time = 13.5
  dt = 0.1
  dtmin = 0.1
  timestep_tolerance = 1e-6
  line_search = 'contact'
  snesmf_reuse_base = false
[]
[Postprocessors]
  [./nl_its]
    type = NumNonlinearIterations
  [../]
  [./total_nl_its]
    type = CumulativeValuePostprocessor
    postprocessor = nl_its
  [../]
  [./l_its]
    type = NumLinearIterations
  [../]
  [./total_l_its]
    type = CumulativeValuePostprocessor
    postprocessor = l_its
  [../]
  [./contact]
    type = ContactDOFSetSize
    variable = frictionless_normal_lm
    subdomain = frictionless_secondary_subdomain
  [../]
  [./avg_hydro]
    type = ElementAverageValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./max_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
  [../]
  [./min_hydro]
    type = ElementExtremeValue
    variable = hydrostatic_stress
    block = 'block'
    value_type = min
  [../]
  [./avg_vonmises]
    type = ElementAverageValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./max_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
  [../]
  [./min_vonmises]
    type = ElementExtremeValue
    variable = vonmises_stress
    block = 'block'
    value_type = min
  [../]
[]
[Outputs]
  exodus = true
  file_base = ${name}
  [./comp]
    type = CSV
    show = 'contact'
  [../]
  [./out]
    type = CSV
    file_base = '${name}_out'
  [../]
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-fb-tangential-lm-mortar-disp.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
  scaling = 1e0
[]
[Mesh]
  [./file_mesh]
    type = FileMeshGenerator
    file = long-bottom-block-1elem-blocks-coarse.e
  [../]
[]
[Variables]
  [./disp_x]
    block = '1 2'
    # order = SECOND
  [../]
  [./disp_y]
    block = '1 2'
    # order = SECOND
  [../]
  [./frictional_normal_lm]
    block = 3
    # family = MONOMIAL
    # order = CONSTANT
  [../]
  [./frictional_tangential_lm]
    block = 3
    family = MONOMIAL
    order = CONSTANT
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [frictional_normal_lm]
    type = NormalNodalLMMechanicalContact
    secondary = 10
    primary = 20
    variable = frictional_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
  [../]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = frictional_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = frictional_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [frictional_tangential_lm]
    type = TangentialMortarLMMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = frictional_tangential_lm
    secondary_variable = disp_x
    secondary_disp_y = disp_y
    use_displaced_mesh = true
    compute_primal_residuals = false
    contact_pressure = frictional_normal_lm
    friction_coefficient = .1
    ncp_function_type = fb
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = frictional_tangential_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = frictional_tangential_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  snesmf_reuse_base = false
  # [./Predictor]
  #   type = SimplePredictor
  #   scale = 1.0
  # [../]
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
  # checkpoint = true
  # [./dofmap]
  #   type = DOFMap
  #   execute_on = 'initial'
  # [../]
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = frictional_normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-mortar-disp.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
  scaling = 1e0
[]
[Mesh]
  file = long-bottom-block-1elem-blocks.e
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./normal_lm]
    block = 3
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 10
    primary = 20
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
  [../]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  active = 'num_nl cumulative contact'
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictional_lm.i)
[Mesh]
  patch_size = 80
  [file]
    type = FileMeshGenerator
    file = sliding_elastic_blocks_2d.e
  []
  [secondary]
    input = file
    type = LowerDBlockFromSidesetGenerator
    sidesets = '3'
    new_block_id = '30'
  []
  [primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = '2'
    new_block_id = '20'
  []
[]
[GlobalParams]
  volumetric_locking_correction = false
  displacements = 'disp_x disp_y'
[]
[Variables]
  [normal_lm]
    block = '30'
  []
  [tangential_lm]
    block = '30'
    family = MONOMIAL
    order = CONSTANT
  []
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    boundary = 1
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    boundary = 1
    value = 0.0
  [../]
  [./right_x]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = horizontal_movement
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = vertical_movement
  [../]
[]
[Modules/TensorMechanics/Master]
  [./all]
    add_variables = true
    strain = FINITE
    block = '1 2'
  [../]
[]
[Materials]
  [./tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    constant_on = SUBDOMAIN
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
  petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       1e-5          NONZERO               1e-15'
  end_time = 15
  dt = 0.1
  dtmin = 0.01
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  timestep_tolerance = 1e-6
  snesmf_reuse_base = false
  [./Predictor]
    type = SimplePredictor
    scale = 1.0
  [../]
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  sync_times = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'
  [out]
    type = Exodus
    sync_only = true
  []
  [dof]
    execute_on = 'initial'
    type = DOFMap
  []
  [csv]
    type = CSV
    execute_on = 'nonlinear timestep_end'
  []
[]
[Functions]
  [./vertical_movement]
    type = ParsedFunction
    value = -t
  [../]
  [./horizontal_movement]
    type = ParsedFunction
    value = -0.04*sin(4*t)+0.02
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 3
    primary = 2
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
    use_displaced_mesh = true
    c = 1e6 # relative scale difference between pressure and gap
  [../]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_lm]
    type = TangentialMortarLMMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = tangential_lm
    secondary_variable = disp_x
    secondary_disp_y = disp_y
    use_displaced_mesh = true
    compute_primal_residuals = false
    contact_pressure = normal_lm
    friction_coefficient = .4
    ncp_function_type = fb
    c = 1000 # relative scale difference between pressure and velocity
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = tangential_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '20'
    secondary_subdomain = '30'
    variable = tangential_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[Postprocessors]
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [lin]
    type = NumLinearIterations
  []
  [cum_lin]
    type = CumulativeValuePostprocessor
    postprocessor = lin
  []
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '30'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarsest mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
[]
[Mesh]
  file = level0.e
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./normal_lm]
    block = 3
  [../]
  [./tangential_lm]
    block = 3
    family = MONOMIAL
    order = CONSTANT
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [normal_lm]
    type = NormalNodalLMMechanicalContact
    secondary = 10
    primary = 20
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
    ncp_function_type = min
  [../]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_lm]
    type = TangentialMortarLMMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = tangential_lm
    secondary_variable = disp_x
    secondary_disp_y = disp_y
    use_displaced_mesh = true
    compute_primal_residuals = false
    contact_pressure = normal_lm
    friction_coefficient = .1
    ncp_function_type = fb
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = tangential_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 4
    secondary_subdomain = 3
    variable = tangential_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  num_steps = 3
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  nl_abs_tol = 1e-10
  num_grids = 5
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  [exo]
    type = Exodus
    sync_times = '15'
    sync_only = true
  []
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/mechanical-small-problem/frictionless-nodal-lm-mortar-disp.i)
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [./simple_mesh]
    type = FileMeshGenerator
    file = mesh.e
  [../]
  [./primary]
    type = LowerDBlockFromSidesetGenerator
    input = simple_mesh
    sidesets = '2'
    new_block_id = '3'
  [../]
  [./secondary]
    type = LowerDBlockFromSidesetGenerator
    input = primary
    sidesets = '1'
    new_block_id = '4'
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 1
    primary = 2
    variable = frictionless_normal_lm
    primary_variable = disp_x
    disp_y = disp_y
  [../]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '1'
    primary_subdomain = '3'
    secondary_subdomain = '4'
    variable = frictionless_normal_lm
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '1'
    primary_subdomain = '3'
    secondary_subdomain = '4'
    variable = frictionless_normal_lm
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
  []
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./frictionless_normal_lm]
    block = 4
  [../]
[]
[BCs]
  [./left_x]
    type = DirichletBC
    variable = disp_x
    boundary = 'outside_left'
    value = 0.0
  [../]
  [./left_y]
    type = DirichletBC
    variable = disp_y
    boundary = 'outside_left'
    value = 0.0
  [../]
  [./right_x]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 'outside_right'
    function = '-5e-3 * t'
  [../]
  [./right_y]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 'outside_right'
    function = 0
  [../]
[]
[Kernels]
  [disp_x]
    type = Diffusion
    variable = disp_x
    block = '1 2'
  []
  [disp_y]
    type = Diffusion
    variable = disp_y
    block = '1 2'
  []
[]
[Debug]
  show_var_residual_norms = 1
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Executioner]
  solve_type = PJFNK
  type = Transient
  num_steps = 10
  dt = 1
  dtmin = 1
  petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = 'lu       basic                 NONZERO               1e-15'
[]
[Outputs]
  exodus = true
[]
[Postprocessors]
  [contact]
    type = ContactDOFSetSize
    variable = frictionless_normal_lm
    subdomain = '4'
    execute_on = 'nonlinear timestep_end'
  []
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-nodal-disp.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
  displacements = 'disp_x disp_y'
  diffusivity = 1e0
  scaling = 1e0
[]
[Mesh]
  file = long-bottom-block-1elem-blocks.e
[]
[Problem]
  kernel_coverage_check = false
[]
[Variables]
  [./disp_x]
    block = '1 2'
  [../]
  [./disp_y]
    block = '1 2'
  [../]
  [./normal_lm]
    block = 3
  [../]
[]
[ICs]
  [./disp_y]
    block = 2
    variable = disp_y
    value = ${fparse starting_point + offset}
    type = ConstantIC
  [../]
[]
[Kernels]
  [./disp_x]
    type = MatDiffusion
    variable = disp_x
  [../]
  [./disp_y]
    type = MatDiffusion
    variable = disp_y
  [../]
[]
[Constraints]
  [./lm]
    type = NormalNodalLMMechanicalContact
    secondary = 10
    primary = 20
    variable = normal_lm
    primary_variable = disp_x
    disp_y = disp_y
  [../]
  [./disp_x]
    type = NormalNodalMechanicalContact
    secondary = 10
    primary = 20
    variable = disp_x
    primary_variable = disp_x
    lambda = normal_lm
    component = x
  [../]
  [./disp_y]
    type = NormalNodalMechanicalContact
    secondary = 10
    primary = 20
    variable = disp_y
    primary_variable = disp_y
    lambda = normal_lm
    component = y
  [../]
[]
[BCs]
  [./botx]
    type = DirichletBC
    variable = disp_x
    boundary = 40
    value = 0.0
  [../]
  [./boty]
    type = DirichletBC
    variable = disp_y
    boundary = 40
    value = 0.0
  [../]
  [./topy]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 30
    function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
  [../]
  [./leftx]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 50
    function = '1e-2 * t'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 200
  dt = 5
  dtmin = .1
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       NONZERO               1e-15                   1e-5'
  l_max_its = 30
  nl_max_its = 20
  line_search = 'none'
  snesmf_reuse_base = false
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
  [dof]
    type = DOFMap
    execute_on = 'initial'
  []
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]
[Postprocessors]
  active = 'num_nl cumulative contact'
  [./num_nl]
    type = NumNonlinearIterations
  [../]
  [./cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  [../]
  [contact]
    type = ContactDOFSetSize
    variable = normal_lm
    subdomain = '3'
    execute_on = 'nonlinear timestep_end'
  []
[]