39 BoundaryInfo & boundary_info = the_mesh.get_boundary_info();
52 ": Inconsistent number of nodes and elements. You have ",
62 ": Inconsistent number of nodes and elements. You have ",
71 const Node * nd = the_mesh.node_ptr(node_id);
78 auto & binfo =
mesh().
getMesh().get_boundary_info();
79 for (
unsigned int i = 0; i <
_n_elem; i++)
81 Elem * elem =
nullptr;
92 boundary_info.add_side(elem, 0, bc_id_inlet);
93 binfo.sideset_name(bc_id_inlet) =
genName(
name(),
"in");
99 boundary_info.add_side(elem, 1, bc_id_outlet);
100 binfo.sideset_name(bc_id_outlet) =
genName(
name(),
"out");
116 mesh().
elemPtr(elem_id)->subdomain_id() = subdomain_id;
155 const std::vector<Component1D::Connection> &
160 std::map<Component1DConnection::EEndType, std::vector<Connection>>::const_iterator it =
Elem * addElementEdge2(dof_id_type node0, dof_id_type node1)
virtual void buildMeshNodes()
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.
std::map< Component1DConnection::EEndType, std::vector< Connection > > _connections
Map of end type to a list of connections.
Real _length
Total axial length.
virtual Elem * elemPtr(const dof_id_type i)
virtual bool usingSecondOrderMesh() const override
Check if second order mesh is being used by this geometrical component.
Component1D(const InputParameters ¶meters)
BoundaryID _nodeset_id
Nodeset ID for all 1D component nodes.
Structure for storing connection data.
static InputParameters validParams()
virtual void setSubdomainInfo(SubdomainID subdomain_id, const std::string &subdomain_name, const Moose::CoordinateSystemType &coord_system=Moose::COORD_XYZ)
Sets the next subdomain ID, name, and coordinate system.
Node * addNode(const Point &pt)
virtual const std::string & name() const
std::vector< dof_id_type > _elem_ids
Element IDs of this component.
const RealVectorValue _dir
Normalized direction of axis from start position to end position.
std::vector< dof_id_type > _node_ids
Node IDs of this component.
Base class for components that generate their own mesh.
boundary_id_type BoundaryID
BoundaryName _nodeset_name
Nodeset name for all 1D component nodes.
const Point & _position
Start position of axis in 3-D space.
virtual SubdomainID getNextSubdomainId()
Gets the next subdomain ID.
Elem * addElementEdge3(dof_id_type node0, dof_id_type node1, dof_id_type node2)
const BoundaryName & getNodesetName() const
Gets the 1D component nodeset name.
THMMesh & mesh()
Non-const reference to THM mesh, which can only be called before the end of mesh setup.
const std::vector< unsigned int > & _n_elems
Number of elements in each axial section.
const unsigned int _n_elem
Total number of axial elements.
virtual const std::vector< Connection > & getConnections(Component1DConnection::EEndType end_type) const
Gets the vector of connections of an end type for this component.
void checkSetupStatus(const EComponentSetupStatus &status) const
Throws an error if the supplied setup status of this component has not been reached.
virtual BoundaryID getNextBoundaryId()
Gets the next nodeset or sideset ID.
static InputParameters validParams()
void mooseError(Args &&... args) const
virtual void buildMesh() override
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
std::vector< Real > _node_locations
Node locations along the main axis.
static const std::string k
unsigned int getNodesetID() const
Gets the 1D component nodeset ID.
const std::vector< std::string > & _axial_region_names
Axial region names.