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");
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);
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];
Defines a discretized line segment in 3D space.
static InputParameters validParams()
void generateNodeLocations()
Generates axial node locations and stores in _node_locations.
unsigned int computeNumberOfNodes(unsigned int n_elems)
Computes the number of axial nodes from the number of elements.
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 > _lengths
Length of each axial section.
static InputParameters validParams()
const std::list< Action *> & getActionListByName(const std::string &task) const
virtual const Node & nodeRef(const dof_id_type i) const
void logError(Args &&... args) const
Logs an error.
virtual void check() const override
Check the component integrity.
virtual void check() const
Check the component integrity.
virtual void setupMesh() override
Performs mesh setup such as creating mesh or naming mesh sets.
std::vector< Real > getUniformNodeLocations(Real length, unsigned int n_nodes)
Computes the local positions of axial nodes for an axial section.
const dof_id_type n_nodes
std::vector< dof_id_type > _node_ids
Node IDs of this component.
ActionWarehouse & actionWarehouse()
const unsigned int _n_sections
Number of axial sections.
static InputParameters validParams()
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 void buildMesh()=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Intermediate class for components that have mesh.
std::vector< Real > _node_locations
Node locations along the main axis.
GeneratedMeshComponent(const InputParameters ¶meters)
Point computeRealPointFromReferencePoint(const Point &p) const
Computes point in 3-D space from a point in reference space.
virtual bool usingSecondOrderMesh() const =0
Check if second order mesh is being used by this geometrical component.
const std::vector< std::string > & _axial_region_names
Axial region names.