https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementHCurlSemiError.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11#include "Function.h"
12
14
17{
19 params.addClassDescription("Returns the H(curl)-seminorm of the difference between a pair of "
20 "computed and analytical vector-valued solutions.");
21 params.addRequiredParam<FunctionName>("function",
22 "The vector analytical solution to compare against");
23 params.addRequiredCoupledVar("variable", "The vector FE solution");
24 params.suppressParameter<FunctionName>("function_x");
25 params.suppressParameter<FunctionName>("function_y");
26 params.suppressParameter<FunctionName>("function_z");
27 params.suppressParameter<std::vector<VariableName>>("var_x");
28 params.suppressParameter<std::vector<VariableName>>("var_y");
29 params.suppressParameter<std::vector<VariableName>>("var_z");
30 return params;
31}
32
34 : ElementVectorL2Error(parameters),
35 _u_var(*getVectorVar("variable", 0)),
36 _curl_u(_u_var.curlSln())
37{
38}
39
40Real
registerMooseObject("MooseApp", ElementHCurlSemiError)
This postprocessor will print out the H(curl)-seminorm of the difference between the computed solutio...
ElementHCurlSemiError(const InputParameters &parameters)
static InputParameters validParams()
virtual Real computeQpIntegral() override
const VectorVariableCurl & _curl_u
curl of the vector variable
const MooseArray< Point > & _q_point
This postprocessor will print out the L2-seminorm of the difference between the computed solution and...
const Function & _func
vector or component-wise analytical solution to compare against
static InputParameters validParams()
virtual RealVectorValue curl(Real t, const Point &p) const
Override this to evaluate the curl of the vector function at a point (t,x,y,z), by default this retur...
Definition Function.C:89
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void suppressParameter(const std::string &name)
This method suppresses an inherited parameter so that it isn't required or valid in the derived class...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.