19#include "libmesh/mesh_base.h"
27 params.
addRequiredParam<VariableName>(
"variable",
"The name of the variable to test for contact");
28 params.
addRequiredParam<SubdomainName>(
"subdomain",
"The subdomain that the variable lives on");
30 "tolerance", TOLERANCE,
"The tolerance for accepting that the variable indicates contact");
32 "indicating mechanical contact");
38 _var(_fe_problem.getVariable(_tid,
39 getParam<VariableName>(
"variable"),
40 Moose::VarKindType::VAR_SOLVER,
41 Moose::VarFieldType::VAR_FIELD_STANDARD)),
42 _mesh(_fe_problem.
mesh().getMesh()),
43 _subdomain_id(_fe_problem.
mesh().getSubdomainID(getParam<SubdomainName>(
"subdomain"))),
44 _tolerance(getParam<Real>(
"tolerance"))
63 ConstElemRange range(elem_begin, elem_end);
65 Threads::parallel_reduce(range, aldit);
69 for (
auto dof : aldit.getDofIndices())
74 _console << std::endl <<
"The number of nodes in contact is " <<
_count << std::endl << std::endl;
const ConsoleStream _console
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
static InputParameters validParams()
const std::string & name() const
unsigned int number() const
NumericVector< Number > & solution()
FEProblemBase & _fe_problem