www.mooseframework.org
SideIntegralVariablePostprocessor.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 "MathFVUtils.h"
12 
13 #include "metaphysicl/raw_type.h"
14 
16 
19 {
21  params.addRequiredCoupledVar("variable",
22  "The name of the variable which this postprocessor integrates");
23  params.addClassDescription("Computes a surface integral of the specified variable");
24  return params;
25 }
26 
28  const InputParameters & parameters)
29  : SideIntegralPostprocessor(parameters),
31  false,
32  "variable",
35  _u(coupledValue("variable")),
36  _grad_u(coupledGradient("variable")),
37  _fv(_fv_variable || _linear_fv_variable)
38 {
40 
42 }
43 
44 Real
46 {
48 }
49 
50 Real
52 {
53  return _u[_qp];
54 }
55 
56 bool
57 SideIntegralVariablePostprocessor::hasFaceSide(const FaceInfo & fi, const bool fi_elem_side) const
58 {
59  return _field_variable->hasFaceSide(fi, fi_elem_side);
60 }
VarFieldType
Definition: MooseTypes.h:634
bool _qp_integration
Whether to integrate over quadrature points or FaceInfos.
static InputParameters validParams()
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
auto raw_value(const Eigen::Map< T > &in)
Definition: ADReal.h:73
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const VariableValue & _u
Holds the solution at current quadrature points.
unsigned int _qp
The local quadrature point index when computing an integral over quadrature points.
const bool _fv
Whether this is acting on a finite volume variable.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:35
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
Real computeFaceInfoIntegral(const FaceInfo *fi) override
This postprocessor computes a surface integral of the specified variable on a sideset on the boundary...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
SideIntegralVariablePostprocessor(const InputParameters &parameters)
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
Interface for objects that need to get values of MooseVariables.
MooseVariableField< Real > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
registerMooseObject("MooseApp", SideIntegralVariablePostprocessor)
MooseVariableField< Real > * _field_variable
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
Make a functor face argument with a central differencing limiter, e.g.
This postprocessor computes a surface integral of the specified variable.
bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const override
Definition: MooseFunctor.h:966