https://mooseframework.inl.gov
PenaltyWeightedGapUserObject.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "WeightedGapUserObject.h"
14 
15 template <typename>
16 class MooseVariableFE;
18 
25 {
26 public:
28 
30 
31  virtual void timestepSetup() override;
32 
33  virtual const ADVariableValue & contactPressure() const override;
34  virtual void initialize() override;
35  virtual void finalize() override;
36  virtual void reinit() override;
37 
38  virtual Real getNormalContactPressure(const Node * const node) const override;
39  virtual Real getNormalLagrangeMultiplier(const Node * const node) const;
40 
41  virtual Real getDeltaTangentialLagrangeMultiplier(const Node * const, const unsigned int) const
42  {
43  return 0.0;
44  };
45  virtual bool getActiveSetState(const Node * const node) const
46  {
47  return _dof_to_normal_pressure.find(_subproblem.mesh().nodePtr(node->id()))->second > 0;
48  }
49 
50  virtual bool isAugmentedLagrangianConverged() override;
51  virtual void augmentedLagrangianSetup() override;
52  virtual void updateAugmentedLagrangianMultipliers() override;
53 
54 protected:
55  virtual const VariableTestValue & test() const override;
56  virtual bool constrainedByOwner() const override { return false; }
57 
58  void selfInitialize();
59  void selfFinalize();
60  void selfTimestepSetup();
61 
66  void
67  bussettaAdaptivePenalty(const Real previous_gap, const Real gap, Real & penalty, Real & eval_tn);
68 
73  void adaptiveNormalPenalty(const Real previous_gap, const Real gap, Real & penalty);
74 
76  const Real _penalty;
77 
80 
83 
86 
88  std::unordered_map<const DofObject *, ADReal> _dof_to_normal_pressure;
89 
92  const static unsigned int _no_iterations;
93  const unsigned int & _lagrangian_iteration_number;
95 
97  std::unordered_map<const DofObject *, Real> _dof_to_lagrange_multiplier;
98 
100  std::unordered_map<const DofObject *, Real> _dof_to_local_penalty;
101 
103  std::unordered_map<const DofObject *, Real> _dof_to_previous_gap;
104 
106  const Real & _dt;
107 
110 
112  const bool _use_physical_gap;
113 
115  const MooseVariable * const _aux_lm_var;
116 
119 
122 };
const Real _max_penalty_multiplier
Maximum multiplier applied to the initial penalty factor in AL.
virtual MooseMesh & mesh()=0
virtual void augmentedLagrangianSetup() override
static const unsigned int _no_iterations
virtual Real getNormalLagrangeMultiplier(const Node *const node) const
std::unordered_map< const DofObject *, ADReal > _dof_to_normal_pressure
Map from degree of freedom to normal pressure for reporting.
const Real _penalty
The penalty factor.
void bussettaAdaptivePenalty(const Real previous_gap, const Real gap, Real &penalty, Real &eval_tn)
Adaptive, local penalty for AL.
AugmentedLagrangianContactProblemInterface *const _augmented_lagrange_problem
augmented Lagrange problem and iteration number
const bool _use_physical_gap
Use scaled or physical gap.
const Real & _dt
Current delta t... or timestep size.
virtual void updateAugmentedLagrangianMultipliers() override
Interface class for user objects that support the augmented Lagrange formalism as implemented in Augm...
User object for computing weighted gaps and contact pressure for penalty based mortar constraints...
virtual Real getNormalContactPressure(const Node *const node) const override
ADVariableValue _contact_pressure
The contact pressure on the mortar segument quadrature points.
void adaptiveNormalPenalty(const Real previous_gap, const Real gap, Real &penalty)
See Algorithm 3 of &#39;The adapted augmented Lagrangian method: a new method for the resolution of the m...
SubProblem & _subproblem
virtual const ADVariableValue & contactPressure() const override
const Real _penetration_tolerance
penetration tolerance for augmented Lagrange contact
PenaltyWeightedGapUserObject(const InputParameters &parameters)
OutputTools< Real >::VariableTestValue VariableTestValue
virtual const Node * nodePtr(const dof_id_type i) const
std::unordered_map< const DofObject *, Real > _dof_to_local_penalty
Map from degree of freedom to local penalty value.
virtual const VariableTestValue & test() const override
enum PenaltyWeightedGapUserObject::AdaptivityNormalPenalty _adaptivity_normal
virtual bool isAugmentedLagrangianConverged() override
Creates dof object to weighted gap map.
const MooseVariable *const _aux_lm_var
The auxiliary Lagrange multiplier variable (used together whith the Petrov-Galerkin approach) ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unordered_map< const DofObject *, Real > _dof_to_previous_gap
Map from degree of freedom to previous AL iteration gap values.
const Real _penalty_multiplier
penalty growth factor for augmented Lagrange
Class to provide an interface for parameters and routines required to check convergence for the augme...
virtual bool getActiveSetState(const Node *const node) const
std::unordered_map< const DofObject *, Real > _dof_to_lagrange_multiplier
Map from degree of freedom to augmented lagrange multiplier.
const InputParameters & parameters() const
virtual bool constrainedByOwner() const override
const unsigned int & _lagrangian_iteration_number
AdaptivityNormalPenalty
The adaptivity method for the penalty factor at augmentations.
virtual Real getDeltaTangentialLagrangeMultiplier(const Node *const, const unsigned int) const