11 #include "SystemBase.h"
12 #include "PenetrationInfo.h"
13 #include "MooseMesh.h"
15 #include "libmesh/string_to_enum.h"
24 MooseEnum orders(
"CONSTANT FIRST SECOND THIRD FOURTH",
"FIRST");
27 params.addRequiredParam<BoundaryName>(
"boundary",
"The master boundary");
28 params.addRequiredParam<BoundaryName>(
"slave",
"The slave boundary");
29 params.addParam<MooseEnum>(
"order", orders,
"The finite element order");
30 params.set<
bool>(
"use_displaced_mesh") =
true;
31 params.addParam<Real>(
"tangential_tolerance",
32 "Tangential distance to extend edges of contact surfaces");
33 params.addParam<Real>(
34 "normal_smoothing_distance",
35 "Distance from edge in parametric coordinates over which to smooth contact normal");
36 params.addParam<std::string>(
"normal_smoothing_method",
37 "Method to use to smooth normals (edge_based|nodal_normal_based)");
43 : DiracKernel(parameters),
45 getPenetrationLocator(getParam<BoundaryName>(
"boundary"),
46 getParam<BoundaryName>(
"slave"),
47 Utility::string_to_enum<Order>(getParam<MooseEnum>(
"order")))),
48 _slave_flux(_sys.getVector(
"slave_flux"))
50 if (parameters.isParamValid(
"tangential_tolerance"))
53 if (parameters.isParamValid(
"normal_smoothing_distance"))
56 if (parameters.isParamValid(
"normal_smoothing_method"))
58 parameters.get<std::string>(
"normal_smoothing_method"));
67 std::map<dof_id_type, PenetrationInfo *>::iterator
71 for (; it != end; ++it)
73 PenetrationInfo * pinfo = it->second;
76 if (!pinfo || pinfo->_node->n_comp(_sys.number(), _var.number()) < 1)
79 addPoint(pinfo->_elem, pinfo->_closest_point);
88 const Node * node = pinfo->_node;
89 long int dof_number = node->dof_number(_sys.number(), _var.number(), 0);