https://mooseframework.inl.gov
Loading...
Searching...
No Matches
WeightedVelocitiesUserObject.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
13
18{
19public:
21
23
24 virtual void initialize() override;
25 virtual void finalize() override;
26
30 const std::unordered_map<const DofObject *, std::array<ADReal, 2>> &
32
38 const std::array<ADRealVectorValue, 2> & contactTangents(const Elem & lower_secondary_elem,
39 unsigned int nodal_index) const;
40
46
58 virtual ADReal nodalTangentialPressure(const Node & node, unsigned int direction) const;
59
69 virtual const VariableTestValue & tangentialTractionBasis(unsigned int /*direction*/) const
70 {
71 return tractionBasis();
72 }
73
74protected:
79 virtual void computeQpProperties() override;
80
84 virtual void computeQpIProperties() override;
85
86 void selfInitialize();
88
90 std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_weighted_tangential_velocity;
91
93 std::unordered_map<const DofObject *, std::array<ADReal, 2>> _dof_to_real_tangential_velocity;
94
96 std::array<const ADReal *, 2> _tangential_vel_ptr = {{nullptr, nullptr}};
97
99 std::array<ADReal, 2> _qp_tangential_velocity;
100
102 std::array<ADReal, 2> _qp_real_tangential_velocity;
103
106
109
112
115
118
121
124
127
130
133
136
138 bool _3d;
139
142 mutable std::unordered_map<const Node *, std::array<ADRealVectorValue, 2>> _ad_nodal_tangents;
143};
144
145inline const std::unordered_map<const DofObject *, std::array<ADReal, 2>> &
DualNumber< Real, DNDerivativeType, true > ADReal
const InputParameters & parameters() const
Creates dof object to weighted gap map.
virtual const VariableTestValue & tractionBasis() const
Creates dof object to weighted tangential velocities map.
MooseVariableField< Real > & _secondary_var
Reference to the secondary variable.
std::array< const ADReal *, 2 > _tangential_vel_ptr
An array of two pointers to avoid copies.
const ADVariableValue *const _secondary_z_dot
z-velocity on the secondary face
const ADVariableValue *const _primary_z_dot
z-velocity on the primary face
const std::array< ADRealVectorValue, 2 > & contactTangents(const Elem &lower_secondary_elem, unsigned int nodal_index) const
Return contact tangents for the supplied lower-dimensional secondary element node.
MooseVariableField< Real > & _primary_var
Reference to the primary variable.
std::array< ADReal, 2 > _qp_tangential_velocity
The value of the tangential velocity values at the current quadrature point.
virtual void computeQpProperties() override
Computes properties that are functions only of the current quadrature point (_qp),...
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_weighted_tangential_velocity
A map from node to two weighted tangential velocities.
const ADVariableValue & _primary_y_dot
y-velocity on the primary face
const ADVariableValue & _primary_x_dot
x-velocity on the primary face
std::array< ADReal, 2 > _qp_real_tangential_velocity
The value of the "real" tangential velocity values at the current quadrature point.
virtual void computeQpIProperties() override
Computes properties that are functions both of _qp and _i, for example the weighted gap.
const ADVariableValue & _secondary_x_dot
x-velocity on the secondary face
ADRealVectorValue _qp_real_tangential_velocity_nodal
The value of the real tangential velocity vectors at the current node.
ADRealVectorValue _qp_tangential_velocity_nodal
The value of the tangential velocity vectors at the current node.
bool _3d
Automatic flag to determine whether we are doing three-dimensional work.
virtual const VariableTestValue & tangentialTractionBasis(unsigned int) const
SystemBase & _sys
Reference to the EquationSystem object.
const std::unordered_map< const DofObject *, std::array< ADReal, 2 > > & dofToWeightedVelocities() const
Get the degree of freedom to weighted velocities information.
const ADVariableValue & _secondary_y_dot
y-velocity on the secondary face
std::unordered_map< const DofObject *, std::array< ADReal, 2 > > _dof_to_real_tangential_velocity
A map from node to two interpolated, physical tangential velocities.
virtual ADReal nodalTangentialPressure(const Node &node, unsigned int direction) const
std::unordered_map< const Node *, std::array< ADRealVectorValue, 2 > > _ad_nodal_tangents
AD contact tangent frames, keyed on the secondary node and reused by every test function and quadratu...
virtual const ADVariableValue & contactTangentialPressureDirOne() const =0
virtual const ADVariableValue & contactTangentialPressureDirTwo() const =0
VariableShapeValue< true > VariableTestValue
VariableValueTempl< true > ADVariableValue