www.mooseframework.org
SideIntegralVariableUserObject.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 
14 {
16  params.addRequiredCoupledVar("variable",
17  "The name of the variable that this boundary condition applies to");
18  return params;
19 }
20 
22  : SideIntegralUserObject(parameters),
24  false,
25  "variable",
28  _u(coupledValue("variable")),
29  _grad_u(coupledGradient("variable")),
30  _fv(_fv_variable)
31 {
33 }
34 
35 Real
37 {
38  if (_fv)
39  {
40  // We should be at the edge of the domain for this variable
41  const FaceInfo * const fi = _mesh.faceInfo(_current_elem, _current_side);
42  mooseAssert(fi, "We should have a face info");
43 
45  }
46  else
47  return _u[_qp];
48 }
VarFieldType
Definition: MooseTypes.h:634
const unsigned int & _current_side
current side of the current element
const VariableValue & _u
Holds the solution at current quadrature points.
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...
MooseVariableFV< Real > * _fv_variable
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:35
const std::vector< const FaceInfo * > & faceInfo() const
Accessor for local FaceInfo objects.
Definition: MooseMesh.h:2108
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:627
SideIntegralVariableUserObject(const InputParameters &parameters)
const bool _fv
Whether FV variables are used.
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...
This postprocessor computes a side integral of the specified variable over a given boundary...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseMesh & _mesh
static InputParameters validParams()
ADReal getBoundaryFaceValue(const FaceInfo &fi, const StateArg &state, bool correct_skewness=false) const
Retrieve the solution value at a boundary face.
Interface for objects that need to get values of MooseVariables.
MooseVariableField< Real > & mooseVariableField()
Return the MooseVariableField object that this interface acts on.
const Elem *const & _current_elem
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...