https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
14
15template <typename>
16class MooseVariableFE;
18
25{
26public:
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
54protected:
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
113
116
119
122};
Interface class for user objects that support the augmented Lagrange formalism as implemented in Augm...
Class to provide an interface for parameters and routines required to check convergence for the augme...
const InputParameters & parameters() const
virtual const Node * nodePtr(const dof_id_type i) const
User object for computing weighted gaps and contact pressure for penalty based mortar constraints.
virtual bool getActiveSetState(const Node *const node) const
const Real _penalty
The penalty factor.
std::unordered_map< const DofObject *, Real > _dof_to_previous_gap
Map from degree of freedom to previous AL iteration gap values.
void adaptiveNormalPenalty(const Real previous_gap, const Real gap, Real &penalty)
See Algorithm 3 of 'The adapted augmented Lagrangian method: a new method for the resolution of the m...
virtual bool isAugmentedLagrangianConverged() override
const Real _penalty_multiplier
penalty growth factor for augmented Lagrange
std::unordered_map< const DofObject *, Real > _dof_to_local_penalty
Map from degree of freedom to local penalty value.
enum PenaltyWeightedGapUserObject::AdaptivityNormalPenalty _adaptivity_normal
virtual Real getNormalContactPressure(const Node *const node) const override
std::unordered_map< const DofObject *, Real > _dof_to_lagrange_multiplier
Map from degree of freedom to augmented lagrange multiplier.
virtual void augmentedLagrangianSetup() override
const Real _penetration_tolerance
penetration tolerance for augmented Lagrange contact
AugmentedLagrangianContactProblemInterface *const _augmented_lagrange_problem
augmented Lagrange problem and iteration number
virtual const VariableTestValue & test() const override
ADVariableValue _contact_pressure
The contact pressure on the mortar segument quadrature points.
const MooseVariable *const _aux_lm_var
The auxiliary Lagrange multiplier variable (used together whith the Petrov-Galerkin approach)
const Real & _dt
Current delta t... or timestep size.
virtual bool constrainedByOwner() const override
std::unordered_map< const DofObject *, ADReal > _dof_to_normal_pressure
Map from degree of freedom to normal pressure for reporting.
virtual void updateAugmentedLagrangianMultipliers() override
virtual const ADVariableValue & contactPressure() const override
AdaptivityNormalPenalty
The adaptivity method for the penalty factor at augmentations.
const bool _use_physical_gap
Use scaled or physical gap.
virtual Real getDeltaTangentialLagrangeMultiplier(const Node *const, const unsigned int) const
const Real _max_penalty_multiplier
Maximum multiplier applied to the initial penalty factor in AL.
virtual Real getNormalLagrangeMultiplier(const Node *const node) const
void bussettaAdaptivePenalty(const Real previous_gap, const Real gap, Real &penalty, Real &eval_tn)
Adaptive, local penalty for AL.
virtual MooseMesh & mesh()=0
SubProblem & _subproblem
Creates dof object to weighted gap map.
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue