14 #include "libmesh/quadrature.h" 23 "Computes the H1 or W^{1,p} error between an exact function and a coupled variable.");
39 mooseError(
"ElementH1ErrorFunctionAux only makes sense as an Elemental AuxVariable.");
41 Real summed_value = 0;
const MooseArray< Real > & _coord
A class for computing the element-wise H1 error (actually W^{1,p} error, if you set the value of p to...
A class for computing the element-wise L^2 error (actually L^p error, if you set the value of p to so...
virtual void setNodalValue(const OutputType &value, unsigned int idx=0)=0
registerMooseObject("MooseApp", ElementH1ErrorFunctionAux)
const VariableValue & _coupled_var
A reference to the variable to compute the norm of.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
static InputParameters validParams()
ElementH1ErrorFunctionAux(const InputParameters ¶meters)
Class constructor.
const MooseArray< Real > & _JxW
Transformed Jacobian weights.
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
virtual void compute() override
Overrides ElementLpNormAux since we want to raise to a power in computeValue() instead.
const VariableGradient & _grad_coupled_var
The gradient of the computed solution.
virtual void precalculateValue()
This callback is used for AuxKernelTempls that need to perform a per-element calculation.
virtual Real computeValue() override
Computes the error at the current qp.
static InputParameters validParams()
MooseVariableField< Real > & _var
This is a regular kernel so we cast to a regular MooseVariable.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
Quadrature rule being used.
IntRange< T > make_range(T beg, T end)
virtual RealGradient gradient(Real t, const Point &p) const
Function objects can optionally provide a gradient at a point.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
unsigned int _qp
Quadrature point index.
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
const MooseArray< Point > & _q_point
Active quadrature points.
MooseUnits pow(const MooseUnits &, int)
bool isNodal() const
Nodal or elemental kernel?
const Function & _func
Function representing the exact solution.