www.mooseframework.org
ElementH1SemiError.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "ElementH1SemiError.h"
16 #include "Function.h"
17 
18 template <>
21 {
23  params.addRequiredParam<FunctionName>("function", "The analytic solution to compare against");
24  return params;
25 }
26 
28  : ElementIntegralVariablePostprocessor(parameters), _func(getFunction("function"))
29 {
30 }
31 
32 Real
34 {
36 }
37 
38 Real
40 {
42  return diff * diff;
43 }
RealVectorValue RealGradient
Definition: Assembly.h:43
virtual RealGradient gradient(Real t, const Point &p)
Function objects can optionally provide a gradient at a point.
Definition: Function.C:49
const MooseArray< Point > & _q_point
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
virtual Real computeQpIntegral() override
This postprocessor computes a volume integral of the specified variable.
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.
ElementH1SemiError(const InputParameters &parameters)
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...
InputParameters validParams< ElementH1SemiError >()
InputParameters validParams< ElementIntegralVariablePostprocessor >()