https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementIntegralVariableUserObject.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
13
16{
18 params.addClassDescription("computes a volume integral of a variable.");
19 params.addRequiredCoupledVar("variable", "The name of the variable that this object operates on");
20 return params;
21}
22
24 const InputParameters & parameters)
25 : ElementIntegralUserObject(parameters),
26 MooseVariableInterface<Real>(this,
27 false,
28 "variable",
29 Moose::VarKindType::VAR_ANY,
30 Moose::VarFieldType::VAR_FIELD_STANDARD),
31 _u(coupledValue("variable")),
32 _grad_u(coupledGradient("variable"))
33{
35}
36
37Real
registerMooseObject("MooseApp", ElementIntegralVariableUserObject)
This postprocessor computes a volume integral of the specified variable.
static InputParameters validParams()
This postprocessor computes a volume integral of the specified variable.
ElementIntegralVariableUserObject(const InputParameters &parameters)
const VariableValue & _u
Holds the solution at current quadrature points.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
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.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
Interface for objects that need to get values of MooseVariables.
MooseVariableField< Real > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...