17 #include "libmesh/string_to_enum.h" 24 MooseEnum orders(
"FIRST SECOND THIRD FOURTH",
"FIRST");
28 "Return the nearest value of a variable on a boundary from across a gap.");
29 params.
set<
bool>(
"_dual_restrictable") =
true;
31 "The boundary on the other side of a gap.");
32 params.
addRequiredParam<VariableName>(
"paired_variable",
"The variable to get the value of.");
33 params.
set<
bool>(
"use_displaced_mesh") =
true;
35 "Tangential distance to extend edges of contact surfaces");
37 "normal_smoothing_distance",
38 "Distance from edge in parametric coordinates over which to smooth contact normal");
39 params.
addParam<std::string>(
"normal_smoothing_method",
40 "Method to use to smooth normals (edge_based|nodal_normal_based)");
43 "warnings",
false,
"Whether to output warning messages concerning nodes not being found");
50 _nodal ? getPenetrationLocator(
51 parameters.
get<BoundaryName>(
"paired_boundary"),
54 : getQuadraturePenetrationLocator(
55 parameters.
get<BoundaryName>(
"paired_boundary"),
58 _moose_var(_subproblem.getStandardVariable(_tid, getParam<VariableName>(
"paired_variable"))),
59 _serialized_solution(_moose_var.sys().currentSolution()),
60 _dof_map(_moose_var.dofMap()),
61 _warnings(getParam<bool>(
"warnings"))
75 if (pairedVarOrder != gvaOrder && pairedVarOrder !=
CONSTANT)
76 mooseError(
"ERROR: specified order for GapValueAux (",
77 Utility::enum_to_string<Order>(gvaOrder),
78 ") does not match order for paired_variable \"",
81 Utility::enum_to_string<Order>(pairedVarOrder),
88 const Node * current_node = NULL;
101 std::vector<std::vector<Real>> & side_phi = pinfo->
_side_phi;
111 std::stringstream msg;
112 msg <<
"No gap value information found for node ";
113 msg << current_node->id();
114 msg <<
" on processor ";
registerMooseObject("MooseApp", GapValueAux)
bool _nodal
Flag indicating if the AuxKernel is nodal.
GapValueAux(const InputParameters ¶meters)
const unsigned int & _current_side
current side of the current element
MooseMesh & _mesh
Mesh this kernel is active on.
OutputType getValue(const Elem *elem, const std::vector< std::vector< OutputShape >> &phi) const
Compute the variable value at a point on an element.
void setNormalSmoothingDistance(Real normal_smoothing_distance)
Data structure used to hold penetration information.
const Node *const & _current_node
Current node (valid only for nodal kernels)
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
const std::string & name() const override
Get the variable name.
std::vector< std::vector< Real > > _side_phi
std::map< dof_id_type, PenetrationInfo * > & _penetration_info
Data structure of nodes and their associated penetration information.
void setTangentialTolerance(Real tangential_tolerance)
MooseVariable & _moose_var
const FEType & feType() const
Get the type of finite element object.
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
static InputParameters validParams()
T string_to_enum(const std::string &s)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
Order order() const
Get the order of this variable Note: Order enum can be implicitly converted to unsigned int...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeValue() override
Compute and return the value of the aux variable.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
unsigned int _qp
Quadrature point index.
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
void setNormalSmoothingMethod(std::string nsmString)
processor_id_type processor_id() const
PenetrationLocator & _penetration_locator