https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeWeightedGapCartesianLMMechanicalContact.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#include "MortarNodalFrames.h"
14
15#include <unordered_map>
16
22{
23public:
25
28 void computeResidual(Moose::MortarType mortar_type) override;
30 void computeJacobian(Moose::MortarType mortar_type) override;
31 void initialSetup() 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
56 void timestepSetup() override;
63 virtual void enforceConstraintOnDof(const DofObject * const dof);
64
73
75 const bool _has_disp_z;
80
84 const Real _c;
85
88
91
94
96 const bool _nodal;
97
99 std::vector<MooseVariable *> _lm_vars;
100
107
110
112 std::unordered_map<const DofObject *, std::pair<ADReal, Real>> _dof_to_weighted_gap;
113
116 std::unordered_map<const DofObject *, std::pair<const Node *, Point>> _dof_to_frame_node;
117
119 std::unordered_map<const DofObject *, RealVectorValue> _dof_to_old_normal_vector;
120
123
125 const ADRealVectorValue & dofNormal(const DofObject * dof);
126
128 const std::array<ADRealVectorValue, 2> & dofTangents(const DofObject * dof);
129
131 const ADReal * _weighted_gap_ptr = nullptr;
132 const Real * _normalization_ptr = nullptr;
133};
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 ...
virtual void enforceConstraintOnDof(const DofObject *const dof)
Method called from post().
virtual void computeQpIProperties()
Computes properties that are functions both of _qp and _i, for example the weighted gap.
const ADVariableValue & _secondary_disp_x
x-displacement on the secondary face
Real _qp_factor
The value of the LM at the current quadrature point.
Moose::Mortar::ADNodalFrames _nodal_frames
Secondary nodal normals and tangents with their displacement derivatives.
const MooseVariable *const _disp_y_var
The y displacement variable.
std::vector< MooseVariable * > _lm_vars
Cartesian Lagrange multipliers for mechanical contact.
const ADVariableValue & _primary_disp_x
x-displacement on the primary face
const std::array< ADRealVectorValue, 2 > & dofTangents(const DofObject *dof)
const ADReal * _weighted_gap_ptr
A pointer members that can be used to help avoid copying ADReals.
std::unordered_map< const DofObject *, RealVectorValue > _dof_to_old_normal_vector
A map from node to normal vector (2D) - old.
const ADVariableValue *const _primary_disp_z
z-displacement on the primary face
std::unordered_map< const DofObject *, std::pair< ADReal, Real > > _dof_to_weighted_gap
A map from node to weighted gap and normalization (if requested)
const ADVariableValue & _primary_disp_y
y-displacement on the primary face
ADRealVectorValue _qp_gap_nodal
Vector for computation of weighted gap with nodal normals.
bool _normalize_c
Whether to normalize weighted gap by weighting function norm.
ADReal _qp_gap
The value of the gap at the current quadrature point.
const MooseVariable *const _disp_x_var
The x 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.
virtual void computeQpProperties()
Computes properties that are functions only of the current quadrature point (_qp),...
const ADVariableValue & _secondary_disp_y
y-displacement on the secondary face
const bool _nodal
Whether the dof objects are nodal; if they're not, then they're elemental.
std::unordered_map< const DofObject *, std::pair< const Node *, Point > > _dof_to_frame_node
A map from LM degree of freedom to the secondary node whose frame projects its multipliers,...
const MooseVariable *const _disp_z_var
The z displacement variable.
const bool _has_disp_z
For 2D mortar contact no displacement will be specified, so const pointers used.
const ADVariableValue *const _secondary_disp_z
z-displacement on the secondary face
const InputParameters & parameters() const
VariableValueTempl< true > ADVariableValue