19 #include "libmesh/quadrature.h" 27 "variable",
"The name of the variable that this damper operates on");
35 _assembly(_subproblem.assembly(_tid, _sys.number())),
36 _coord_sys(_assembly.coordSystem()),
37 _var(_sys.getFieldVariable<
Real>(_tid, parameters.
get<NonlinearVariableName>(
"variable"))),
39 _current_elem(_var.currentElem()),
40 _q_point(_assembly.qPoints()),
41 _qrule(_assembly.qRule()),
42 _JxW(_assembly.JxW()),
47 _grad_u(_var.gradSln())
50 "ElementDamper only supports scalar variables. Variable '" +
_var.
name() +
51 "' has multiple components.");
58 Real cur_damping = 1.0;
63 if (cur_damping < damping)
64 damping = cur_damping;
static InputParameters validParams()
constexpr auto increment(std::index_sequence< first, tail... >)
Increment the first number in an index sequence, but roll over into the next number if it reaches Nma...
ElementDamper(const InputParameters ¶meters)
static InputParameters validParams()
unsigned int _qp
Quadrature point index.
unsigned int count() const
Get the number of components Note: For standard and vector variables, the number is one...
static InputParameters validParams()
const std::string & name() const
Get the name of the class.
unsigned int n_points() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::set< SubdomainID > EMPTY_BLOCK_IDS
An interface for accessing Materials.
bool hasBlocks(const SubdomainID id) const override
Returns whether the functor is defined on this block.
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
virtual Real computeQpDamping()=0
This MUST be overridden by a child damper.
MooseVariable & _var
Non-linear variable this damper works on.
Base class for deriving dampers.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const libMesh::QBase *const & _qrule
Quadrature rule.
Real computeDamping()
Computes this Damper's damping for one element.
const Elem & get(const ElemType type_in)
bool variableDefinedOnElement(const Elem *elem) const
Check whether this damper's variable has DOFs/components on the given element.