13 #include "libmesh/string_to_enum.h" 22 "Populate an auxiliary variable with the residual contribution of a variable's equation.");
24 "debug_variable",
"The variable whose equation residual is being output.");
30 _debug_var(_nl_sys.getVariable(_tid, getParam<NonlinearVariableName>(
"debug_variable"))),
31 _residual_copy(_nl_sys.residualGhosted())
34 for (
const auto block_id :
blockIDs())
38 const auto block_description =
45 "', whose equation we want to output the residual of, is not defined on block ",
47 ", where DebugResidualAux '",
57 if (var_order != debug_order || var_family != debug_family)
59 "A mismatch was found between family and order parameters for ",
63 if (!
_nodal && debug_order > 0)
64 mooseWarning(
"Residual output is approximate for variable order " +
MooseVariableFEBase & _debug_var
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
NumericVector< Number > & _residual_copy
unsigned int number() const
Get variable number coming from libMesh.
const Node *const & _current_node
Current node (valid only for nodal kernels)
Auxiliary kernel for debugging convergence.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids.
registerMooseObject("MooseApp", DebugResidualAux)
MooseMesh & _mesh
Mesh this kernel is active on.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
void mooseWarning(Args &&... args) const
static InputParameters validParams()
const std::string & name() const
Get the name of the class.
virtual Real computeValue() override
Compute and return the value of the aux variable.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
unsigned int number() const
Gets the number of this system.
std::string stringify(const T &t)
conversion to string
DebugResidualAux(const InputParameters ¶meters)
MooseVariableField< Real > & _var
This is a regular kernel so we cast to a regular MooseVariable, hides base _var.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _nodal
Flag indicating if the AuxKernel is nodal.
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
static InputParameters validParams()
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.