19 params.
addClassDescription(
"Returns the L2-norm of the difference between a pair of computed " 20 "and analytical vector-valued solutions.");
21 params.
addParam<FunctionName>(
"function", 0,
"The vector analytical solution to compare against");
23 "function_x", 0,
"The analytical solution to compare against in the x direction");
25 "function_y", 0,
"The analytical solution to compare against in the y direction");
27 "function_z", 0,
"The analytical solution to compare against in the z direction");
28 params.
addCoupledVar(
"variable", {0, 0, 0},
"The vector FE solution");
29 params.
addCoupledVar(
"var_x", 0,
"The FE solution in the x direction");
30 params.
addCoupledVar(
"var_y", 0,
"The FE solution in the y direction");
31 params.
addCoupledVar(
"var_z", 0,
"The FE solution in the z direction");
37 _func(getFunction(
"function")),
38 _funcx(getFunction(
"function_x")),
39 _funcy(getFunction(
"function_y")),
40 _funcz(getFunction(
"function_z")),
41 _u(coupledVectorValue(
"variable")),
42 _ux(coupledValue(
"var_x")),
43 _uy(coupledValue(
"var_y")),
44 _uz(coupledValue(
"var_z")),
45 _has_vector_function(isParamSetByUser(
"function")),
46 _has_scalar_function(isParamSetByUser(
"function_x") || isParamSetByUser(
"function_y") ||
47 isParamSetByUser(
"function_z")),
48 _has_vector_variable(isParamSetByUser(
"variable")),
49 _has_scalar_variable(isParamSetByUser(
"var_x") || isParamSetByUser(
"var_y") ||
50 isParamSetByUser(
"var_z"))
54 "The 'function' and 'function_{x,y,z}' parameters cannot both be unset.");
57 paramError(
"function",
"The 'function' and 'function_{x,y,z}' parameters cannot both be set.");
60 paramError(
"variable",
"The 'variable' and 'var_{x,y,z}' parameters cannot both be unset.");
63 paramError(
"variable",
"The 'variable' and 'var_{x,y,z}' parameters cannot both be set.");
84 return (sol_val - func_val).norm_sq();
This postprocessor computes a volume integral of the specified variable.
const VectorVariableValue & _u
vector or component-wise variable values
const MooseArray< Point > & _q_point
const bool _has_scalar_function
This postprocessor will print out the L2-seminorm of the difference between the computed solution and...
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
static InputParameters validParams()
static InputParameters validParams()
const VariableValue & _ux
registerMooseObject("MooseApp", ElementVectorL2Error)
const bool _has_vector_variable
const VariableValue & _uy
virtual Real computeQpIntegral() override
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
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 ...
ElementVectorL2Error(const InputParameters ¶meters)
const bool _has_vector_function
whether the user chose to use a vector or component-wise solution/variable
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _uz
virtual RealVectorValue vectorValue(Real t, const Point &p) const
Override this to evaluate the vector function at a point (t,x,y,z), by default this returns a zero ve...
const bool _has_scalar_variable
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...
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
const Function & _func
vector or component-wise analytical solution to compare against