29 "Number of azimuthal sectors of the circular mesh to be generated.");
31 "customized_azimuthal_angles",
32 "customized_azimuthal_angles>=0&customized_azimuthal_angles<360",
33 "List of the user-specified azimuthal angles of the nodes.");
35 params.
addParamNamesToGroup(
"num_sectors customized_azimuthal_angles",
"Azimuthal Mesh Density");
37 params.
addClassDescription(
"This AdvancedConcentricCircleGenerator object is designed to mesh a " 38 "concentric circular geometry.");
46 _azimuthal_angles(isParamValid(
"customized_azimuthal_angles")
47 ? getParam<
std::vector<
Real>>(
"customized_azimuthal_angles")
49 _num_sectors(isParamValid(
"num_sectors") ? getParam<unsigned
int>(
"num_sectors")
50 : _azimuthal_angles.size())
62 if (tri_order != quad_order)
65 else if (tri_order != quad_order)
67 "the element types of triangular and quadrilateral elements must be compatible if " 68 "both types of elements are generated.");
73 "this parameter must be specified if 'customized_azimuthal_angles' is not provided.");
86 "this parameter must be equal to the size of 'customized_azimuthal_angles' if " 87 "both parameters are provided.");
93 if (azi_angle_interval <= 0.0)
95 "the azimuthal angles provided must be strictly increasing.");
96 else if (azi_angle_interval >= 120.0)
98 "please make sure the circle azimuthal discretization angles are less than " 99 "120.0 to avert awkward polygonization.");
107 "If provided, the length of this parameter must be identical to the total number of " 111 paramError(
"outward_interface_boundary_names",
112 "If provided, the length of this parameter must be identical to the total number of " 115 const unsigned int num_innermost_ring_layers =
122 "This parameter must have the appropriate size if it is provided. The size should " 123 "be the same as the size of 'ring_intervals' if the innermost ring interval " 124 "(including boundary layers) is unity; otherwise the size should be greater than " 125 "the size of 'ring_intervals' by one. If 'quad_center_elements' is true, it is " 126 "optional to only provide this parameter with the same size as 'ring_intervals'");
131 "This parameter must have the appropriate size if it is set. The size should be the " 132 "same as the size of 'ring_intervals' if the innermost ring interval (including " 133 "boundary layers) is unity; otherwise the size should be greater than the size of " 134 "'ring_intervals' by one. If 'quad_center_elements' is true, it is optional to only " 135 "provide this parameter with the same size as 'ring_intervals'");
136 for (
unsigned int i = 0; i <
_ring_radii.size(); i++)
147 paramError(
"ring_inner_boundary_layer_intervals",
148 "Ring inner boundary layer must have zero interval if its thickness is zero.");
153 "ring_inner_boundary_layer_intervals",
154 "Ring inner boundary layer must have non-zero interval if its thickness is not zero.");
159 paramError(
"ring_outer_boundary_layer_intervals",
160 "Ring outer boundary layer must have zero interval if its thickness is zero.");
165 "ring_outer_boundary_layer_intervals",
166 "Ring outer boundary layer must have non-zero interval if its thickness is not zero.");
170 paramError(
"ring_inner_boundary_layer_widths",
171 "Summation of ring_inner_boundary_layer_widths and " 172 "ring_outer_boundary_layer_widths cannot exceeds the ring layer width.");
175 for (
unsigned int i = 0; i <
_ring_radii.size(); i++)
185 std::unique_ptr<MeshBase>
188 std::vector<Real> ring_radii_corr;
189 std::vector<Real> mod_azimuthal_angles;
202 const Real corr_factor =
208 ring_radii_corr.push_back(ring_radius * corr_factor);
211 std::vector<Real>(), std::vector<Real>(), std::vector<unsigned int>(), std::vector<Real>()};
217 const unsigned int num_sectors_per_side = 1;
218 const unsigned int background_intervals = 0;
219 const Real background_radial_bias = 1.0;
229 std::vector<unsigned int>(),
234 num_sectors_per_side,
235 background_intervals,
236 background_radial_bias,
239 node_id_background_meta,
263 std::vector<unsigned int>(),
268 num_sectors_per_side,
269 background_intervals,
270 background_radial_bias,
273 node_id_background_meta,
288 ReplicatedMesh other_mesh(*mesh_tmp);
290 mesh->prepare_for_use();
291 other_mesh.prepare_for_use();
306 mesh->prepare_for_use();
309 unsigned int block_it = 0;
310 unsigned int ring_block_num = 0;
311 std::vector<subdomain_id_type> block_ids_old;
312 std::vector<subdomain_id_type> block_ids_new;
313 std::vector<SubdomainName> block_names;
318 *
mesh, block_ids_old, block_ids_new, block_names,
"AdvancedConcentricCircleGenerator");
335 mesh->set_isnt_prepared();
std::vector< Real > fractions
const std::vector< unsigned int > _ring_intervals
Number of rings in each circle or in the enclosing square.
const boundary_id_type _interface_boundary_id_shift
Shift in default boundary IDs of interfaces to avert potential conflicts.
const std::vector< std::string > _outward_interface_boundary_names
Boundary Names of the mesh's outward interface boundaries.
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
std::vector< unsigned int > intervals
const subdomain_id_type _block_id_shift
Shift in default subdomain IDs to avert potential conflicts with other meshes.
QUAD_ELEM_TYPE _quad_elem_type
Type of quadrilateral elements to be generated.
const bool _preserve_volumes
Volume preserving function is optional.
const boundary_id_type _external_boundary_id
Boundary ID of the mesh's external boundary.
Contains multiple blocks's boundary layer related parameters.
std::unique_ptr< ReplicatedMesh > buildSlice(std::vector< Real > ring_radii, const std::vector< unsigned int > ring_layers, const std::vector< Real > ring_radial_biases, const multiBdryLayerParams &ring_inner_boundary_layer_params, const multiBdryLayerParams &ring_outer_boundary_layer_params, std::vector< Real > ducts_center_dist, const std::vector< unsigned int > ducts_layers, const std::vector< Real > duct_radial_biases, const multiBdryLayerParams &duct_inner_boundary_layer_params, const multiBdryLayerParams &duct_outer_boundary_layer_params, const Real pitch, const unsigned int num_sectors_per_side, const unsigned int background_intervals, const Real background_radial_bias, const singleBdryLayerParams &background_inner_boundary_layer_params, const singleBdryLayerParams &background_outer_boundary_layer_params, dof_id_type &node_id_background_meta, const Real virtual_side_number, const unsigned int side_index, const std::vector< Real > azimuthal_tangent=std::vector< Real >(), const subdomain_id_type block_id_shift=0, const bool quad_center_elements=false, const Real center_quad_factor=0.0, const bool create_inward_interface_boundaries=false, const bool create_outward_interface_boundaries=true, const boundary_id_type boundary_id_shift=0, const Real pitch_scale_factor=1.0, const bool generate_side_specific_boundaries=true, const TRI_ELEM_TYPE tri_elem_type=TRI_ELEM_TYPE::TRI3, const QUAD_ELEM_TYPE quad_elem_type=QUAD_ELEM_TYPE::QUAD4)
Generates a mesh of a polygon slice, which is the foundation of both buildGeneralSlice and buildSimpl...
multiBdryLayerParams _ring_inner_boundary_layer_params
Widths, fractions, radial sectors and growth factors of the inner boundary layers of the ring regions...
const std::vector< Real > _ring_radii
Radii of concentric circles.
static InputParameters validParams()
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
AdvancedConcentricCircleGenerator(const InputParameters ¶meters)
std::unique_ptr< MeshBase > generate() override
static InputParameters validParams()
void assignBlockIdsNames(ReplicatedMesh &mesh, std::vector< subdomain_id_type > &block_ids_old, std::vector< subdomain_id_type > &block_ids_new, std::vector< SubdomainName > &block_names, const std::string &generator_name) const
Assign block IDs and names to the mesh if applicable.
void ringBlockIdsNamesPreparer(unsigned int &block_counter, unsigned int &ring_block_num, std::vector< subdomain_id_type > &block_ids_old, std::vector< subdomain_id_type > &block_ids_new, std::vector< SubdomainName > &block_names) const
Prepare user-defined ring block IDs and names to replace the default ones.
Contains a single block's boundary layer related parameters.
void changeBoundaryId(const boundary_id_type old_id, const boundary_id_type new_id, bool delete_prev)
registerMooseObject("ReactorApp", AdvancedConcentricCircleGenerator)
const bool _create_outward_interface_boundaries
Whether outward interface boundaries are created.
const std::vector< std::string > _inward_interface_boundary_names
Boundary Names of the mesh's inward interface boundaries.
multiBdryLayerParams _ring_outer_boundary_layer_params
Widths, fractions, radial sectors and growth factors of the outer boundary layers of the ring regions...
const bool _create_inward_interface_boundaries
Whether inward interface boundaries are created.
const std::vector< Real > _ring_radial_biases
Bias values used to induce biasing to radial meshing in ring regions.
const unsigned int _num_sectors
Number of azimuthal sectors of the circular mesh to be generated.
void paramError(const std::string ¶m, Args... args) const
std::vector< Real > _virtual_nums_sectors
A virtual sector number list which are 360.0 times inverse of the azimuthal intervals.
std::vector< Real > widths
std::vector< SubdomainName > _ring_block_names
Subdomain Names of the ring regions.
std::vector< Real > _azimuthal_angles
List of the azimuthal angles of the nodes.
const BoundaryName _external_boundary_name
Boundary Name of the mesh's external boundary.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< subdomain_id_type > _ring_block_ids
Subdomain IDs of the ring regions.
This AdvancedConcentricCircleGenerator object is designed to mesh a concentric circular geometry...
This ConcentricCircleGeneratorBase object is a base class to be inherited for mesh generators that in...
TRI_ELEM_TYPE _tri_elem_type
Type of triangular elements to be generated.
const bool _generate_side_specific_boundaries
Whether the side-specific external boundaries are generated or not.
unsigned short _order
Order of the elements to be generated.
Real radiusCorrectionFactor(const std::vector< Real > &azimuthal_list, const bool full_circle=true, const unsigned int order=1, const bool is_first_value_vertex=true)
Makes radial correction to preserve ring area.
void ErrorVector unsigned int
bool absoluteFuzzyGreaterThan(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
void assignInterfaceBoundaryNames(ReplicatedMesh &mesh) const
Assign interface boundary names to the mesh if applicable.