23 params.
addParam<std::vector<BoundaryName>>(
24 "interface_boundaries",
"The interface boundaries on which this object will execute");
40 _mesh(_subproblem.
mesh()),
41 _current_elem(_assembly.elem()),
42 _current_elem_volume(_assembly.elemVolume()),
43 _current_side(_assembly.side()),
44 _current_side_elem(_assembly.sideElem()),
45 _current_side_volume(_assembly.sideElemVolume()),
46 _neighbor_elem(_assembly.neighbor()),
47 _current_neighbor_volume(_assembly.neighborVolume()),
48 _current_boundary_id(_assembly.currentBoundaryID()),
49 _normals(_assembly.normals()),
50 _q_point(_assembly.qPoints()),
51 _qrule(_assembly.qRule()),
52 _JxW(_assembly.JxW()),
53 _q_point_face(_assembly.qPointsFace()),
54 _qrule_face(_assembly.qRuleFace()),
55 _JxW_face(_assembly.JxWFace()),
56 _coord(_assembly.coordTransformation())
60 const auto & interface_boundaries = getParam<std::vector<BoundaryName>>(
"interface_boundaries");
68 bool has_full_primary_connection =
true;
69 for (
const auto interface_connected_block : primary_connected_blocks)
70 if (!
hasBlocks(interface_connected_block))
71 has_full_primary_connection =
false;
73 const auto & secondary_connected_blocks =
75 bool has_full_secondary_connection =
true;
76 for (
const auto interface_connected_block : secondary_connected_blocks)
77 if (!
hasBlocks(interface_connected_block))
78 has_full_secondary_connection =
false;
81 if (has_full_primary_connection)
83 else if (has_full_secondary_connection)
87 "Not all sides in the interface with ID ",
89 " is connected with the domain of the domain user object ",
97 const unsigned int comp,
98 const std::set<BoundaryID> * interfaces)
100 const auto *
const field_var =
getFieldVar(var_name, comp);
101 mooseAssert(field_var,
"We should not be able to return a null variable");
117 auto & bnd_ids = it->second;
118 for (
const auto bnd_id : bnd_ids)
121 for (
const auto & bid : connected_blocks)
125 "' is not defined on the interface connected block '",
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
virtual void checkVariable(const MooseVariableFieldBase &variable) const
Helper for checking that the ids for this object are in agreement with the variables on the supplied ...
static InputParameters validParams()
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
std::set< BoundaryID > _interface_bnd_ids
The set of boundary IDs on which this object should perform executeOnInterface.
std::map< VariableName, std::set< BoundaryID > > _var_interfaces
A map storing the set of boundaries where variables we wish to evaluate.
std::map< BoundaryID, std::set< SubdomainID > > _interface_connected_blocks
The set of blocks connected to our blocks through boundaries of the _interface_bnd_ids data member.
void checkVariable(const MooseVariableFieldBase &variable) const override
Helper for checking that the ids for this object are in agreement with the variables on the supplied ...
DomainUserObject(const InputParameters ¶meters)
MooseMesh & _mesh
the Moose mesh
static InputParameters validParams()
const MooseVariableFieldBase * getInterfaceFieldVar(const std::string &var_name, unsigned int comp, const std::set< BoundaryID > *interfaces=nullptr)
Routes through to Coupleable::getFieldVar, but also inserts the return variable into a set of field v...
const std::string & name() const
Get the name of the class.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
std::set< SubdomainID > getBoundaryConnectedSecondaryBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary of its secondary side.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
This class provides an interface for common operations on field variables of both FE and FV types wit...
Interface for objects that need parallel consistent random numbers without patterns over the course o...
static InputParameters validParams()
This interface is designed currently for DomainUserObject where material properties on element,...
static InputParameters validParams()
Interface for objects that needs transient capabilities.
static InputParameters validParams()
Base class for user-specific data.
static InputParameters validParams()
std::set< BoundaryID > getBoundaryIDSet(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown)
Gets the boundary IDs into a set with their names.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...