https://mooseframework.inl.gov
BSplineCurveGenerator.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 "MeshGenerator.h"
14 
19 {
20 public:
22 
24 
25  std::unique_ptr<MeshBase> generate() override;
26 
27 protected:
29  Point startPoint() const;
31  Point endPoint() const;
36 
40  const unsigned int _degree;
44  const unsigned int _num_cps;
46  const unsigned int _order;
48  const unsigned int _num_elements;
50  std::vector<BoundaryName> _node_set_boundaries;
51 
52  // Alternative geometry input: use boundary centroids (and boundary average normals)
54  std::unique_ptr<MeshBase> & _start_mesh_input;
56  std::unique_ptr<MeshBase> & _end_mesh_input;
58  std::unique_ptr<MeshBase> _start_mesh;
60  std::unique_ptr<MeshBase> _end_mesh;
61 };
std::vector< BoundaryName > _node_set_boundaries
vector of the names of the boundaries at the ends of the spline curve
RealVectorValue endDirection() const
Return the ending direction of the spline.
const unsigned int _num_elements
number of edge elements on the curve
std::unique_ptr< MeshBase > _end_mesh
If &#39;end_mesh&#39; parameter is set, mesh providing the ending boundary.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const unsigned int _order
order of the EDGE elements to be generated
const unsigned int _num_cps
number of control points to be generated
RealVectorValue startDirection() const
Return the starting direction of the spline.
std::unique_ptr< MeshBase > & _end_mesh_input
If &#39;end_mesh&#39; parameter is set, reference to input mesh providing the ending boundary.
static InputParameters validParams()
const Real _sharpness
sharpness of curve (measure of how close it is to the curve with three orthogonal segments) ...
Point endPoint() const
Return the ending point of the spline.
BSplineCurveGenerator(const InputParameters &parameters)
const unsigned int _degree
degree of interpolating spline
const SubdomainID _new_subdomain_id
Subdomain ID for the elements created.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unique_ptr< MeshBase > _start_mesh
If &#39;start_mesh&#39; parameter is set, mesh providing the starting boundary.
Point startPoint() const
Return the starting point of the spline.
Mesh generator to create a 1D B-spline curve mesh in 3D space.
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:33
std::unique_ptr< MeshBase > & _start_mesh_input
If &#39;start_mesh&#39; parameter is set, reference to input mesh providing the starting boundary.