17#include "libmesh/enum_norm_type.h"
26 "The name of the variable to compute the residual for");
29 "Computes the L2 norm of the residual of a single variable in the solution vector.");
35 _var(_fe_problem.getVariable(_tid,
36 getParam<VariableName>(
"variable"),
37 Moose::VarKindType::VAR_SOLVER,
38 Moose::VarFieldType::VAR_FIELD_STANDARD))
41 "VariableResidual is deprecated. Please use DiscreteVariableResidualNorm instead.");
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Real PostprocessorValue
various MOOSE typedefs
registerMooseObject("MooseApp", VariableResidual)
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
unsigned int number() const
Get variable number coming from libMesh.
Nonlinear system to be solved.
virtual NumericVector< Number > & RHS()=0
virtual libMesh::System & system() override
Get the reference to the libMesh system.
unsigned int number() const
Gets the number of this system.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
SystemBase & _sys
Reference to the system object for this user object.
Real _var_residual
The residual of the variable.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
MooseVariableFEBase & _var
MOOSE variable we compute the residual for.
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void execute() override
Execute method.
VariableResidual(const InputParameters ¶meters)
static InputParameters validParams()
Real calculate_norm(const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type, std::set< unsigned int > *skip_dimensions=nullptr) const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...