19 "normals",
"Flow channel outward normals or junction inward normals");
20 params.
addParam<std::vector<processor_id_type>>(
21 "processor_ids", {},
"Processor IDs owning each connected flow channel element");
32 _n_bnd_ids(_bnd_ids_vector.size()),
33 _normal(getParam<
std::vector<
Real>>(
"normals")),
35 _n_connections(_normal.size()),
38 if (
comm().size() > 1)
41 mooseError(
"The number of entries in the 'processor_ids' parameter must equal the number of " 66 const std::vector<BoundaryID> elem_side_bnd_ids =
71 bool found_matching_boundary_id =
false;
72 unsigned int boundary_id_index = 0;
73 for (
unsigned int i = 0; i < elem_side_bnd_ids.size(); i++)
77 if (found_matching_boundary_id)
78 mooseError(
name(),
": Multiple matches for boundary ID were found");
81 found_matching_boundary_id =
true;
82 boundary_id_index =
j;
86 if (!found_matching_boundary_id)
89 ss <<
name() <<
": No matching boundary ID was found for (elem,side) = (" 99 if (it_other->second == boundary_id_index)
100 mooseError(
name(),
": Multiple (elem,side) pairs had the same boundary ID index");
106 return boundary_id_index;
120 ": The connection index '",
122 "' is invalid; the range of valid indices is (0, ",
static InputParameters validParams()
const unsigned int & _current_side
unsigned int getBoundaryIDIndex()
Gets the index of the currently executing boundary within the vector of boundary IDs given to this Si...
const Parallel::Communicator & comm() const
virtual void finalize() override
std::map< std::pair< const Elem *, const unsigned short int >, unsigned int > _elem_side_to_bnd_id_index
const unsigned int _n_connections
Number of connected flow channels.
virtual const std::string & name() const
uint8_t processor_id_type
std::vector< BoundaryID > getBoundaryIDs(const libMesh::MeshBase &mesh, const std::vector< BoundaryName > &boundary_name, bool generate_unknown, const std::set< BoundaryID > &mesh_boundary_ids)
std::vector< unsigned int > _processor_ids
Owners of each side of the junction.
const std::vector< BoundaryID > _bnd_ids_vector
Vector of boundary IDs for this side user object; note that BoundaryRestrictable stores these same bo...
ADFlowJunctionUserObject(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _n_bnd_ids
void mooseError(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const Elem *const & _current_elem
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
void checkValidConnectionIndex(const unsigned int &connection_index) const
Checks that a connection index is valid.
static InputParameters validParams()