https://mooseframework.inl.gov
CoreMeshGenerator.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 #include "MooseEnum.h"
14 
20 {
21 public:
23 
25 
26  std::unique_ptr<MeshBase> generate() override;
27 
28 protected:
29  // Define metadata associated with CoreMeshGenerator
30  void generateMetadata();
31 
32  // Check constituent assemblies and determine whether they should be stitched into a core using
33  // flexible stitching
35 
37  const std::vector<MeshGeneratorName> _inputs;
38 
40  const MeshGeneratorName _empty_key;
41 
43  bool _empty_pos = false;
44 
46  const std::vector<std::vector<unsigned int>> _pattern;
47 
49  const bool _extrude;
50 
52  std::string _geom_type;
53 
55  const bool _mesh_periphery;
63  const unsigned int _outer_circle_num_segments;
65  const std::string _periphery_block_name;
67  const unsigned int _periphery_num_layers;
71  std::string _desired_area_func;
72 
74  unsigned int _mesh_dimensions;
75 
77  std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _pin_region_id_map;
78 
80  std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _pin_block_name_map;
81 
83  std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _duct_region_id_map;
84 
86  std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _duct_block_name_map;
87 
89  std::map<subdomain_id_type, std::vector<subdomain_id_type>> _background_region_id_map;
90 
92  std::map<subdomain_id_type, std::vector<std::string>> _background_block_name_map;
93 
95  std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _drum_region_id_map;
96 
98  std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _drum_block_name_map;
99 
102  std::unique_ptr<MeshBase> * _build_mesh;
103 };
static InputParameters validParams()
const bool _mesh_periphery
Whether the core periphery should be meshed.
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _duct_region_id_map
A mapping from assembly-type IDs to region IDs in the assembly duct regions used when assigning regio...
Mesh generator for defining a reactor core using a Cartesian or hexagonal lattice with the option to ...
const Real _outer_circle_radius
outer circle boundary radius
bool _empty_pos
Whether empty positions are to be used in the pattern.
std::string _desired_area_func
Desired (local) triangle area as a function of (x,y)
const std::vector< MeshGeneratorName > _inputs
The names of the assemblies that compose the core.
std::map< subdomain_id_type, std::vector< subdomain_id_type > > _background_region_id_map
A mapping from assembly-type IDs to region IDs in the assembly background regions used when assigning...
const bool _extrude
Whether this mesh should be extruded to 3-D, the core is always assumed to be the last...
const MooseEnum _periphery_meshgenerator
Which periphery meshgenerator to use.
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 assembly stitch...
const unsigned int _outer_circle_num_segments
Number of segments in the outer circle boundary.
const unsigned int _periphery_num_layers
Number of periphery layers.
std::string _geom_type
The geometry type for the reactor that is stored on the ReactorMeshParams object. ...
bool constituentAssembliesNeedFlexibleStiching()
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 assembly stitchin...
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _duct_block_name_map
A mapping from assembly-type IDs to block names in the assembly duct regions used when assigning bloc...
std::map< subdomain_id_type, std::vector< std::string > > _background_block_name_map
A mapping from assembly-type IDs to block names in the assembly background regions used when assignin...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unique_ptr< MeshBase > generate() override
const std::string _periphery_block_name
The subdomain name for the generated mesh outer boundary.
const MeshGeneratorName _empty_key
The name of "filler" assembly given in the input to represent an empty space in the core pattern...
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.
const Real _desired_area
Desired (maximum) triangle area.
const InputParameters & parameters() const
const subdomain_id_type _periphery_region_id
"region_id" extra-element integer of the periphery mesh elements
std::map< subdomain_id_type, std::vector< std::vector< subdomain_id_type > > > _drum_region_id_map
A mapping from assembly-type IDs to region IDs in the drum regions used when assigning region IDs dur...
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
const std::vector< std::vector< unsigned int > > _pattern
The 2D assembly layout of the core.
CoreMeshGenerator(const InputParameters &parameters)
std::map< subdomain_id_type, std::vector< std::vector< std::string > > > _drum_block_name_map
A mapping from assembly-type IDs to block names in the drum regions used when assigning block names d...
unsigned int _mesh_dimensions
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshPar...