www.mooseframework.org
ElementVariablePostprocessor.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 
11 #include "MooseVariable.h"
12 #include "SubProblem.h"
13 #include "MooseTypes.h"
14 
15 #include "libmesh/quadrature.h"
16 
18 
21 {
23  params.addRequiredCoupledVar("variable",
24  "The name of the variable that this postprocessor operates on");
25  return params;
26 }
27 
29  : ElementPostprocessor(parameters),
30  MooseVariableInterface<Real>(this,
31  false,
32  "variable",
35  _u(coupledValue("variable")),
36  _grad_u(coupledGradient("variable")),
37  _qp(0)
38 {
40 }
41 
42 void
44 {
45  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
47 }
Moose::VarFieldType
VarFieldType
Definition: MooseTypes.h:613
Moose
Definition: Moose.h:116
InputParameters::addRequiredCoupledVar
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
Definition: InputParameters.C:216
MooseVariableInterface< Real >::mooseVariable
MooseVariableFE< Real > * mooseVariable() const
Get the variable that this object is using.
Definition: MooseVariableInterface.C:70
ElementPostprocessor
Definition: ElementPostprocessor.h:21
MooseVariableDependencyInterface::addMooseVariableDependency
void addMooseVariableDependency(MooseVariableFEBase *var)
Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on...
Definition: MooseVariableDependencyInterface.h:36
ElementPostprocessor::validParams
static InputParameters validParams()
Definition: ElementPostprocessor.C:15
ElementVariablePostprocessor::computeQpValue
virtual void computeQpValue()=0
This is what derived classes should override to do something on every quadrature point on every eleme...
MooseVariable.h
ElementVariablePostprocessor::execute
virtual void execute() override
Execute method.
Definition: ElementVariablePostprocessor.C:43
defineLegacyParams
defineLegacyParams(ElementVariablePostprocessor)
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
Moose::VAR_ANY
Definition: MooseTypes.h:610
ElementVariablePostprocessor::validParams
static InputParameters validParams()
Definition: ElementVariablePostprocessor.C:20
ElementVariablePostprocessor::_qp
unsigned int _qp
The current quadrature point.
Definition: ElementVariablePostprocessor.h:42
SubProblem.h
ElementUserObject::_qrule
const QBase *const & _qrule
Definition: ElementUserObject.h:62
Moose::VarKindType
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:606
ElementVariablePostprocessor.h
MooseTypes.h
ElementVariablePostprocessor
Definition: ElementVariablePostprocessor.h:21
MooseVariableInterface
Interface for objects that need to get values of MooseVariables.
Definition: MooseVariableInterface.h:24
Moose::VAR_FIELD_STANDARD
Definition: MooseTypes.h:615
ElementVariablePostprocessor::ElementVariablePostprocessor
ElementVariablePostprocessor(const InputParameters &parameters)
Definition: ElementVariablePostprocessor.C:28