https://mooseframework.inl.gov
FlexiblePatternGenerator.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 
18 {
19 public:
21 
23 
24  std::unique_ptr<MeshBase> generate() override;
25 
26 protected:
28  const std::vector<MeshGeneratorName> & _input_names;
32  MeshGeneratorName _boundary_mesh_name;
34  const unsigned int _boundary_sectors;
38  std::vector<std::pair<Point, unsigned int>> _positions;
39 
41  const std::vector<std::vector<std::vector<unsigned int>>> _hex_patterns;
43  const std::vector<Real> _hex_pitches;
45  const std::vector<Point> _hex_origins;
47  const std::vector<Real> _hex_rotations;
48 
50  const std::vector<std::vector<std::vector<unsigned int>>> _rect_patterns;
52  const std::vector<Real> _rect_pitches_x;
54  const std::vector<Real> _rect_pitches_y;
56  const std::vector<Point> _rect_origins;
58  const std::vector<Real> _rect_rotations;
59 
61  const std::vector<std::vector<unsigned int>> _circ_patterns;
63  const std::vector<Real> _circ_radii;
65  const std::vector<Point> _circ_origins;
67  const std::vector<Real> _circ_rotations;
68 
69  // Custom subdomain id for the background region
71  // Custom subdomain name for the background region
72  const SubdomainName _background_subdomain_name;
73  // Whether to delete the default external boundary (10000 as defined by
74  // PolygonMeshGeneratorBase::INTRINSIC_SIDESET_ID::OUTER_SIDESET_ID) from the inputs
76 
78  const ExtraElementIDName _cell_id_name;
82  const ExtraElementIDName _pattern_id_name;
85 
89  const BoundaryName _external_boundary_name;
90 
93  std::unique_ptr<MeshBase> * _build_mesh;
94 };
BdryType
Type of boundary mesh to be used for the background region.
const bool _delete_default_external_boundary_from_inputs
This FlexiblePatternGenerator object is designed to generate a complex mesh with a background region ...
const BoundaryName _external_boundary_name
Boundary Name of the external boundary.
const std::vector< MeshGeneratorName > & _input_names
Names of input meshes that are used as unit meshes in patterning.
static InputParameters validParams()
const std::vector< std::vector< std::vector< unsigned int > > > _hex_patterns
Hexagonal patterns.
const std::vector< std::vector< std::vector< unsigned int > > > _rect_patterns
Rectangular patterns.
const ExtraElementIDName _pattern_id_name
Name of the extra element id to be assigned to distinguish input unit meshes.
const subdomain_id_type _background_subdomain_id
const std::vector< Point > _circ_origins
List of origins of the circular patterns.
const Real _boundary_size
Pitch size of the hexagonal or cartesian background region; or diameter of the circular region...
const SubdomainName _background_subdomain_name
std::unique_ptr< MeshBase > generate() override
const std::vector< Real > _hex_rotations
List of rotation angles of the hexagonal patterns.
const ExtraElementIDName _cell_id_name
Name of the extra element id to be assigned to distinguish component unit cell meshes.
const boundary_id_type _external_boundary_id
Boundary ID of the external boundary.
const std::vector< Real > _rect_pitches_y
List of pitches of the rectangular patterns in y direction.
const std::vector< std::vector< unsigned int > > _circ_patterns
Circular patterns.
int8_t boundary_id_type
const std::vector< Real > _rect_rotations
List of rotation angles of the rectangular patterns.
const std::vector< Real > _hex_pitches
List of pitches of the hexagonal patterns.
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
const unsigned int _boundary_sectors
Number of sectors on each side of the hexagonal or cartesian background region or on the circular bou...
FlexiblePatternGenerator(const InputParameters &parameters)
const std::vector< Real > _circ_radii
List of radii of the circular patterns.
const std::vector< Real > _circ_rotations
List of rotation angles of the circular patterns.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::pair< Point, unsigned int > > _positions
Positions of all the unit meshes after patterning.
A base class that contains common members for Reactor module mesh generators.
const dof_id_type _cell_id_shift
Shift value to be added to the extra element id to distinguish component unit cell meshes...
const InputParameters & parameters() const
const std::vector< Point > _hex_origins
List of origins of the hexagonal patterns.
MeshGeneratorName _boundary_mesh_name
Name of the input mesh that defines the external boundary of the background region.
const std::vector< Real > _rect_pitches_x
List of pitches of the rectangular patterns in x direction.
const dof_id_type _pattern_id_shift
Shift value to be added to the extra element id to distinguish input unit meshes. ...
const std::vector< Point > _rect_origins
List of origins of the rectangular patterns.
enum FlexiblePatternGenerator::BdryType _boundary_type
uint8_t dof_id_type