www.mooseframework.org
FunctionSideIntegral.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 "FunctionSideIntegral.h"
16 #include "Function.h"
17 
18 template <>
21 {
23  params.addParam<FunctionName>(
24  "function",
25  1.0,
26  "This postprocessor will return the integral of this function over the boundary");
27  return params;
28 }
29 
31  : SideIntegralPostprocessor(parameters), _func(getFunction("function"))
32 {
33 }
34 
35 void
37 {
38  const FunctionSideIntegral & pps = static_cast<const FunctionSideIntegral &>(y);
40 }
41 
42 Real
44 {
45  return _func.value(_t, _q_point[_qp]);
46 }
virtual void threadJoin(const UserObject &y) override
Must override.
virtual Real value(Real t, const Point &p)
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
Definition: Function.C:43
InputParameters validParams< SideIntegralPostprocessor >()
Function & _func
The function.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MooseArray< Point > & _q_point
virtual Real computeQpIntegral() override
FunctionSideIntegral(const InputParameters &parameters)
This postprocessor computes a volume integral of the specified variable.
This postprocessor computes the integral of a function over a specified boundary. ...
InputParameters validParams< FunctionSideIntegral >()
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
Base class for user-specific data.
Definition: UserObject.h:42