https://mooseframework.inl.gov
ComputeWeightedGapLMMechanicalContact.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 "ADMortarConstraint.h"
13 
14 #include <unordered_map>
15 
17 
23 {
24 public:
26 
29  void computeResidual(Moose::MortarType mortar_type) override;
31  void computeJacobian(Moose::MortarType mortar_type) override;
32  void residualSetup() override;
33  void jacobianSetup() override final;
34  void post() override;
35 
39  void
40  incorrectEdgeDroppingPost(const std::unordered_set<const Node *> & inactive_lm_nodes) override;
41 
42 protected:
43  ADReal computeQpResidual(Moose::MortarType mortar_type) final;
44 
49  virtual void computeQpProperties();
50 
54  virtual void computeQpIProperties();
55 
62  virtual void enforceConstraintOnDof(const DofObject * const dof);
63 
72 
74  const bool _has_disp_z;
79 
83  const Real _c;
84 
87 
90 
92  const bool _normalize_c;
93 
95  const bool _nodal;
96 
98  const MooseVariable * const _disp_x_var;
100  const MooseVariable * const _disp_y_var;
102  const MooseVariable * const _disp_z_var;
103 
106 
108  const ADReal * _weighted_gap_ptr = nullptr;
109  const Real * _normalization_ptr = nullptr;
110 
113 };
const ADVariableValue & _secondary_disp_y
y-displacement on the secondary face
const ADVariableValue *const _primary_disp_z
z-displacement on the primary face
ADReal _qp_gap
The value of the gap at the current quadrature point.
ComputeWeightedGapLMMechanicalContact(const InputParameters &parameters)
const ADVariableValue & _secondary_disp_x
x-displacement on the secondary face
const Real _c
This factor multiplies the weighted gap.
const WeightedGapUserObject & _weighted_gap_uo
The weighted gap user object.
DualNumber< Real, DNDerivativeType, true > ADReal
Real _qp_factor
The value of the LM at the current quadrature point.
virtual void computeResidual() override
virtual void computeQpProperties()
Computes properties that are functions only of the current quadrature point (_qp), e.g.
const ADVariableValue *const _secondary_disp_z
z-displacement on the secondary face
virtual void computeQpIProperties()
Computes properties that are functions both of _qp and _i, for example the weighted gap...
ADReal computeQpResidual(Moose::MortarType mortar_type) final
const bool _nodal
Whether the dof objects are nodal; if they&#39;re not, then they&#39;re elemental.
const ADReal * _weighted_gap_ptr
A pointer members that can be used to help avoid copying ADReals.
const ADVariableValue & _primary_disp_y
y-displacement on the primary face
const MooseVariable *const _disp_z_var
The z displacement variable.
void incorrectEdgeDroppingPost(const std::unordered_set< const Node *> &inactive_lm_nodes) override
Copy of the post routine but that skips assembling inactive nodes.
ADRealVectorValue _qp_gap_nodal
Vector for computation of weighted gap with nodal normals.
Creates dof object to weighted gap map.
const bool _normalize_c
Whether to normalize weighted gap by weighting function norm.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void computeJacobian() override
const InputParameters & parameters() const
virtual void enforceConstraintOnDof(const DofObject *const dof)
Method called from post().
const MooseVariable *const _disp_y_var
The y displacement variable.
const bool _has_disp_z
For 2D mortar contact no displacement will be specified, so const pointers used.
Computes the weighted gap that will later be used to enforce the zero-penetration mechanical contact ...
const MooseVariable *const _disp_x_var
The x displacement variable.
const ADVariableValue & _primary_disp_x
x-displacement on the primary face