16 params.
addClassDescription(
"Base class to compute a scalar value or rate across an interface");
19 "Type of value to compute and store");
34 std::vector<std::tuple<dof_id_type, unsigned short int, boundary_id_type>> elem_side_bid =
41 for (
unsigned int i = 0; i < elem_side_bid.size(); i++)
45 if (boundaryList.find(std::get<2>(elem_side_bid[i])) != boundaryList.end())
48 std::pair<dof_id_type, unsigned int> elem_side_pair =
49 std::make_pair(std::get<0>(elem_side_bid[i]), std::get<1>(elem_side_bid[i]));
51 std::vector<Real> var_values(0, 0);
55 _map_JxW[elem_side_pair] = var_values;
69 vec.resize(
_qrule->n_points());
71 jxw.resize(
_qrule->n_points());
74 for (
unsigned int qp = 0; qp <
_qrule->n_points(); ++qp)
82 mooseError(
"InterfaceQpUserObjectBase:: cannot find the required element and side");
87 const unsigned int side,
88 const unsigned int qp)
const 90 auto data =
_map_values.find(std::make_pair(elem, side));
92 return data->second[qp];
94 mooseError(
"getQpValue: can't find the given qp");
99 const unsigned int side)
const 101 auto data =
_map_values.find(std::make_pair(elem, side));
103 mooseError(
"getSideAverageValue: can't find the given qp");
104 auto weights =
_map_JxW.find(std::make_pair(elem, side));
106 mooseError(
"getSideAverageValue: can't find the given qp");
110 for (
unsigned int i = 0; i < data->second.size(); i++)
112 val += data->second[i] * weights->second[i];
113 vol += weights->second[i];
A special InterfaceUserObject computing average values across an interface given the average type (se...
const QBase *const & _qrule
A MultiMooseEnum object to hold "execute_on" flags.
std::map< std::pair< dof_id_type, unsigned int >, std::vector< Real > > _map_JxW
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
const unsigned int & _current_side
current side of the current element
static InputParameters validParams()
const MooseArray< Real > & _JxW
const ExecFlagType EXEC_TIMESTEP_END
static MooseEnum valueOptions()
the method defining the returning value type: value, rate or increment
virtual Real computeRealValue(const unsigned int)=0
method to overrid in child classes returnig a real value
void buildSideList(std::vector< dof_id_type > &el, std::vector< unsigned short int > &sl, std::vector< boundary_id_type > &il)
Calls BoundaryInfo::build_side_list().
std::map< std::pair< dof_id_type, unsigned int >, std::vector< Real > > _map_values
these maps are used to store QP data.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
InterfaceQpUserObjectBase(const InputParameters ¶meters)
virtual void execute() override
Execute method.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Real getSideAverageValue(const dof_id_type elem, const unsigned int side) const
function returning the element side average value
const Elem *const & _current_elem
current element
Real getQpValue(const dof_id_type elem, const unsigned int side, unsigned int qp) const
method returning the quadrature point value
virtual const std::set< BoundaryID > & boundaryIDs() const
Return the boundary IDs for this object.
const ExecFlagType EXEC_INITIAL