https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
11
13
19{
20public:
22
24
25 std::unique_ptr<MeshBase> generate() override;
26
27protected:
29 const std::vector<MeshGeneratorName> & _input_names;
33 MeshGeneratorName _boundary_mesh_name;
35 const unsigned int _boundary_sectors;
37 const Real _boundary_size;
39 std::vector<std::pair<Point, unsigned int>> _positions;
40
42 const std::vector<std::vector<std::vector<unsigned int>>> _hex_patterns;
44 const std::vector<Real> _hex_pitches;
46 const std::vector<Point> _hex_origins;
48 const std::vector<Real> _hex_rotations;
49
51 const std::vector<std::vector<std::vector<unsigned int>>> _rect_patterns;
53 const std::vector<Real> _rect_pitches_x;
55 const std::vector<Real> _rect_pitches_y;
57 const std::vector<Point> _rect_origins;
59 const std::vector<Real> _rect_rotations;
60
62 const std::vector<std::vector<unsigned int>> _circ_patterns;
64 const std::vector<Real> _circ_radii;
66 const std::vector<Point> _circ_origins;
68 const std::vector<Real> _circ_rotations;
69
70 // Custom subdomain id for the background region
71 const subdomain_id_type _background_subdomain_id;
72 // Custom subdomain name for the background region
73 const SubdomainName _background_subdomain_name;
74 // Whether to delete the default external boundary (10000 as defined by
75 // PolygonMeshGeneratorBase::INTRINSIC_SIDESET_ID::OUTER_SIDESET_ID) from the inputs
77
79 const ExtraElementIDName _cell_id_name;
81 const dof_id_type _cell_id_shift;
83 const ExtraElementIDName _pattern_id_name;
85 const dof_id_type _pattern_id_shift;
86
88 const boundary_id_type _external_boundary_id;
90 const BoundaryName _external_boundary_name;
91
94 std::unique_ptr<MeshBase> * _build_mesh;
95};
This FlexiblePatternGenerator object is designed to generate a complex mesh with a background region ...
const bool _delete_default_external_boundary_from_inputs
const std::vector< Real > _circ_radii
List of radii of the circular patterns.
const std::vector< Real > _rect_pitches_x
List of pitches of the rectangular patterns in x direction.
const dof_id_type _cell_id_shift
Shift value to be added to the extra element id to distinguish component unit cell meshes.
static InputParameters validParams()
const std::vector< Real > _rect_pitches_y
List of pitches of the rectangular patterns in y direction.
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
enum FlexiblePatternGenerator::BdryType _boundary_type
const BoundaryName _external_boundary_name
Boundary Name of the external boundary.
const Real _boundary_size
Pitch size of the hexagonal or cartesian background region; or diameter of the circular region.
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< Real > _hex_pitches
List of pitches of the hexagonal patterns.
MeshGeneratorName _boundary_mesh_name
Name of the input mesh that defines the external boundary of the background region.
const unsigned int _boundary_sectors
Number of sectors on each side of the hexagonal or cartesian background region or on the circular bou...
const std::vector< std::vector< unsigned int > > _circ_patterns
Circular patterns.
const ExtraElementIDName _pattern_id_name
Name of the extra element id to be assigned to distinguish input unit meshes.
const std::vector< MeshGeneratorName > & _input_names
Names of input meshes that are used as unit meshes in patterning.
BdryType
Type of boundary mesh to be used for the background region.
const boundary_id_type _external_boundary_id
Boundary ID of the external boundary.
const SubdomainName _background_subdomain_name
const std::vector< Point > _rect_origins
List of origins of the rectangular patterns.
const ExtraElementIDName _cell_id_name
Name of the extra element id to be assigned to distinguish component unit cell meshes.
std::vector< std::pair< Point, unsigned int > > _positions
Positions of all the unit meshes after patterning.
const std::vector< std::vector< std::vector< unsigned int > > > _hex_patterns
Hexagonal patterns.
const std::vector< Real > _circ_rotations
List of rotation angles of the circular patterns.
const std::vector< Real > _rect_rotations
List of rotation angles of the rectangular patterns.
std::unique_ptr< MeshBase > generate() override
const std::vector< Point > _circ_origins
List of origins of the circular patterns.
const std::vector< std::vector< std::vector< unsigned int > > > _rect_patterns
Rectangular patterns.
const std::vector< Real > _hex_rotations
List of rotation angles of the hexagonal patterns.
const std::vector< Point > _hex_origins
List of origins of the hexagonal patterns.
const subdomain_id_type _background_subdomain_id
const InputParameters & parameters() const
A base class that contains common members for Reactor module mesh generators.