www.mooseframework.org
ElementIntegralVariablePostprocessor.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 
16 
17 template <>
20 {
22  params.addRequiredCoupledVar("variable", "The name of the variable that this object operates on");
23  return params;
24 }
25 
27  const InputParameters & parameters)
28  : ElementIntegralPostprocessor(parameters),
29  MooseVariableInterface(this, false),
30  _u(coupledValue("variable")),
31  _grad_u(coupledGradient("variable")),
32  _u_dot(coupledDot("variable"))
33 {
35 }
36 
37 Real
39 {
40  return _u[_qp];
41 }
This postprocessor computes a volume integral of the specified variable.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addMooseVariableDependency(MooseVariable *var)
Call this function to add the passed in MooseVariable as a variable that this object depends on...
MooseVariable * mooseVariable()
Get the variable that this object is using.
const VariableValue & _u
Holds the solution at current quadrature points.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
InputParameters validParams< ElementIntegralVariablePostprocessor >()
Interface for objects that need to get values of MooseVariables.
ElementIntegralVariablePostprocessor(const InputParameters &parameters)
InputParameters validParams< ElementIntegralPostprocessor >()