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 
19 {
21  params.addRequiredCoupledVar("variable",
22  "The name of the variable that this postprocessor operates on");
23  return params;
24 }
25 
27  : ElementPostprocessor(parameters),
29  false,
30  "variable",
33  _u(coupledValue("variable")),
34  _grad_u(coupledGradient("variable")),
35  _qp(0)
36 {
38 }
39 
40 void
42 {
43  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
45 }
VarFieldType
Definition: MooseTypes.h:634
static InputParameters validParams()
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.
unsigned int _qp
The current quadrature point.
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
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...
ElementVariablePostprocessor(const InputParameters &parameters)