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 #include "MeshGenerator.h"
12 #include "MooseEnum.h"
13 #include "MooseMeshUtils.h"
14 
20 {
21 public:
23 
25 
26  std::unique_ptr<MeshBase> generate() override;
27 
28 protected:
30  const MeshGeneratorName _input_name;
32  const std::vector<BoundaryName> _input_mesh_circular_boundaries;
34  const std::vector<Real> _transition_layer_ratios;
36  const std::vector<Real> _custom_circular_tolerance;
38  std::vector<boundary_id_type> _input_mesh_circular_bids;
42  std::unique_ptr<MeshBase> & _input;
43 
52  Point circularCenterCalculator(const std::vector<Point> & pts_list,
53  Real & radius,
54  const Real tol = 1e-12) const;
55 
69  Real generateRadialCorrectionFactor(const std::vector<std::pair<Point, Point>> & bd_side_list,
70  const Point & circle_center,
71  const bool is_closed_loop,
72  const bool move_end_nodes_in_span_direction,
73  Real & c_coeff,
74  Real & end_node_disp) const;
75 
82  Real sineSummation(const std::vector<Real> & th_list, const Real coeff) const;
83 
91  Real sinePrimeSummation(const std::vector<Real> & th_list, const Real coeff) const;
92 };
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.
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 InputParameters & parameters() const
Get the parameters of the object.
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:32
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...