https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SideIntegralVariableUserObject.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
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),
23 MooseVariableInterface<Real>(this,
24 false,
25 "variable",
26 Moose::VarKindType::VAR_ANY,
27 Moose::VarFieldType::VAR_FIELD_STANDARD),
28 _u(coupledValue("variable")),
29 _grad_u(coupledGradient("variable")),
30 _fv(_fv_variable)
31{
33}
34
35Real
37{
38 if (_fv)
39 {
40 // We should be at the edge of the domain for this variable
42 mooseAssert(fi, "We should have a face info");
43
45 }
46 else
47 return _u[_qp];
48}
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
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.
const std::vector< const FaceInfo * > & faceInfo() const
Accessor for local FaceInfo objects.
Definition MooseMesh.h:2349
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
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.
MooseVariableFV< Real > * _fv_variable
This postprocessor computes a side integral of the specified variable over a given boundary.
static InputParameters validParams()
SideIntegralVariableUserObject(const InputParameters &parameters)
const VariableValue & _u
Holds the solution at current quadrature points.
const bool _fv
Whether FV variables are used.
const unsigned int & _current_side
current side of the current element
MooseMesh & _mesh
const Elem *const & _current_elem
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)
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...