www.mooseframework.org
FunctionSideIntegral.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
10 #include "FunctionSideIntegral.h"
11 #include "Function.h"
12 
14 
15 template <>
18 {
20  params.addParam<FunctionName>(
21  "function",
22  1.0,
23  "This postprocessor will return the integral of this function over the boundary");
24  return params;
25 }
26 
28  : SideIntegralPostprocessor(parameters), _func(getFunction("function"))
29 {
30 }
31 
32 void
34 {
35  const FunctionSideIntegral & pps = static_cast<const FunctionSideIntegral &>(y);
37 }
38 
39 Real
41 {
42  return _func.value(_t, _q_point[_qp]);
43 }
virtual void threadJoin(const UserObject &y) override
Must override.
registerMooseObject("MooseApp", FunctionSideIntegral)
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:38
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:37