Line data Source code
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 : 10 : #include "InterfaceValueUserObjectAux.h" 11 : 12 : registerMooseObject("MooseApp", InterfaceValueUserObjectAux); 13 : 14 : InputParameters 15 14553 : InterfaceValueUserObjectAux::validParams() 16 : { 17 14553 : InputParameters params = AuxKernel::validParams(); 18 14553 : params.addRequiredParam<UserObjectName>("interface_uo_name", 19 : "The name of the interface user object to use"); 20 43659 : params.addParam<bool>("return_side_average", 21 29106 : false, 22 : "If true returns the elment side average rather than a single qp value"); 23 14553 : params.addClassDescription("Get stored value from the specified InterfaceQpUserObjectBase."); 24 : 25 14553 : return params; 26 0 : } 27 : 28 144 : InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(const InputParameters & parameters) 29 : : AuxKernel(parameters), 30 144 : _interface_uo(getUserObject<InterfaceQpUserObjectBase>("interface_uo_name")), 31 288 : _return_side_average(getParam<bool>("return_side_average")) 32 : { 33 144 : if (isNodal()) 34 0 : paramError("variable", "This AuxKernel only supports Elemental fields"); 35 144 : } 36 : 37 : Real 38 4176 : InterfaceValueUserObjectAux::computeValue() 39 : { 40 4176 : if (_return_side_average) 41 0 : return _interface_uo.getSideAverageValue(_current_elem->id(), _current_side); 42 : else 43 4176 : return _interface_uo.getQpValue(_current_elem->id(), _current_side, _qp); 44 : }