https://mooseframework.inl.gov
AssemblyMeshGenerator.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 {
20 public:
22 
24 
25  std::unique_ptr<MeshBase> generate() override;
26 
27 protected:
28  // Delete outermost mesh interval of assembly and replace with triangulated mesh with fixed number
29  // of nodes at outer boundary
31 
32  // Define metadata associated with AssemblyMeshGenerator
33  void generateMetadata();
34 
36  const std::vector<MeshGeneratorName> _inputs;
37 
40 
42  const std::vector<std::vector<unsigned int>> _pattern;
43 
45  const std::vector<Real> _duct_sizes;
46 
48  const unsigned int _background_intervals;
49 
51  const std::vector<unsigned int> _duct_intervals;
52 
54  std::vector<subdomain_id_type> _background_region_id;
55 
57  std::vector<std::vector<subdomain_id_type>> _duct_region_ids;
58 
61 
64 
66  std::vector<std::string> _background_block_name;
67 
69  std::vector<std::vector<std::string>> _duct_block_names;
70 
72  const bool _extrude;
73 
75  std::string _geom_type;
76 
78  unsigned int _mesh_dimensions;
79 
81  std::vector<Real> _axial_boundaries;
82 
84  std::vector<subdomain_id_type> _peripheral_region_ids;
85 
87  std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _pin_region_id_map;
88 
90  std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _pin_block_name_map;
91 
94 
97 
100  std::unique_ptr<MeshBase> * _build_mesh;
101 };
bool _has_duct_block_names
Whether block names for assembly duct elements have been provided by user.
const unsigned int _background_intervals
The number of divisions in the mesh outside of the pins and inside of the ducts.
const subdomain_id_type _assembly_type
The id number for the type of the assembly.
std::unique_ptr< MeshBase > generate() override
const std::vector< Real > _duct_sizes
The inner apothem of any ducts around the assembly.
bool _has_background_block_name
Whether block names for assembly background elements have been provided by user.
std::vector< std::vector< subdomain_id_type > > _duct_region_ids
2-D vector (axial outer indexing, radial inner indexing) used to set the "region_id" extra-element in...
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _pin_region_id_map
A mapping from pin-type IDs to region IDs used when assigning region IDs during the pin stitching sta...
static InputParameters validParams()
std::vector< subdomain_id_type > _background_region_id
Vector used to set the "region_id" extra-element integer of the assembly background elements...
int8_t boundary_id_type
const std::vector< unsigned int > _duct_intervals
The number of divisions in the meshes of the ducts.
std::vector< std::vector< std::string > > _duct_block_names
Optional 2-D vector (axial outer indexing, radial inner indexing) used to set the block names of the ...
unsigned int _mesh_dimensions
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshPar...
std::vector< subdomain_id_type > _peripheral_region_ids
The region ids of peripheral regions in the 2D mesh. This includes the assembly background region and...
const std::vector< std::vector< unsigned int > > _pattern
The 2D pin-by-pin layout of the assembly mapping indices into _inputs.
std::string _geom_type
The type of geometry that is being described (Square or Hex, declared in the ReactorMeshParams object...
AssemblyMeshGenerator(const InputParameters &parameters)
boundary_id_type _assembly_boundary_id
The ID of the assembly outer boundary, equal to the assembly type ID + 2000.
const std::vector< MeshGeneratorName > _inputs
The names of the pins that compose the Assembly.
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.
const InputParameters & parameters() const
std::vector< std::string > _background_block_name
Optional vector used to set the block names of the assembly background elements.
std::vector< Real > _axial_boundaries
The heights of the axial regions that are stored on the ReactorMeshParams object. ...
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _pin_block_name_map
A mapping from pin-type IDs to block names used when assigning block names during the pin stitching s...
const bool _extrude
Whether this mesh should be extruded to 3-D, making it the final structure in the reactor mesh...
BoundaryName _assembly_boundary_name
The name of the assembly outer boundary, equal to the concatenation of "outer_assembly_" and the asse...
Mesh generator for defining a reactor assembly using a Cartesian or hexagonal lattice with the option...