18#include "libmesh/threads.h"
27 params.registerSystemAttributeName(
"Kernel");
29 params.addParam<std::vector<AuxVariableName>>(
32 "The name of auxiliary variables to save this Kernel's residual contributions to. "
33 " Everything about that variable must match everything about this variable (the "
34 "type, what blocks it's on, etc.)");
35 params.addParam<std::vector<AuxVariableName>>(
38 "The name of auxiliary variables to save this Kernel's diagonal Jacobian "
39 "contributions to. Everything about that variable must match everything "
40 "about this variable (the type, what blocks it's on, etc.)");
42 params.addParam<
bool>(
"use_displaced_mesh",
44 "Whether or not this object should use the "
45 "displaced mesh for computation. Note that in "
46 "the case this is true but no displacements "
47 "are provided in the Mesh block the "
48 "undisplaced mesh will still be used.");
50 params.addParamNamesToGroup(
"diag_save_in save_in use_displaced_mesh",
"Advanced");
51 params.addCoupledVar(
"displacements",
"The displacements");
54 params.addRelationshipManager(
"ElementSideNeighborLayers",
57 { rm_params.
set<
unsigned short>(
"layers") = 0; });
68 _current_elem(_assembly.elem()),
69 _current_elem_volume(_assembly.elemVolume()),
70 _q_point(_assembly.qPoints()),
71 _qrule(_assembly.qRule()),
72 _JxW(_assembly.JxW()),
73 _coord(_assembly.coordTransformation()),
75 _save_in_strings(parameters.get<
std::vector<AuxVariableName>>(
"save_in")),
76 _has_diag_save_in(false),
77 _diag_save_in_strings(parameters.get<
std::vector<AuxVariableName>>(
"diag_save_in")),
78 _use_displaced_mesh(getParam<bool>(
"use_displaced_mesh"))
81 for (
decltype(num_disp) i = 0; i < num_disp; ++i)
An interface that restricts an object to subdomains via the 'blocks' input parameter.
static InputParameters validParams()
unsigned int coupledComponents(const std::string &var_name) const
Number of coupled components.
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
Returns the index for a coupled variable by name.
static InputParameters validParams()
std::vector< unsigned int > _displacements
static InputParameters validParams()
KernelBase(const InputParameters ¶meters)
An interface for accessing Materials.
static InputParameters validParams()
This is the common base class for objects that give residual contributions.
static InputParameters validParams()
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...