21 params.
addClassDescription(
"This class creates an auxiliary vector for outputting the mortar " 22 "frictional pressure vector.");
25 "First tangent vector Lagrange's multiplier for computing the mortar " 26 "frictional pressure vector.");
29 "Second tangent vector Lagrange's multiplier for computing the mortar " 30 "frictional pressure vector.");
32 "Cartesian component of frictional tangent vector");
35 "The name of the primary boundary sideset.");
37 "The name of the secondary boundary sideset.");
39 "use_displaced_mesh",
true,
"Whether to use the displaced mesh to get the mortar interface.");
45 _tangent_one(&coupledValueLower(
"tangent_one")),
46 _tangent_two(&coupledValueLower(
"tangent_two")),
48 _primary_id(_fe_problem.
mesh().
getBoundaryID(getParam<BoundaryName>(
"primary_boundary"))),
49 _secondary_id(_fe_problem.
mesh().
getBoundaryID(getParam<BoundaryName>(
"secondary_boundary"))),
50 _component(getParam<unsigned
int>(
"component")),
51 _use_displaced_mesh(getParam<bool>(
"use_displaced_mesh"))
56 "MortarFrictionalPressureVector auxiliary kernel can only be used with nodal kernels.");
60 "This auxiliary kernel requires the use of displaced meshes to compute the " 61 "frictional pressure vector.");
66 "MortarFrictionalPressureVector auxiliary kernel must be restricted to a boundary.");
69 const auto & displaced_mortar_interfaces =
72 if (displaced_mortar_interfaces.size() == 0)
74 "No mortar interface could be identified in this problem. Make sure mortar contact " 78 if (mortar_dimension == 1)
80 "MortarFrictionalPressureVector auxiliary kernel can only be used in " 81 "three-dimensional problems");
86 "The boundary pairs do not correspond to a single mortar contact boundary pair. " 87 "Please revise your input file for proper mortar contact constraints and mortar " 88 "frictional pressure vector auxiliary variable definition.");
100 const Elem * lower_dimensional_element =
104 const auto & nodal_tangents =
107 Real tangent_one_component = 0;
108 Real tangent_two_component = 0;
110 for (
const auto lowerd_node :
make_range(lower_dimensional_element->n_nodes()))
112 if (
_current_node->id() == lower_dimensional_element->node_id(lowerd_node))
114 tangent_one_component = nodal_tangents[0][lowerd_node](
_component);
115 tangent_two_component = nodal_tangents[1][lowerd_node](
_component);
121 const Real tangent_vector_component =
122 tangent_one_component * (*_tangent_one)[
_qp] + tangent_two_component * (*_tangent_two)[
_qp];
124 return tangent_vector_component;
const unsigned int _component
The component.
const bool _use_displaced_mesh
Whether to use displaced mesh (required for this auxiliary kernel)
static InputParameters validParams()
registerMooseObject("ContactApp", MortarFrictionalPressureVectorAux)
const Node *const & _current_node
const ExecFlagType EXEC_TIMESTEP_END
const BoundaryID _primary_id
Boundary ID for the primary surface.
BoundaryID getBoundaryID(const BoundaryName &boundary_name, const MeshBase &mesh)
virtual unsigned int dimension() const
MortarFrictionalPressureVectorAux(const InputParameters ¶meters)
const BoundaryID _secondary_id
Boundary ID for the secondary surface.
std::array< MooseUtils::SemidynamicVector< Point, 9 >, 2 > getNodalTangents(const Elem &secondary_elem) const
virtual Real computeValue() override
void paramError(const std::string ¶m, Args... args) const
const std::unordered_map< dof_id_type, std::vector< const Elem *> > & nodesToSecondaryElem() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
virtual MooseMesh & mesh() override
void mooseError(Args &&... args) const
static InputParameters validParams()
const FEProblemBase & _fe_problem
Fe problem to obtain primary/secondary ids.
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, AutomaticMortarGeneration > & getMortarInterfaces(bool on_displaced) const
void ErrorVector unsigned int
const Elem & get(const ElemType type_in)
const AutomaticMortarGeneration * _mortar_generation_object
Handle to mortar generation object to obtain mortar geometry.
Computes the frictional pressure vector for three-dimensional mortar mechanical contact.