44 const std::string & component_name,
81 virtual const std::vector<dof_id_type> &
getNodeIDs()
const;
92 virtual void init()
override;
93 virtual void check()
const override;
118 template <
typename T>
128 template <
typename T>
130 const std::string & description)
const;
160 template <
typename T>
164 const auto &
value = getParam<std::vector<T>>(param);
166 logError(
"The number of entries in '",
170 ") must equal the number of connections (",
175 template <
typename T>
178 const std::string & description)
const 180 for (
const auto & obj : objects)
181 if (obj != objects[0])
182 logError(
"All connections must have the same ", description);
virtual void init() override
Initializes the component.
const std::string _component_name
Name of the component in the connection.
static InputParameters validParams()
virtual const std::vector< dof_id_type > & getNodeIDs() const
Gets the list of boundary nodes connected to this component.
Component1DConnection::EEndType stringToEnum(const std::string &s)
std::vector< unsigned short int > _sides
Boundary sides of connected components.
Base class for 1D component junctions and boundaries.
std::vector< SubdomainName > _connected_subdomain_names
Vector of subdomain names of the connected components.
const std::vector< BoundaryName > & getBoundaryNames() const
Gets the boundary names for this component.
Structure for holding data for a connection.
std::vector< Connection > _connections
Vector of connections of this component.
const std::vector< SubdomainName > & getConnectedSubdomainNames() const
Gets the vector of connected subdomain names.
std::vector< BoundaryName > _boundary_names
Boundary names of connected components.
void addConnection(const BoundaryName &boundary_name)
Adds a connection for this component.
std::vector< dof_id_type > _nodes
Boundary node IDs from connected components.
void logError(Args &&... args) const
Logs an error.
void checkAllConnectionsHaveSame(const std::vector< T > &objects, const std::string &description) const
Checks that all connections have the same of a certain type of object.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::vector< std::string > _connected_component_names
Vector of connected component names.
std::vector< unsigned int > _boundary_ids
Boundary IDs of connected components.
std::vector< Point > _positions
Physical positions of connected components.
void checkNumberOfConnections(const unsigned int &n_connections) const
Checks that the number of connections is equal to the supplied value.
Connection(const BoundaryName &boundary_name, const std::string &component_name, const EEndType &end_type)
const std::vector< std::string > & getConnectedComponentNames() const
Returns a list of names of components that are connected to this component.
void checkSizeEqualsNumberOfConnections(const std::string ¶m) const
Checks that the size of a vector parameter equals the number of connections.
Base class for THM components.
Component1DConnection(const InputParameters ¶ms)
std::vector< const Elem * > _elems
Boundary elements of connected components.
const EEndType _end_type
End type for the connection.
virtual void check() const override
Check the component integrity.
const std::vector< Connection > & getConnections() const
Returns the vector of connections of this component.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
std::vector< Real > _normals
Outward normals associated with connected components.
std::vector< RealVectorValue > _directions
Directions of connected components.
static const std::map< std::string, EEndType > _end_type_to_enum
Map of end type string to enum.
const BoundaryName _boundary_name
The name of the boundary this connection is attached to.