https://mooseframework.inl.gov
Loading...
Searching...
No Matches
InterfaceValueUserObjectAux.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
13
16{
18 params.addRequiredParam<UserObjectName>("interface_uo_name",
19 "The name of the interface user object to use");
20 params.addParam<bool>("return_side_average",
21 false,
22 "If true returns the elment side average rather than a single qp value");
23 params.addClassDescription("Get stored value from the specified InterfaceQpUserObjectBase.");
24
25 return params;
26}
27
29 : AuxKernel(parameters),
30 _interface_uo(getUserObject<InterfaceQpUserObjectBase>("interface_uo_name")),
31 _return_side_average(getParam<bool>("return_side_average"))
32{
33 if (isNodal())
34 paramError("variable", "This AuxKernel only supports Elemental fields");
35}
36
37Real
registerMooseObject("MooseApp", InterfaceValueUserObjectAux)
bool isNodal() const
Nodal or elemental kernel?
Definition AuxKernel.h:43
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
Definition AuxKernel.h:133
const unsigned int & _current_side
current side of the current element
Definition AuxKernel.h:135
unsigned int _qp
Quadrature point index.
Definition AuxKernel.h:155
static InputParameters validParams()
Definition AuxKernel.C:27
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
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.
This is a base class for userobjects collecting values of variables or material properites across an ...
Real getSideAverageValue(const dof_id_type elem, const unsigned int side) const
function returning the element side average value
Real getQpValue(const dof_id_type elem, const unsigned int side, unsigned int qp) const
method returning the quadrature point value
AuxKernel creating an AuxVariable from values stored in an InterfaceQpUserObjectBase.
virtual Real computeValue() override
Compute and return the value of the aux variable.
const bool _return_side_average
switch asking the user object the return an elment side average value
const InterfaceQpUserObjectBase & _interface_uo
the coupled interface user object
InterfaceValueUserObjectAux(const InputParameters &parameters)
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457