19 params.
addParam<std::vector<std::string>>(
20 "axial_region_names", {},
"Names to assign to axial regions");
29 _axial_region_names(getParam<
std::vector<
std::string>>(
"axial_region_names"))
31 checkSizeGreaterThan<Real>(
"length", 0);
32 checkEqualSize<Real, unsigned int>(
"length",
"n_elems");
34 checkEqualSize<Real, std::string>(
"length",
"axial_region_names");
48 RealVectorValue
p(curr_node(0), curr_node(1), curr_node(2));
62 const MooseEnum & quadrature_type = (*actions.begin())->getParam<MooseEnum>(
"type");
64 if (quadrature_type ==
"TRAP")
65 logError(
"Cannot use TRAP quadrature rule with 2nd order elements. Use SIMPSON or GAUSS "
80 unsigned int start_node = 0;
81 Real start_length = 0.0;
94 start_length += section_length;
95 start_node += (section_n_nodes - 1);
102 std::vector<Real> node_locations(
n_nodes);
103 Real dx = length / (
n_nodes - 1);
105 node_locations[0] = 0.0;
107 for (
unsigned int i = 1; i < (
n_nodes - 1); ++i)
108 node_locations[i] = node_locations[i - 1] + dx;
110 node_locations[
n_nodes - 1] = length;
111 return node_locations;
116 unsigned int start_node,
117 std::vector<Real> & local_node_locations)
119 unsigned int n_nodes = local_node_locations.size();
120 for (
unsigned int i = 1; i <
n_nodes; ++i)
122 unsigned int global_i = i + start_node;
123 Real local_node_location = local_node_locations[i];
const std::list< Action * > & getActionListByName(const std::string &task) const
void logError(Args &&... args) const
Logs an error.
virtual void check() const
Check the component integrity.
std::vector< dof_id_type > _node_ids
Node IDs of this component.
THMMesh & mesh()
Non-const reference to THM mesh, which can only be called before the end of mesh setup.
Defines a discretized line segment in 3D space.
unsigned int _n_elem
Total number of axial elements.
const unsigned int _n_sections
Number of axial sections.
std::vector< unsigned int > _n_elems
Number of elements in each axial section.
Point computeRealPointFromReferencePoint(const Point &p) const
Computes point in 3-D space from a point in reference space.
static InputParameters validParams()
std::vector< Real > _lengths
Length of each axial section.
void placeLocalNodeLocations(Real start_length, unsigned int start_node, std::vector< Real > &local_node_locations)
Puts local positions of axial nodes for an axial section into _node_locations.
std::vector< Real > _node_locations
Node locations along the main axis.
virtual void check() const override
Check the component integrity.
static InputParameters validParams()
virtual bool usingSecondOrderMesh() const =0
Check if second order mesh is being used by this geometrical component.
unsigned int computeNumberOfNodes(unsigned int n_elems)
Computes the number of axial nodes from the number of elements.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
const std::vector< std::string > & _axial_region_names
Axial region names.
std::vector< Real > getUniformNodeLocations(Real length, unsigned int n_nodes)
Computes the local positions of axial nodes for an axial section.
virtual void buildMesh()=0
void generateNodeLocations()
Generates axial node locations and stores in _node_locations.
GeneratedMeshComponent(const InputParameters ¶meters)
Intermediate class for components that have mesh.
static InputParameters validParams()
ActionWarehouse & actionWarehouse()
virtual const Node & nodeRef(const dof_id_type i) const
const dof_id_type n_nodes