https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SideVariablePostprocessor.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#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 : SidePostprocessor(parameters),
28 MooseVariableInterface<Real>(this,
29 false,
30 "variable",
31 Moose::VarKindType::VAR_ANY,
32 Moose::VarFieldType::VAR_FIELD_STANDARD),
33 _u(coupledValue("variable")),
34 _grad_u(coupledGradient("variable")),
35 _qp(0)
36{
38}
39
40void
42{
43 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
45}
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 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< Real > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
Base class for postprocessors executed on one or more sidesets.
static InputParameters validParams()
const QBase *const & _qrule
static InputParameters validParams()
SideVariablePostprocessor(const InputParameters &parameters)
virtual void computeQpValue()=0
This is what derived classes should override to do something on every quadrature point on every eleme...
unsigned int _qp
The current quadrature point.
virtual void execute() override
Execute method.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...