22 params.
addClassDescription(
"This class creates an auxiliary vector for outputting the mortar " 23 "frictional pressure vector.");
26 "First tangent vector Lagrange's multiplier for computing the mortar " 27 "frictional pressure vector.");
30 "Second tangent vector Lagrange's multiplier for computing the mortar " 31 "frictional pressure vector.");
33 "Cartesian component of frictional tangent vector");
36 "The name of the primary boundary sideset.");
38 "The name of the secondary boundary sideset.");
40 "use_displaced_mesh",
true,
"Whether to use the displaced mesh to get the mortar interface.");
46 _tangent_one(&coupledValueLower(
"tangent_one")),
47 _tangent_two(&coupledValueLower(
"tangent_two")),
49 _primary_id(_fe_problem.
mesh().
getBoundaryID(getParam<BoundaryName>(
"primary_boundary"))),
50 _secondary_id(_fe_problem.
mesh().
getBoundaryID(getParam<BoundaryName>(
"secondary_boundary"))),
51 _component(getParam<unsigned
int>(
"component")),
52 _use_displaced_mesh(getParam<bool>(
"use_displaced_mesh"))
57 "MortarFrictionalPressureVector auxiliary kernel can only be used with nodal kernels.");
61 "This auxiliary kernel requires the use of displaced meshes to compute the " 62 "frictional pressure vector.");
67 "MortarFrictionalPressureVector auxiliary kernel must be restricted to a boundary.");
70 const auto & displaced_mortar_interfaces =
73 if (displaced_mortar_interfaces.size() == 0)
75 "No mortar interface could be identified in this problem. Make sure mortar contact " 79 if (mortar_dimension == 1)
81 "MortarFrictionalPressureVector auxiliary kernel can only be used in " 82 "three-dimensional problems");
87 "The boundary pairs do not correspond to a single mortar contact boundary pair. " 88 "Please revise your input file for proper mortar contact constraints and mortar " 89 "frictional pressure vector auxiliary variable definition.");
102 const Elem * lower_dimensional_element =
106 const auto & nodal_tangents =
109 Real tangent_one_component = 0;
110 Real tangent_two_component = 0;
112 for (
const auto lowerd_node :
make_range(lower_dimensional_element->n_nodes()))
114 if (
_current_node->id() == lower_dimensional_element->node_id(lowerd_node))
116 tangent_one_component = nodal_tangents[0][lowerd_node](
_component);
117 tangent_two_component = nodal_tangents[1][lowerd_node](
_component);
123 const Real tangent_vector_component =
124 tangent_one_component * (*_tangent_one)[
_qp] + tangent_two_component * (*_tangent_two)[
_qp];
126 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)
void paramError(const std::string ¶m, Args... args) const
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
const std::unordered_map< std::pair< BoundaryID, BoundaryID >, std::unique_ptr< AutomaticMortarGeneration > > & getMortarInterfaces(bool on_displaced) 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
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.
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.