https://mooseframework.inl.gov
GeneratedMeshComponent.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "GeometricalComponent.h"
14 
19 {
20 public:
22 
24 
25 protected:
26  virtual void setupMesh() override;
27  virtual void check() const override;
28 
29  virtual void buildMesh() = 0;
30 
36  virtual bool usingSecondOrderMesh() const = 0;
37 
39  const std::vector<std::string> & _axial_region_names;
40 
42  std::vector<Real> _node_locations;
43 
44 private:
48  void generateNodeLocations();
49 
55  unsigned int computeNumberOfNodes(unsigned int n_elems);
56 
63  std::vector<Real> getUniformNodeLocations(Real length, unsigned int n_nodes);
64 
72  void placeLocalNodeLocations(Real start_length,
73  unsigned int start_node,
74  std::vector<Real> & local_node_locations);
75 };
Defines a discretized line segment in 3D space.
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.
static InputParameters validParams()
virtual void check() const override
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.
Base class for components that generate their own mesh.
virtual void buildMesh()=0
Intermediate class for components that have mesh.
const InputParameters & parameters() const
std::vector< Real > _node_locations
Node locations along the main axis.
GeneratedMeshComponent(const InputParameters &parameters)
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.