13#include "libmesh/quadrature.h"
21 params.
addClassDescription(
"Compute an elemental field variable (single value per element) equal "
22 "to the Lp-norm of a coupled Variable.");
29 :
AuxKernel(parameters), _p(getParam<Real>(
"p")), _coupled_var(coupledValue(
"coupled_variable"))
32 paramError(
"variable",
"Must be of type CONSTANT MONOMIAL");
42 Real summed_value = 0;
registerMooseObject("MooseApp", ElementLpNormAux)
virtual void precalculateValue()
This callback is used for AuxKernelTempls that need to perform a per-element calculation.
const MooseArray< Real > & _coord
const MooseArray< Real > & _JxW
Transformed Jacobian weights.
unsigned int _qp
Quadrature point index.
MooseVariableField< Real > & _var
This is a regular kernel so we cast to a regular MooseVariable, hides base _var.
const QBase *const & _qrule
Quadrature rule being used.
static InputParameters validParams()
Compute an elemental field variable (single value per element) equal to the Lp-norm of a coupled Vari...
static InputParameters validParams()
virtual void compute() override
Override the base class functionality to compute the element integral withou scaling by element volum...
ElementLpNormAux(const InputParameters ¶meters)
Class constructor.
const VariableValue & _coupled_var
A reference to the variable to compute the norm of.
virtual Real computeValue() override
Called by compute() to get the value of the integrand at the current qp.
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 ...
virtual void setDofValue(const DofValue &value, unsigned int index)=0
Degree of freedom value setters.
MooseVariableBase * mooseVariableBase() const
Get the variable that this object is using.
MooseUnits pow(const MooseUnits &, int)