- contact_quantityThe desired contact quantity to output as an auxiliary variable.C++ Type:MooseEnum Controllable:No Description:The desired contact quantity to output as an auxiliary variable. 
- user_objectThe penalty mortar user object to get values from. Note that the user object must implement the corresponding getter function.C++ Type:UserObjectName Controllable:No Description:The penalty mortar user object to get values from. Note that the user object must implement the corresponding getter function. 
- variableThe name of the variable that this object applies toC++ Type:AuxVariableName Unit:(no unit assumed) Controllable:No Description:The name of the variable that this object applies to 
MortarUserObjectAux
Description
The MortarUserObjectAux outputs various contact quantities that are helpful for analyzing or debugging contact results. This auxiliary kernel is to be used in conjunction with mortar penalty contact user objects, namely PenaltyFrictionUserObject or PenaltyWeightedGapUserObject.
Quantities that this object can output include: the normal and friction pressure values, accumulated slip distances, tangential relative velocities, and weighted gap values.
Input Parameters
- blockThe list of blocks (ids or names) that this object will be appliedC++ Type:std::vector<SubdomainName> Controllable:No Description:The list of blocks (ids or names) that this object will be applied 
- boundaryThe list of boundaries (ids or names) from the mesh where this object appliesC++ Type:std::vector<BoundaryName> Controllable:No Description:The list of boundaries (ids or names) from the mesh where this object applies 
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a meshDefault:True C++ Type:bool Controllable:No Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh 
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.C++ Type:std::vector<std::string> Controllable:No Description:Adds user-defined labels for accessing object parameters via control logic. 
- enableTrueSet the enabled status of the MooseObject.Default:True C++ Type:bool Controllable:Yes Description:Set the enabled status of the MooseObject. 
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).Default:nearest_node_connected_sides C++ Type:MooseEnum Options:nearest_node_connected_sides, all_proximate_sides Controllable:No Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes). 
- seed0The seed for the master random number generatorDefault:0 C++ Type:unsigned int Controllable:No Description:The seed for the master random number generator 
- use_displaced_meshFalseWhether 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:False C++ Type:bool Controllable:No 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
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.C++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character. 
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.Default:False C++ Type:bool Controllable:No Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction. 
Material Property Retrieval Parameters
Input Files
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-penalty.i)
- (modules/contact/test/tests/mortar_augmented_lagrange/aux_errors.i)
- (modules/contact/test/tests/pdass_problems/ironing_penalty.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-al.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-penalty.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_bussetta_simple.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al.i)
- (modules/contact/test/tests/pdass_problems/ironing_penalty_action.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_adaptivity.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_test_nochange.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_tight.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_tight_slip.i)
- (modules/contact/test/tests/pdass_problems/ironing_penalty_al.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_backup.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg.i)
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-penalty.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = normal_uo
    contact_quantity = normal_pressure
  []
[]
[Mesh]
  [top_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 3
    ny = 3
    nz = 3
    xmin = -0.25
    xmax = 0.25
    ymin = -0.25
    ymax = 0.25
    zmin = -0.25
    zmax = 0.25
    elem_type = HEX8
  []
  [rotate_top_block]
    type = TransformGenerator
    input = top_block
    transform = ROTATE
    vector_value = '0 0 0'
  []
  [top_block_sidesets]
    type = RenameBoundaryGenerator
    input = rotate_top_block
    old_boundary = '0 1 2 3 4 5'
    new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
  []
  [top_block_id]
    type = SubdomainIDGenerator
    input = top_block_sidesets
    subdomain_id = 1
  []
  [bottom_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 10
    ny = 10
    nz = 2
    xmin = -.5
    xmax = .5
    ymin = -.5
    ymax = .5
    zmin = -.3
    zmax = -.25
    elem_type = HEX8
  []
  [bottom_block_id]
    type = SubdomainIDGenerator
    input = bottom_block
    subdomain_id = 2
  []
  [bottom_block_change_boundary_id]
    type = RenameBoundaryGenerator
    input = bottom_block_id
    old_boundary = '0 1 2 3 4 5'
    new_boundary = '100 101 102 103 104 105'
  []
  [combined]
    type = MeshCollectionGenerator
    inputs = 'top_block_id bottom_block_change_boundary_id'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block = '1 2'
    new_block = 'top_block bottom_block'
  []
  [bottom_right_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = block_rename
    new_boundary = bottom_right
    block = bottom_block
    normal = '1 0 0'
  []
  [bottom_left_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_right_sideset
    new_boundary = bottom_left
    block = bottom_block
    normal = '-1 0 0'
  []
  [bottom_top_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_left_sideset
    new_boundary = bottom_top
    block = bottom_block
    normal = '0 0 1'
  []
  [bottom_bottom_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_top_sideset
    new_boundary = bottom_bottom
    block = bottom_block
    normal = '0  0 -1'
  []
  [bottom_front_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_bottom_sideset
    new_boundary = bottom_front
    block = bottom_block
    normal = '0 1 0'
  []
  [bottom_back_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_front_sideset
    new_boundary = bottom_back
    block = bottom_block
    normal = '0 -1 0'
  []
  [secondary]
    input = bottom_back_sideset
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'top_bottom' # top_back top_left'
    new_block_id = '10001'
    new_block_name = 'secondary_lower'
  []
  [primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'bottom_top'
    new_block_id = '10000'
    new_block_name = 'primary_lower'
  []
  uniform_refine = 0
  allow_renumbering = false
[]
[Variables]
[]
[Physics/SolidMechanics/QuasiStatic]
  [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'
  []
[]
[Materials]
  [tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1.0e4
    poissons_ratio = 0.0
  []
  [stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [tensor_1000]
    type = ComputeIsotropicElasticityTensor
    block = '2'
    youngs_modulus = 1e5
    poissons_ratio = 0.0
  []
  [stress_1000]
    type = ComputeFiniteStrainElasticStress
    block = '2'
  []
[]
# Other object should mix formulations
[UserObjects]
  [normal_uo]
    type = PenaltyWeightedGapUserObject
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    disp_x = disp_x
    disp_y = disp_y
    disp_z = disp_z
    penalty = 1e8
  []
[]
[Constraints]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = normal_uo
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = normal_uo
  []
  [normal_z]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = normal_uo
  []
[]
[BCs]
  [botx]
    type = DirichletBC
    variable = disp_x
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [boty]
    type = DirichletBC
    variable = disp_y
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [botz]
    type = DirichletBC
    variable = disp_z
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [topx]
    type = DirichletBC
    variable = disp_x
    boundary = 'top_top'
    value = 0.0
  []
  [topy]
    type = DirichletBC
    variable = disp_y
    boundary = 'top_top'
    value = 0.0
  []
  [topz]
    type = FunctionDirichletBC
    variable = disp_z
    boundary = 'top_top'
    function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
  []
[]
[Executioner]
  type = Transient
  end_time = .025
  dt = .025
  dtmin = .001
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu       superlu_dist'
  l_max_its = 15
  nl_max_its = 30
  nl_rel_tol = 1e-11
  nl_abs_tol = 1e-12
  line_search = 'basic'
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
  csv = true
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Postprocessors]
[]
[VectorPostprocessors]
[]
(modules/contact/test/tests/mortar_augmented_lagrange/aux_errors.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 1
  []
[]
[Problem]
  solve = false
[]
[UserObjects]
  [dummy]
    type = TimestepSize
  []
[]
[Executioner]
  type = Steady
[]
[AuxVariables]
  [v]
  []
[]
[AuxKernels]
  [gap]
    type = MortarUserObjectAux
    variable = v
    user_object = dummy
    # contact_quantity =
  []
[]
(modules/contact/test/tests/pdass_problems/ironing_penalty.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = iron.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '10'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '20'
    new_block_name = 'primary_lower'
    input = secondary
  []
  patch_update_strategy = auto
  patch_size = 20
  allow_renumbering = false
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_one]
    order = FIRST
    family = LAGRANGE
  []
  [tangential_vel_one]
    order = FIRST
    family = LAGRANGE
  []
  [real_weighted_gap]
    order = FIRST
    family = LAGRANGE
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [saved_x]
  []
  [saved_y]
  []
  [diag_saved_x]
  []
  [diag_saved_y]
  []
  [von_mises]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 2. 8.'
    y = '0. -1.0 -1.0'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 8.'
    y = '0. 8.'
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    save_in = 'saved_x saved_y'
    block = '1 2'
    strain = FINITE
  []
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
  []
  [penalty_tangential_vel_auxk]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = friction_uo
    contact_quantity = tangential_velocity_one
  []
  [real_weighted_gap_auxk]
    type = MortarUserObjectAux
    variable = real_weighted_gap
    user_object = friction_uo
    contact_quantity = normal_gap
  []
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xx
    index_i = 0
    index_j = 0
    execute_on = timestep_end
    block = '1 2'
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_yy
    index_i = 1
    index_j = 1
    execute_on = timestep_end
    block = '1 2'
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xy
    index_i = 0
    index_j = 1
    execute_on = timestep_end
    block = '1 2'
  []
  [von_mises_kernel]
    #Calculates the von mises stress and assigns it to von_mises
    type = RankTwoScalarAux
    variable = von_mises
    rank_two_tensor = stress
    execute_on = timestep_end
    scalar_type = VonMisesStress
    block = '1 2'
  []
[]
[VectorPostprocessors]
  [penalty_normal_pressure]
    type = NodalValueSampler
    variable = penalty_normal_pressure
    boundary = 10
    sort_by = id
  []
[]
[BCs]
  [bot_x_disp]
    type = DirichletBC
    variable = disp_x
    boundary = '40'
    value = 0.0
    preset = false
  []
  [bot_y_disp]
    type = DirichletBC
    variable = disp_y
    boundary = '40'
    value = 0.0
    preset = false
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = '30'
    function = disp_ramp_vert
    preset = false
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = '30'
    function = disp_ramp_horz
    preset = false
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2'
    youngs_modulus = 6896
    poissons_ratio = 0.32
  []
  [stuff1_strain]
    type = ComputeFiniteStrain
    block = '2'
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 689.6
    poissons_ratio = 0.32
  []
  [stuff2_strain]
    type = ComputeFiniteStrain
    block = '1'
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu     superlu_dist'
  line_search = 'none'
  nl_abs_tol = 1e-7
  nl_rel_tol = 1e-7
  l_tol = 1e-6
  l_max_its = 50
  nl_max_its = 30
  start_time = 0.0
  end_time = 6.5
  dt = 0.0125
  dtmin = 1e-5
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = true
  [chkfile]
    type = CSV
    start_time = 0.0
    execute_vector_postprocessors_on = FINAL
  []
  [console]
    type = Console
    max_rows = 5
  []
[]
[Debug]
  show_var_residual_norms = true
[]
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    disp_x = disp_x
    disp_y = disp_y
    friction_coefficient = 0.1 # with 2.0 works
    secondary_variable = disp_x
    penalty = 1e5
    penalty_friction = 1e4
    use_physical_gap = true
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [t_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [t_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-al.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure_one]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_one]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure_two]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_two]
    order = FIRST
    family = LAGRANGE
  []
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure_one_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure_one
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
  []
  [penalty_frictional_pressure_two_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure_two
    user_object = friction_uo
    contact_quantity = tangential_pressure_two
  []
  [penalty_accumulated_slip_two_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_two
    user_object = friction_uo
    contact_quantity = accumulated_slip_two
  []
[]
[Mesh]
  [top_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 3
    ny = 3
    nz = 3
    xmin = -0.25
    xmax = 0.25
    ymin = -0.25
    ymax = 0.25
    zmin = -0.25
    zmax = 0.25
    elem_type = HEX8
  []
  [rotate_top_block]
    type = TransformGenerator
    input = top_block
    transform = ROTATE
    vector_value = '0 0 0'
  []
  [top_block_sidesets]
    type = RenameBoundaryGenerator
    input = rotate_top_block
    old_boundary = '0 1 2 3 4 5'
    new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
  []
  [top_block_id]
    type = SubdomainIDGenerator
    input = top_block_sidesets
    subdomain_id = 1
  []
  [bottom_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 10
    ny = 10
    nz = 2
    xmin = -.5
    xmax = .5
    ymin = -.5
    ymax = .5
    zmin = -.3
    zmax = -.25
    elem_type = HEX8
  []
  [bottom_block_id]
    type = SubdomainIDGenerator
    input = bottom_block
    subdomain_id = 2
  []
  [bottom_block_change_boundary_id]
    type = RenameBoundaryGenerator
    input = bottom_block_id
    old_boundary = '0 1 2 3 4 5'
    new_boundary = '100 101 102 103 104 105'
  []
  [combined]
    type = MeshCollectionGenerator
    inputs = 'top_block_id bottom_block_change_boundary_id'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block = '1 2'
    new_block = 'top_block bottom_block'
  []
  [bottom_right_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = block_rename
    new_boundary = bottom_right
    block = bottom_block
    normal = '1 0 0'
  []
  [bottom_left_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_right_sideset
    new_boundary = bottom_left
    block = bottom_block
    normal = '-1 0 0'
  []
  [bottom_top_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_left_sideset
    new_boundary = bottom_top
    block = bottom_block
    normal = '0 0 1'
  []
  [bottom_bottom_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_top_sideset
    new_boundary = bottom_bottom
    block = bottom_block
    normal = '0  0 -1'
  []
  [bottom_front_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_bottom_sideset
    new_boundary = bottom_front
    block = bottom_block
    normal = '0 1 0'
  []
  [bottom_back_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_front_sideset
    new_boundary = bottom_back
    block = bottom_block
    normal = '0 -1 0'
  []
  [secondary]
    input = bottom_back_sideset
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'top_bottom' # top_back top_left'
    new_block_id = '10001'
    new_block_name = 'secondary_lower'
  []
  [primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'bottom_top'
    new_block_id = '10000'
    new_block_name = 'primary_lower'
  []
  allow_renumbering = false
[]
[Variables]
[]
[Physics/SolidMechanics/QuasiStatic]
  [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'
  []
[]
[Materials]
  [tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1.0e5
    poissons_ratio = 0.0
  []
  [stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [tensor_1000]
    type = ComputeIsotropicElasticityTensor
    block = '2'
    youngs_modulus = 1e5
    poissons_ratio = 0.0
  []
  [stress_1000]
    type = ComputeFiniteStrainElasticStress
    block = '2'
  []
[]
# Other object should mix formulations
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    disp_x = disp_x
    disp_y = disp_y
    disp_z = disp_z
    friction_coefficient = 0.4
    secondary_variable = disp_x
    penalty = 1e0
    penalty_friction = 1e1
    slip_tolerance = 7.0e-4 # 1e-6
    penetration_tolerance = 7.0e-4
    # max_penalty_multiplier = 10
    penalty_multiplier = 10
    penalty_multiplier_friction = 5
  []
[]
[Constraints]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [normal_z]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_z]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_dir_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    direction = direction_2
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_dir_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    direction = direction_2
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_dir_z]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    direction = direction_2
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
[BCs]
  [botx]
    type = DirichletBC
    variable = disp_x
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [boty]
    type = DirichletBC
    variable = disp_y
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [botz]
    type = DirichletBC
    variable = disp_z
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [topx]
    type = DirichletBC
    variable = disp_x
    boundary = 'top_top'
    value = 0.0
  []
  [topy]
    type = DirichletBC
    variable = disp_y
    boundary = 'top_top'
    value = 0.0
  []
  [topz]
    type = FunctionDirichletBC
    variable = disp_z
    boundary = 'top_top'
    function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
  []
[]
[Executioner]
  type = Transient
  end_time = .025
  dt = .025
  dtmin = .001
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu       superlu_dist'
  l_max_its = 15
  nl_max_its = 90
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-13
  line_search = 'basic'
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
  csv = true
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Postprocessors]
[]
[VectorPostprocessors]
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-penalty.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure_one]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_one]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure_two]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_two]
    order = FIRST
    family = LAGRANGE
  []
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure_one_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure_one
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
  []
  [penalty_frictional_pressure_two_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure_two
    user_object = friction_uo
    contact_quantity = tangential_pressure_two
  []
  [penalty_accumulated_slip_two_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_two
    user_object = friction_uo
    contact_quantity = accumulated_slip_two
  []
[]
[Mesh]
  [top_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 3
    ny = 3
    nz = 3
    xmin = -0.25
    xmax = 0.25
    ymin = -0.25
    ymax = 0.25
    zmin = -0.25
    zmax = 0.25
    elem_type = HEX8
  []
  [rotate_top_block]
    type = TransformGenerator
    input = top_block
    transform = ROTATE
    vector_value = '0 0 0'
  []
  [top_block_sidesets]
    type = RenameBoundaryGenerator
    input = rotate_top_block
    old_boundary = '0 1 2 3 4 5'
    new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
  []
  [top_block_id]
    type = SubdomainIDGenerator
    input = top_block_sidesets
    subdomain_id = 1
  []
  [bottom_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 10
    ny = 10
    nz = 2
    xmin = -.5
    xmax = .5
    ymin = -.5
    ymax = .5
    zmin = -.3
    zmax = -.25
    elem_type = HEX8
  []
  [bottom_block_id]
    type = SubdomainIDGenerator
    input = bottom_block
    subdomain_id = 2
  []
  [bottom_block_change_boundary_id]
    type = RenameBoundaryGenerator
    input = bottom_block_id
    old_boundary = '0 1 2 3 4 5'
    new_boundary = '100 101 102 103 104 105'
  []
  [combined]
    type = MeshCollectionGenerator
    inputs = 'top_block_id bottom_block_change_boundary_id'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = combined
    old_block = '1 2'
    new_block = 'top_block bottom_block'
  []
  [bottom_right_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = block_rename
    new_boundary = bottom_right
    block = bottom_block
    normal = '1 0 0'
  []
  [bottom_left_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_right_sideset
    new_boundary = bottom_left
    block = bottom_block
    normal = '-1 0 0'
  []
  [bottom_top_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_left_sideset
    new_boundary = bottom_top
    block = bottom_block
    normal = '0 0 1'
  []
  [bottom_bottom_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_top_sideset
    new_boundary = bottom_bottom
    block = bottom_block
    normal = '0  0 -1'
  []
  [bottom_front_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_bottom_sideset
    new_boundary = bottom_front
    block = bottom_block
    normal = '0 1 0'
  []
  [bottom_back_sideset]
    type = SideSetsAroundSubdomainGenerator
    input = bottom_front_sideset
    new_boundary = bottom_back
    block = bottom_block
    normal = '0 -1 0'
  []
  [secondary]
    input = bottom_back_sideset
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'top_bottom' # top_back top_left'
    new_block_id = '10001'
    new_block_name = 'secondary_lower'
  []
  [primary]
    input = secondary
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'bottom_top'
    new_block_id = '10000'
    new_block_name = 'primary_lower'
  []
  allow_renumbering = false
[]
[Variables]
[]
[Physics/SolidMechanics/QuasiStatic]
  [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'
  []
[]
[Materials]
  [tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1.0e5
    poissons_ratio = 0.0
  []
  [stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [tensor_1000]
    type = ComputeIsotropicElasticityTensor
    block = '2'
    youngs_modulus = 1e5
    poissons_ratio = 0.0
  []
  [stress_1000]
    type = ComputeFiniteStrainElasticStress
    block = '2'
  []
[]
# Other object should mix formulations
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    disp_x = disp_x
    disp_y = disp_y
    disp_z = disp_z
    friction_coefficient = 0.4
    secondary_variable = disp_x
    penalty = 1e8
    penalty_friction = 5e6
  []
[]
[Constraints]
  [normal_x]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [normal_y]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [normal_z]
    type = NormalMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_z]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_dir_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_x
    component = x
    direction = direction_2
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_dir_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_y
    component = y
    direction = direction_2
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_dir_z]
    type = TangentialMortarMechanicalContact
    primary_boundary = 'bottom_top'
    secondary_boundary = 'top_bottom'
    primary_subdomain = 'primary_lower'
    secondary_subdomain = 'secondary_lower'
    secondary_variable = disp_z
    component = z
    direction = direction_2
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
[BCs]
  [botx]
    type = DirichletBC
    variable = disp_x
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [boty]
    type = DirichletBC
    variable = disp_y
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [botz]
    type = DirichletBC
    variable = disp_z
    boundary = 'bottom_left bottom_right bottom_front bottom_back'
    value = 0.0
  []
  [topx]
    type = DirichletBC
    variable = disp_x
    boundary = 'top_top'
    value = 0.0
  []
  [topy]
    type = DirichletBC
    variable = disp_y
    boundary = 'top_top'
    value = 0.0
  []
  [topz]
    type = FunctionDirichletBC
    variable = disp_z
    boundary = 'top_top'
    function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
  []
[]
[Executioner]
  type = Transient
  end_time = .025
  dt = .025
  dtmin = .001
  solve_type = 'PJFNK'
  petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu       superlu_dist'
  l_max_its = 15
  nl_max_its = 30
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-13
  line_search = 'basic'
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
  csv = true
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Postprocessors]
[]
[VectorPostprocessors]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_bussetta_simple.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = cond_number.e
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
  maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_pressure
    boundary = 3
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_pressure_one
    boundary = 3
  []
  [penalty_tangential_vel_one]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_velocity_one
    boundary = 3
  []
  [penalty_accumulated_slip_one]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = accumulated_slip_one
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-ksp_snes_ew'
  petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
  petsc_options_value = ' 201                hypre    boomeramg      8'
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-8
  nl_max_its = 50
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.1 # 1.0
  dt = 0.1
  dtmin = 0.1
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
  compute_scaling_once = false
  off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[Contact]
  [al_friction]
    formulation = mortar_penalty
    model = coulomb
    primary = '2'
    secondary = '3'
    penalty = 1e7
    penalty_friction = 1e+7
    friction_coefficient = 0.4
    adaptivity_penalty_friction = SIMPLE
    adaptivity_penalty_normal = BUSSETTA
    al_penetration_tolerance = 1e-7
    al_incremental_slip_tolerance = 1e-5 # Not active
    penalty_multiplier = 100
    penalty_multiplier_friction = 5
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_finer.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = friction_uo
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = friction_uo
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-8
  nl_max_its = 1300
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.2 # 3.5
  dt = 0.1
  dtmin = 0.001
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure  normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyWeightedGapUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    penalty = 1e7
    penetration_tolerance = 1e-12
    use_physical_gap = true
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/ironing_penalty_action.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = iron.e
  []
  patch_update_strategy = auto
  patch_size = 20
  allow_renumbering = false
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_one]
    order = FIRST
    family = LAGRANGE
  []
  [tangential_vel_one]
    order = FIRST
    family = LAGRANGE
  []
  [real_weighted_gap]
    order = FIRST
    family = LAGRANGE
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [saved_x]
  []
  [saved_y]
  []
  [diag_saved_x]
  []
  [diag_saved_y]
  []
  [von_mises]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 2. 8.'
    y = '0. -1.0 -1.0'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 8.'
    y = '0. 8.'
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    save_in = 'saved_x saved_y'
    block = '1 2'
    strain = FINITE
  []
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = penalty_friction_object_contact_block
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = penalty_friction_object_contact_block
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = penalty_friction_object_contact_block
    contact_quantity = accumulated_slip_one
  []
  [penalty_tangential_vel_auxk]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = penalty_friction_object_contact_block
    contact_quantity = tangential_velocity_one
  []
  [real_weighted_gap_auxk]
    type = MortarUserObjectAux
    variable = real_weighted_gap
    user_object = penalty_friction_object_contact_block
    contact_quantity = normal_gap
  []
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xx
    index_i = 0
    index_j = 0
    execute_on = timestep_end
    block = '1 2'
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_yy
    index_i = 1
    index_j = 1
    execute_on = timestep_end
    block = '1 2'
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xy
    index_i = 0
    index_j = 1
    execute_on = timestep_end
    block = '1 2'
  []
  [von_mises_kernel]
    #Calculates the von mises stress and assigns it to von_mises
    type = RankTwoScalarAux
    variable = von_mises
    rank_two_tensor = stress
    execute_on = timestep_end
    scalar_type = VonMisesStress
    block = '1 2'
  []
[]
[Contact]
  [contact_block]
    primary = 20
    secondary = 10
    friction_coefficient = 0.1
    model = coulomb
    formulation = mortar_penalty
    penalty = 1e5
    penalty_friction = 1e4
    use_dual = false
  []
[]
[VectorPostprocessors]
  [penalty_normal_pressure]
    type = NodalValueSampler
    variable = penalty_normal_pressure
    boundary = 10
    sort_by = id
  []
[]
[Postprocessors]
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 30
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 30
  []
[]
[BCs]
  [bot_x_disp]
    type = DirichletBC
    variable = disp_x
    boundary = '40'
    value = 0.0
    preset = false
  []
  [bot_y_disp]
    type = DirichletBC
    variable = disp_y
    boundary = '40'
    value = 0.0
    preset = false
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = '30'
    function = disp_ramp_vert
    preset = false
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = '30'
    function = disp_ramp_horz
    preset = false
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2'
    youngs_modulus = 6896
    poissons_ratio = 0.32
  []
  [stuff1_strain]
    type = ComputeFiniteStrain
    block = '2'
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 689.6
    poissons_ratio = 0.32
  []
  [stuff2_strain]
    type = ComputeFiniteStrain
    block = '1'
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu     superlu_dist'
  line_search = 'none'
  nl_abs_tol = 1e-7
  nl_rel_tol = 1e-7
  l_tol = 1e-6
  l_max_its = 50
  nl_max_its = 30
  start_time = 0.0
  end_time = 6.5 # 6.5
  dt = 0.0125
  dtmin = 1e-5
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = true
  [chkfile]
    type = CSV
    start_time = 0.0
    execute_vector_postprocessors_on = FINAL
  []
  [console]
    type = Console
    max_rows = 5
  []
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_finer.e
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_pressure
    boundary = 3
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_pressure_one
    boundary = 3
  []
  [penalty_tangential_vel_one]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_velocity_one
    boundary = 3
  []
  [penalty_accumulated_slip_one]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = accumulated_slip_one
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  line_search = 'basic'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-8
  nl_max_its = 50
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.2 # 3.5
  dt = 0.1
  dtmin = 0.1
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
  compute_scaling_once = false
  off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[Contact]
  [al_friction]
    formulation = mortar_penalty
    model = coulomb
    primary = '2'
    secondary = '3'
    penalty = 1e5
    penalty_friction = 1e8
    friction_coefficient = 0.4
    al_penetration_tolerance = 1e-7
    al_incremental_slip_tolerance = 1.0 # Not active
    penalty_multiplier = 100
    penalty_multiplier_friction = 1
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_coarser.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = ReferenceResidualProblem
  extra_tag_vectors = 'ref'
  reference_vector = 'ref'
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_one]
    order = FIRST
    family = LAGRANGE
  []
  [tangential_vel_one]
    order = FIRST
    family = LAGRANGE
  []
  [weighted_gap]
    order = FIRST
    family = LAGRANGE
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [react_x]
  []
  [react_y]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    extra_vector_tags = 'ref'
    block = '1 2 3 4 5 6 7'
  []
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
  []
  [penalty_tangential_vel_auxk]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = friction_uo
    contact_quantity = tangential_velocity_one
  []
  [penalty_weighted_gap_auxk]
    type = MortarUserObjectAux
    variable = weighted_gap
    user_object = friction_uo
    contact_quantity = normal_gap
  []
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xx
    index_i = 0
    index_j = 0
    execute_on = timestep_end
    block = '1 2 3 4 5 6 7'
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_yy
    index_i = 1
    index_j = 1
    execute_on = timestep_end
    block = '1 2 3 4 5 6 7'
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xy
    index_i = 0
    index_j = 1
    execute_on = timestep_end
    block = '1 2 3 4 5 6 7'
  []
  [react_x]
    type = ReactionForceAux
    vector_tag = 'ref'
    v = 'disp_x'
    variable = 'react_x'
  []
  [react_y]
    type = ReactionForceAux
    vector_tag = 'ref'
    v = 'disp_y'
    variable = 'react_y'
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = react_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = react_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = react_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = react_y
    boundary = 4
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e10
    poissons_ratio = 0.0
  []
  [stuff1_strain]
    type = ComputeFiniteStrain
    block = '1'
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_strain]
    type = ComputeFiniteStrain
    block = '2 3 4 5 6 7'
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       superlu_dist                  NONZERO               1e-15                   1e-5'
  line_search = 'none'
  nl_abs_tol = 1e-14
  nl_rel_tol = 1e-10
  start_time = 0.0
  end_time = 0.3 # 3.5
  l_tol = 1e-4
  dt = 0.1
  dtmin = 0.001
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [x_disp]
    type = NodalValueSampler
    variable = disp_x
    boundary = '3'
    sort_by = id
  []
  [y_disp]
    type = NodalValueSampler
    variable = disp_y
    boundary = '3'
    sort_by = id
  []
  [cont_press]
    type = NodalValueSampler
    variable = penalty_normal_pressure
    boundary = '3'
    sort_by = id
  []
  [friction]
    type = NodalValueSampler
    variable = penalty_frictional_pressure
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [console]
    type = Console
    max_rows = 5
  []
  [chkfile]
    type = CSV
    show = 'x_disp y_disp cont_press friction'
    file_base = cylinder_friction_penalty_check
    create_final_symlink = true
    execute_on = 'FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    friction_coefficient = 0.4 # with 2.0 works
    secondary_variable = disp_x
    penalty = 5e9
    penalty_friction = 1e7
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_adaptivity.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_coarser.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = ReferenceResidualProblem
  extra_tag_vectors = 'ref'
  reference_vector = 'ref'
[]
[Variables]
  [disp_x]
    order = FIRST
    family = LAGRANGE
  []
  [disp_y]
    order = FIRST
    family = LAGRANGE
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [react_x]
  []
  [react_y]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
  []
  [penalty_tangential_vel]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = friction_uo
    contact_quantity = tangential_velocity_one
  []
  [penalty_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = friction_uo
    contact_quantity = normal_gap
  []
  [react_x]
    type = ReactionForceAux
    vector_tag = 'ref'
    v = 'disp_x'
    variable = 'react_x'
  []
  [react_y]
    type = ReactionForceAux
    vector_tag = 'ref'
    v = 'disp_y'
    variable = 'react_y'
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = react_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = react_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = react_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = react_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e10
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
  petsc_options_value = 'lu       superlu_dist                  NONZERO               1e-15                   1e-5'
  line_search = 'none'
  nl_abs_tol = 1e-10
  start_time = 0.0
  end_time = 0.3 # 3.5
  l_tol = 1e-4
  dt = 0.1
  dtmin = 0.001
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [console]
    type = Console
    max_rows = 5
  []
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    file_base = cylinder_friction_penalty_adaptivity
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    friction_coefficient = 0.4
    secondary_variable = disp_x
    penalty = 5e7
    penalty_friction = 5e8
  []
  [geo]
    type = GeometrySphere
    boundary = 3
    center = '0 4 0'
    radius = 3
  []
[]
[Adaptivity]
  [Markers]
    [contact]
      type = BoundaryMarker
      mark = REFINE
      next_to = 3
    []
  []
  initial_marker = contact
  initial_steps = 2
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_finer.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
  [dual_var]
    use_dual = true
    block = '10001'
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
    boundary = 3
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
    boundary = 3
  []
  [penalty_tangential_vel_one]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = friction_uo
    contact_quantity = tangential_velocity_one
    boundary = 3
  []
  [penalty_accumulated_slip_one]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = friction_uo
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = friction_uo
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  line_search = 'basic'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-8
  nl_max_its = 50
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.2 # 3.5
  dt = 0.1
  dtmin = 0.1
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
  compute_scaling_once = false
  off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    penalty = 1e5
    penalty_friction = 1e8
    secondary_variable = disp_x
    friction_coefficient = 0.4
    penetration_tolerance = 1e-7
    # Not solving the frictional problem tightly (below)
    slip_tolerance = 1 # 1e-6
    penalty_multiplier = 100
    penalty_multiplier_friction = 1
    use_physical_gap = true
    aux_lm = dual_var
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_test_nochange.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_finer.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
  maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
  [dual_var]
    use_dual = true
    block = '10001'
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = friction_uo
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = friction_uo
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  line_search = 'none'
  nl_abs_tol = 1e-12
  nl_rel_tol = 1e-8
  nl_max_its = 1300
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 1.0 # 3.5
  dt = 0.1
  dtmin = 0.001
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure  normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyWeightedGapUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    penalty = 1e7
    penetration_tolerance = 1e-8
    use_mortar_scaled_gap = true
    aux_lm = dual_var
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_tight.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = cond_number.e
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
  maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
  [pid]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [pid]
    type = ProcessorIDAux
    variable = pid
  []
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_pressure
    boundary = 3
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_pressure_one
    boundary = 3
  []
  [penalty_tangential_vel_one]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_velocity_one
    boundary = 3
  []
  [penalty_accumulated_slip_one]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = accumulated_slip_one
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-ksp_snes_ew'
  petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
  petsc_options_value = ' 201                hypre    boomeramg      8'
  line_search = 'none'
  nl_abs_tol = 1e-12
  nl_rel_tol = 1e-10
  nl_max_its = 150
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.1 # 1.0
  dt = 0.1
  dtmin = 0.1
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
  compute_scaling_once = false
  off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[Contact]
  [al_friction]
    formulation = mortar_penalty
    model = coulomb
    primary = '2'
    secondary = '3'
    penalty = 1e7
    penalty_friction = 1e+7
    friction_coefficient = 0.4
    al_penetration_tolerance = 1e-7
    al_incremental_slip_tolerance = 1e-7
    adaptivity_penalty_normal = BUSSETTA
    adaptivity_penalty_friction = FRICTION_LIMIT
    penalty_multiplier = 5
    penalty_multiplier_friction = 5
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_tight_slip.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_finer.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
  maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
  [dual_var]
    use_dual = true
    block = '10001'
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
    boundary = 3
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
    boundary = 3
  []
  [penalty_tangential_vel_one]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = friction_uo
    contact_quantity = tangential_velocity_one
    boundary = 3
  []
  [penalty_accumulated_slip_one]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = friction_uo
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = friction_uo
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e10
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  line_search = 'basic'
  nl_abs_tol = 1e-13
  nl_rel_tol = 1e-11
  nl_max_its = 75
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.1 # 3.5
  dt = 0.1
  dtmin = 0.1
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
  compute_scaling_once = false
  off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    penalty = 1e5
    secondary_variable = disp_x
    friction_coefficient = 0.4
    penetration_tolerance = 1e-7
    slip_tolerance = 1e-8
    penalty_friction = 1e6
    penalty_multiplier = 10
    use_physical_gap = true
    aux_lm = dual_var
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [tangential_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [tangential_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 2
    secondary_boundary = 3
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/ironing_penalty_al.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = iron.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '10'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '20'
    new_block_name = 'primary_lower'
    input = secondary
  []
  patch_update_strategy = auto
  patch_size = 20
  allow_renumbering = false
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
[]
[AuxVariables]
  [penalty_normal_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [penalty_frictional_pressure]
    order = FIRST
    family = LAGRANGE
  []
  [accumulated_slip_one]
    order = FIRST
    family = LAGRANGE
  []
  [tangential_vel_one]
    order = FIRST
    family = LAGRANGE
  []
  [real_weighted_gap]
    order = FIRST
    family = LAGRANGE
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [saved_x]
  []
  [saved_y]
  []
  [diag_saved_x]
  []
  [diag_saved_y]
  []
  [von_mises]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 2. 8.'
    y = '0. -1.0 -1.0'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 8.'
    y = '0. 8.'
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    save_in = 'saved_x saved_y'
    block = '1 2'
    strain = FINITE
  []
[]
[AuxKernels]
  [penalty_normal_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
  []
  [penalty_frictional_pressure_auxk]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = friction_uo
    contact_quantity = tangential_pressure_one
  []
  [penalty_accumulated_slip_auxk]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = friction_uo
    contact_quantity = accumulated_slip_one
  []
  [penalty_tangential_vel_auxk]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = friction_uo
    contact_quantity = tangential_velocity_one
  []
  [real_weighted_gap_auxk]
    type = MortarUserObjectAux
    variable = real_weighted_gap
    user_object = friction_uo
    contact_quantity = normal_gap
  []
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xx
    index_i = 0
    index_j = 0
    execute_on = timestep_end
    block = '1 2'
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_yy
    index_i = 1
    index_j = 1
    execute_on = timestep_end
    block = '1 2'
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xy
    index_i = 0
    index_j = 1
    execute_on = timestep_end
    block = '1 2'
  []
  [von_mises_kernel]
    #Calculates the von mises stress and assigns it to von_mises
    type = RankTwoScalarAux
    variable = von_mises
    rank_two_tensor = stress
    execute_on = timestep_end
    scalar_type = VonMisesStress
    block = '1 2'
  []
[]
# [VectorPostprocessors]
#   [penalty_normal_pressure]
#     type = NodalValueSampler
#     variable = penalty_normal_pressure
#     boundary = 10
#     sort_by = id
#   []
# []
[Postprocessors]
  [num_nl]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  []
  [force_x]
    type = NodalSum
    boundary = 30
    variable = saved_x
  []
  [force_y]
    type = NodalSum
    boundary = 30
    variable = saved_y
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = real_weighted_gap
    boundary = 10
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
[]
[BCs]
  [bot_x_disp]
    type = DirichletBC
    variable = disp_x
    boundary = '40'
    value = 0.0
    preset = false
  []
  [bot_y_disp]
    type = DirichletBC
    variable = disp_y
    boundary = '40'
    value = 0.0
    preset = false
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = '30'
    function = disp_ramp_vert
    preset = false
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = '30'
    function = disp_ramp_horz
    preset = false
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2'
    youngs_modulus = 6896
    poissons_ratio = 0.32
  []
  [stuff1_strain]
    type = ComputeFiniteStrain
    block = '2'
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 689.6
    poissons_ratio = 0.32
  []
  [stuff2_strain]
    type = ComputeFiniteStrain
    block = '1'
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu     superlu_dist'
  line_search = 'none'
  nl_abs_tol = 1e-7
  nl_rel_tol = 1e-7
  l_tol = 1e-6
  l_max_its = 7
  nl_max_its = 300
  start_time = 0.0
  end_time = 6.5
  dt = 0.0125
  dtmin = 1e-5
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = true
  # [chkfile]
  #   type = CSV
  #   start_time = 0.0
  #   execute_vector_postprocessors_on = FINAL
  # []
  [console]
    type = Console
    max_rows = 5
  []
[]
[Debug]
  show_var_residual_norms = true
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
[]
[UserObjects]
  [friction_uo]
    type = PenaltyFrictionUserObject
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    disp_x = disp_x
    disp_y = disp_y
    friction_coefficient = 0.4 # with 2.0 works
    secondary_variable = disp_x
    penalty = 5e5
    penalty_friction = 1e4
    slip_tolerance = 1e-05
    penetration_tolerance = 1e-03
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [t_x]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
  [t_y]
    type = TangentialMortarMechanicalContact
    primary_boundary = 20
    secondary_boundary = 10
    primary_subdomain = 10000
    secondary_subdomain = 10001
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_velocities_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_backup.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = hertz_cyl_finer.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    sidesets = '3'
    input = input_file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    new_block_id = 10000
    sidesets = '2'
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
  maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 0.1 0.2'
    y = '0. -0.020 0.0'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = friction_uo
    contact_quantity = normal_pressure
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = friction_uo
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = friction_uo
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-snes_ksp_ew'
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-8
  nl_max_its = 1300
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.2 # 3.5
  dt = 0.1
  dtmin = 0.001
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure  normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[UserObjects]
  [friction_uo]
    type = PenaltyWeightedGapUserObject
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    disp_x = disp_x
    disp_y = disp_y
    penalty = 1e7
    penalty_multiplier = 10
    penetration_tolerance = 1e-12
    use_physical_gap = true
  []
[]
[Constraints]
  [x]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_x
    component = x
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
  [y]
    type = NormalMortarMechanicalContact
    primary_boundary = '2'
    secondary_boundary = '3'
    primary_subdomain = '10000'
    secondary_subdomain = '10001'
    secondary_variable = disp_y
    component = y
    use_displaced_mesh = true
    compute_lm_residuals = false
    weighted_gap_uo = friction_uo
  []
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg.i)
[GlobalParams]
  volumetric_locking_correction = true
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [input_file]
    type = FileMeshGenerator
    file = cond_number.e
  []
  allow_renumbering = false
[]
[Problem]
  type = AugmentedLagrangianContactFEProblem
  extra_tag_vectors = 'ref'
  maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
  [penalty_normal_pressure]
  []
  [penalty_frictional_pressure]
  []
  [accumulated_slip_one]
  []
  [tangential_vel_one]
  []
  [normal_gap]
  []
  [normal_lm]
  []
  [saved_x]
  []
  [saved_y]
  []
  [active]
  []
[]
[Functions]
  [disp_ramp_vert]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. -0.020 -0.020'
  []
  [disp_ramp_horz]
    type = PiecewiseLinear
    x = '0. 1. 3.5'
    y = '0. 0.0 0.015'
  []
[]
[Physics/SolidMechanics/QuasiStatic/all]
  strain = FINITE
  add_variables = true
  save_in = 'saved_x saved_y'
  extra_vector_tags = 'ref'
  block = '1 2 3 4 5 6 7'
  generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
  [penalty_normal_pressure]
    type = MortarUserObjectAux
    variable = penalty_normal_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_pressure
    boundary = 3
  []
  [penalty_frictional_pressure]
    type = MortarUserObjectAux
    variable = penalty_frictional_pressure
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_pressure_one
    boundary = 3
  []
  [penalty_tangential_vel_one]
    type = MortarUserObjectAux
    variable = tangential_vel_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = tangential_velocity_one
    boundary = 3
  []
  [penalty_accumulated_slip_one]
    type = MortarUserObjectAux
    variable = accumulated_slip_one
    user_object = penalty_friction_object_al_friction
    contact_quantity = accumulated_slip_one
    boundary = 3
  []
  [normal_lm]
    type = MortarUserObjectAux
    variable = normal_lm
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_lm
    boundary = 3
  []
  [normal_gap]
    type = MortarUserObjectAux
    variable = normal_gap
    user_object = penalty_friction_object_al_friction
    contact_quantity = normal_gap
    boundary = 3
  []
[]
[Postprocessors]
  [bot_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 1
  []
  [bot_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 1
  []
  [top_react_x]
    type = NodalSum
    variable = saved_x
    boundary = 4
  []
  [top_react_y]
    type = NodalSum
    variable = saved_y
    boundary = 4
  []
  [_dt]
    type = TimestepSize
  []
  [num_lin_it]
    type = NumLinearIterations
  []
  [num_nonlin_it]
    type = NumNonlinearIterations
  []
  [cumulative]
    type = CumulativeValuePostprocessor
    postprocessor = num_nonlin_it
  []
  [gap]
    type = SideExtremeValue
    value_type = min
    variable = normal_gap
    boundary = 3
  []
  [num_al]
    type = NumAugmentedLagrangeIterations
  []
  [active_set_size]
    type = NodalSum
    variable = active
  []
[]
[BCs]
  [side_x]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  []
  [bot_y]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [top_y_disp]
    type = FunctionDirichletBC
    variable = disp_y
    boundary = 4
    function = disp_ramp_vert
  []
  [top_x_disp]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 4
    function = disp_ramp_horz
  []
[]
[Materials]
  [stuff1_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '1'
    youngs_modulus = 1e8
    poissons_ratio = 0.0
  []
  [stuff1_stress]
    type = ComputeFiniteStrainElasticStress
    block = '1'
  []
  [stuff2_elas_tens]
    type = ComputeIsotropicElasticityTensor
    block = '2 3 4 5 6 7'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stuff2_stress]
    type = ComputeFiniteStrainElasticStress
    block = '2 3 4 5 6 7'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options = '-ksp_snes_ew'
  petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
  petsc_options_value = ' 201                hypre    boomeramg      8'
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-8
  nl_max_its = 50
  l_tol = 1e-05
  l_abs_tol = 1e-13
  start_time = 0.0
  end_time = 0.2 # 1.0
  dt = 0.1
  dtmin = 0.1
  [Predictor]
    type = SimplePredictor
    scale = 1.0
  []
  automatic_scaling = true
  compute_scaling_once = false
  off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [surface]
    type = NodalValueSampler
    use_displaced_mesh = false
    variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
    boundary = '3'
    sort_by = id
  []
[]
[Outputs]
  print_linear_residuals = true
  perf_graph = true
  exodus = true
  csv = false
  [vectorpp_output]
    type = CSV
    create_final_symlink = true
    execute_on = 'INITIAL TIMESTEP_END FINAL'
  []
[]
[Contact]
  [al_friction]
    formulation = mortar_penalty
    model = coulomb
    primary = '2'
    secondary = '3'
    penalty = 1e7
    penalty_friction = 1e+7
    friction_coefficient = 0.4
    al_penetration_tolerance = 1e-7
    al_incremental_slip_tolerance = 1.0 # Not active
    penalty_multiplier = 100
  []
[]