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 '",
Interface for objects that need parallel consistent random numbers without patterns over the course o...
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.
DomainUserObject(const InputParameters ¶meters)
MooseMesh & _mesh
the Moose mesh
static InputParameters validParams()
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...
std::map< VariableName, std::set< BoundaryID > > _var_interfaces
A map storing the set of boundaries where variables we wish to evaluate.
const std::string & name() const override
Get the variable name.
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 ...
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...
This class provides an interface for common operations on field variables of both FE and FV types wit...
static InputParameters validParams()
std::set< BoundaryID > _interface_bnd_ids
The set of boundary IDs on which this object should perform executeOnInterface.
virtual const std::string & name() const
Get the name of the class.
const std::string & getSubdomainName(SubdomainID subdomain_id) const
Return the name of a block given an id.
static InputParameters validParams()
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Interface for objects that needs transient capabilities.
static InputParameters validParams()
static InputParameters validParams()
std::set< SubdomainID > getBoundaryConnectedBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary.
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 ...
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 ...
This interface is designed currently for DomainUserObject where material properties on element...
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
std::set< SubdomainID > getBoundaryConnectedSecondaryBlocks(const BoundaryID bid) const
Get the list of subdomains associated with the given boundary of its secondary side.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
Base class for user-specific data.
const MooseVariableFieldBase * getFieldVar(const std::string &var_name, unsigned int comp) const
static InputParameters validParams()