https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
24public:
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
42protected:
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
103
106
108 const ADReal * _weighted_gap_ptr = nullptr;
109 const Real * _normalization_ptr = nullptr;
110
113};
DualNumber< Real, DNDerivativeType, true > ADReal
virtual void computeJacobian() override
virtual void computeResidual() override
Computes the weighted gap that will later be used to enforce the zero-penetration mechanical contact ...
const ADVariableValue *const _secondary_disp_z
z-displacement on the secondary face
const bool _nodal
Whether the dof objects are nodal; if they're not, then they're elemental.
const bool _normalize_c
Whether to normalize weighted gap by weighting function norm.
const WeightedGapUserObject & _weighted_gap_uo
The weighted gap user object.
virtual void computeQpIProperties()
Computes properties that are functions both of _qp and _i, for example the weighted gap.
const ADVariableValue *const _primary_disp_z
z-displacement on the primary face
const ADVariableValue & _primary_disp_x
x-displacement on the primary face
const ADVariableValue & _secondary_disp_x
x-displacement on the secondary face
const bool _has_disp_z
For 2D mortar contact no displacement will be specified, so const pointers used.
virtual void computeJacobian() override
const MooseVariable *const _disp_z_var
The z displacement variable.
const ADReal * _weighted_gap_ptr
A pointer members that can be used to help avoid copying ADReals.
ADRealVectorValue _qp_gap_nodal
Vector for computation of weighted gap with nodal normals.
void incorrectEdgeDroppingPost(const std::unordered_set< const Node * > &inactive_lm_nodes) override
Copy of the post routine but that skips assembling inactive nodes.
ADReal computeQpResidual(Moose::MortarType mortar_type) final
const ADVariableValue & _primary_disp_y
y-displacement on the primary face
const ADVariableValue & _secondary_disp_y
y-displacement on the secondary face
virtual void computeQpProperties()
Computes properties that are functions only of the current quadrature point (_qp),...
virtual void enforceConstraintOnDof(const DofObject *const dof)
Method called from post().
const MooseVariable *const _disp_x_var
The x displacement variable.
const Real _c
This factor multiplies the weighted gap.
const MooseVariable *const _disp_y_var
The y displacement variable.
virtual void computeResidual() override
ADReal _qp_gap
The value of the gap at the current quadrature point.
Real _qp_factor
The value of the LM at the current quadrature point.
const InputParameters & parameters() const
Creates dof object to weighted gap map.
VariableValueTempl< true > ADVariableValue