https://mooseframework.inl.gov
CircularBoundaryCorrectionGenerator.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"
13 #include "MooseEnum.h"
14 #include "MooseMeshUtils.h"
15 
21 {
22 public:
24 
26 
27  std::unique_ptr<MeshBase> generate() override;
28 
29 protected:
31  const MeshGeneratorName _input_name;
33  const std::vector<BoundaryName> _input_mesh_circular_boundaries;
35  const std::vector<Real> _transition_layer_ratios;
37  const std::vector<Real> _custom_circular_tolerance;
39  std::vector<boundary_id_type> _input_mesh_circular_bids;
43  std::unique_ptr<MeshBase> & _input;
44 
53  Point circularCenterCalculator(const std::vector<Point> & pts_list,
54  Real & radius,
55  const Real tol = 1e-12) const;
56 
70  Real generateRadialCorrectionFactor(const std::vector<std::pair<Point, Point>> & bd_side_list,
71  const Point & circle_center,
72  const bool is_closed_loop,
73  const bool move_end_nodes_in_span_direction,
74  Real & c_coeff,
75  Real & end_node_disp) const;
76 
83  Real sineSummation(const std::vector<Real> & th_list, const Real coeff) const;
84 
92  Real sinePrimeSummation(const std::vector<Real> & th_list, const Real coeff) const;
93 };
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
const std::vector< Real > _custom_circular_tolerance
Customized tolerance used to verify that boundaries are circular.
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...
This CircularBoundaryCorrectionGenerator object is designed to correct full or partial circular bound...
const MeshGeneratorName _input_name
Name of the mesh generator to get the input mesh.
Point circularCenterCalculator(const std::vector< Point > &pts_list, Real &radius, const Real tol=1e-12) const
Calculates the center of the circle/partial circle formed by a vector of points.
Real sineSummation(const std::vector< Real > &th_list, const Real coeff) const
Calculates the summation of the sine values of a list of angles.
const std::vector< BoundaryName > _input_mesh_circular_boundaries
Names of the circular boundaries of the 2D input mesh to correct.
Real generateRadialCorrectionFactor(const std::vector< std::pair< Point, Point >> &bd_side_list, const Point &circle_center, const bool is_closed_loop, const bool move_end_nodes_in_span_direction, Real &c_coeff, Real &end_node_disp) const
Calculates the radius correction factor based on a list of sides on a circular boundary.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< Real > _transition_layer_ratios
Ratio parameters used to customize the transition area sizes.
std::unique_ptr< MeshBase > & _input
Reference to input mesh pointer.
std::vector< boundary_id_type > _input_mesh_circular_bids
IDs of the circular boundary of the input mesh.
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:33
const bool _move_end_nodes_in_span_direction
Whether to move the end nodes of the partial circular boundary in the span direction.
CircularBoundaryCorrectionGenerator(const InputParameters &parameters)
Real sinePrimeSummation(const std::vector< Real > &th_list, const Real coeff) const
Calculates the first derivative with regards to coeff of the summation of the sine values of a list o...