www.mooseframework.org
ElementVariablePostprocessor.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 #include "MooseVariable.h"
17 #include "SubProblem.h"
18 #include "MooseTypes.h"
19 
20 #include "libmesh/quadrature.h"
21 
22 template <>
25 {
27  params.addRequiredCoupledVar("variable",
28  "The name of the variable that this postprocessor operates on");
29  return params;
30 }
31 
33  : ElementPostprocessor(parameters),
34  MooseVariableInterface(this, false),
35  _u(coupledValue("variable")),
36  _grad_u(coupledGradient("variable")),
37  _u_dot(coupledDot("variable")),
38  _qp(0)
39 {
41 }
42 
43 void
45 {
46  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
48 }
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...
virtual void computeQpValue()=0
This is what derived classes should override to do something on every quadrature point on every eleme...
virtual void execute() override
Execute method.
InputParameters validParams< ElementVariablePostprocessor >()
MooseVariable * mooseVariable()
Get the variable that this object is using.
unsigned int _qp
The current quadrature point.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
InputParameters validParams< ElementPostprocessor >()
Interface for objects that need to get values of MooseVariables.
ElementVariablePostprocessor(const InputParameters &parameters)