https://mooseframework.inl.gov
AzimuthalBlockSplitGenerator.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
12 #include "MooseEnum.h"
13 
19 {
20 public:
22 
24 
25  std::unique_ptr<MeshBase> generate() override;
26 
27 protected:
29  const MeshGeneratorName _input_name;
31  std::vector<subdomain_id_type> _old_block_ids;
33  const std::vector<subdomain_id_type> _new_block_ids;
35  const std::vector<SubdomainName> _new_block_names;
37  const bool _preserve_volumes;
43  std::vector<Real> & _azimuthal_angle_meta;
45  std::unique_ptr<MeshBase> & _input;
47  std::vector<unsigned int> _num_sectors_per_side_meta;
50 
65  void angleIdentifier(const Real & terminal_angle,
66  Real & original_down,
67  std::vector<Real>::iterator & original_down_it,
68  Real & original_up,
69  std::vector<Real>::iterator & original_up_it,
70  std::vector<Real> & azimuthal_angles_vtx);
71 
89  void angleModifier(const Real & side_angular_shift,
90  const Real & side_angular_range,
91  const Real & azi_tol,
92  const Real & terminal_angle,
93  const Real & original_down,
94  std::vector<Real>::iterator & original_down_it,
95  const Real & original_up,
96  std::vector<Real>::iterator & original_up_it,
97  Real & azi_to_keep,
98  Real & azi_to_mod);
99 
116  void nodeModifier(ReplicatedMesh & mesh,
117  const std::vector<std::pair<Real, dof_id_type>> & node_id_mod,
118  const std::vector<std::pair<Real, dof_id_type>> & node_id_keep,
119  std::vector<Real> & circular_rad_list,
120  std::vector<Real> & non_circular_rad_list,
121  const std::vector<std::tuple<dof_id_type, boundary_id_type>> & node_list,
122  const Real & term_angle,
123  const bool & external_block_change,
124  const Real & rad_tol);
125 
134  Point midPointCorrector(const Point vertex_0,
135  const Point vertex_1,
136  const Real max_radius,
137  const Real rad_tol);
138 };
const Real _angle_range
Angular range of the modified azimuthal blocks.
Point midPointCorrector(const Point vertex_0, const Point vertex_1, const Real max_radius, const Real rad_tol)
Calculate the corrected midpoint position of the element with vertices moved.
std::vector< unsigned int > _num_sectors_per_side_meta
MeshMetaData: number of mesh sectors of each polygon side.
std::vector< Real > & _azimuthal_angle_meta
MeshMetaData: vector of all nodes&#39; azimuthal angles.
This AzimuthalBlockSplitGenerator object takes in a polygon/hexagon concentric circle mesh and rename...
std::unique_ptr< MeshBase > generate() override
std::unique_ptr< MeshBase > & _input
Reference to input mesh pointer.
const bool _preserve_volumes
Whether volumes of ring regions need to be preserved.
const MeshGeneratorName _input_name
Input mesh to be modified.
void nodeModifier(ReplicatedMesh &mesh, const std::vector< std::pair< Real, dof_id_type >> &node_id_mod, const std::vector< std::pair< Real, dof_id_type >> &node_id_keep, std::vector< Real > &circular_rad_list, std::vector< Real > &non_circular_rad_list, const std::vector< std::tuple< dof_id_type, boundary_id_type >> &node_list, const Real &term_angle, const bool &external_block_change, const Real &rad_tol)
Modifies the nodes with the azimuthal angles modified in AzimuthalBlockSplitGenerator::angleModifier(...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< SubdomainName > _new_block_names
Names of the new azimuthal blocks.
void angleIdentifier(const Real &terminal_angle, Real &original_down, std::vector< Real >::iterator &original_down_it, Real &original_up, std::vector< Real >::iterator &original_up_it, std::vector< Real > &azimuthal_angles_vtx)
Finds the azimuthal angles of the original mesh that need to be modified to match the edge locations ...
std::vector< subdomain_id_type > _old_block_ids
IDs to identify the input mesh blocks to be modified.
A base class that contains common members for Reactor module mesh generators.
AzimuthalBlockSplitGenerator(const InputParameters &parameters)
const InputParameters & parameters() const
Real _start_angle
Starting angular position of the modified azimuthal blocks.
Real _end_angle
Ending angular position of the modified azimuthal blocks.
const std::vector< subdomain_id_type > _new_block_ids
IDs of the new azimuthal blocks.
void angleModifier(const Real &side_angular_shift, const Real &side_angular_range, const Real &azi_tol, const Real &terminal_angle, const Real &original_down, std::vector< Real >::iterator &original_down_it, const Real &original_up, std::vector< Real >::iterator &original_up_it, Real &azi_to_keep, Real &azi_to_mod)
Modifies the azimuthal angle to perform move the edge of the control drum during rotation.