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 
17 template <>
20 {
22  params.addRequiredCoupledVar("variable",
23  "The name of the variable that this postprocessor operates on");
24  return params;
25 }
26 
28  : ElementPostprocessor(parameters),
29  MooseVariableInterface<Real>(this,
30  false,
31  "variable",
34  _u(coupledValue("variable")),
35  _grad_u(coupledGradient("variable")),
36  _qp(0)
37 {
39 }
40 
41 void
43 {
44  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
46 }
VarFieldType
Definition: MooseTypes.h:488
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
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.
void addMooseVariableDependency(MooseVariableFEBase *var)
Call this function to add the passed in MooseVariableFEBase as a variable that this object depends on...
InputParameters validParams< ElementVariablePostprocessor >()
MooseVariableFE< Real > * mooseVariable() const
Get the variable that this object is using.
unsigned int _qp
The current quadrature point.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:481
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
const QBase *const & _qrule
InputParameters validParams< ElementPostprocessor >()
Interface for objects that need to get values of MooseVariables.
Definition: Moose.h:112
ElementVariablePostprocessor(const InputParameters &parameters)