https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementIntegralArrayVariablePostprocessor.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.addRequiredCoupledVar("variable",
19 "The name of the array variable that this object operates on");
20 params.addParam<unsigned int>("component", 0, "Component of the array variable to be integrated");
21 params.addClassDescription("Integral of one component of an array variable.");
22 return params;
23}
24
26 const InputParameters & parameters)
27 : ElementIntegralPostprocessor(parameters),
28 MooseVariableInterface<RealEigenVector>(
29 this, false, "variable", Moose::VarKindType::VAR_ANY, Moose::VarFieldType::VAR_FIELD_ARRAY),
30 _u(coupledArrayValue("variable")),
31 _grad_u(coupledArrayGradient("variable")),
32 _component(getParam<unsigned int>("component"))
33{
35}
36
37Real
registerMooseObject("MooseApp", ElementIntegralArrayVariablePostprocessor)
void ErrorVector unsigned int
This postprocessor computes a volume integral of the specified variable.
ElementIntegralArrayVariablePostprocessor(const InputParameters &parameters)
const ArrayVariableValue & _u
Holds the solution at current quadrature points.
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 addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
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< RealEigenVector > & 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...