https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
20public:
22
24
25 std::unique_ptr<MeshBase> generate() override;
26
27protected:
29 Point startPoint(MeshBase & start_mesh) const;
31 Point endPoint(MeshBase & end_mesh) const;
33 RealVectorValue startDirection(MeshBase & start_mesh) const;
35 RealVectorValue endDirection(MeshBase & end_mesh) const;
36
40 const unsigned int _degree;
42 const Real _sharpness;
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;
57};
Mesh generator to create a 1D B-spline curve mesh in 3D space.
Point startPoint(MeshBase &start_mesh) const
Return the starting point of the spline.
const unsigned int _degree
degree of interpolating spline
Point endPoint(MeshBase &end_mesh) const
Return the ending point of the spline.
static InputParameters validParams()
const unsigned int _num_elements
number of edge elements on the curve
const unsigned int _num_cps
number of control points to be generated
std::vector< BoundaryName > _node_set_boundaries
vector of the names of the boundaries at the ends of the spline curve
const unsigned int _order
order of the EDGE elements to be generated
const Real _sharpness
sharpness of curve (measure of how close it is to the curve with three orthogonal segments)
RealVectorValue startDirection(MeshBase &start_mesh) const
Return the starting direction of the spline.
RealVectorValue endDirection(MeshBase &end_mesh) const
Return the ending direction of the spline.
std::unique_ptr< MeshBase > & _end_mesh_input
If 'end_mesh' parameter is set, reference to input mesh providing the ending boundary.
std::unique_ptr< MeshBase > & _start_mesh_input
If 'start_mesh' parameter is set, reference to input mesh providing the starting boundary.
const SubdomainID _new_subdomain_id
Subdomain ID for the elements created.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
MeshGenerators are objects that can modify or add to an existing mesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131