https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
21public:
23
25
26 std::unique_ptr<MeshBase> generate() override;
27
28 std::unique_ptr<CSG::CSGBase> generateCSG() override;
29
30protected:
31 // Define metadata associated with CoreMeshGenerator
32 void generateMetadata();
33
34 // Check constituent assemblies and determine whether they should be stitched into a core using
35 // flexible stitching
37
39 const std::vector<MeshGeneratorName> _inputs;
40
42 const MeshGeneratorName _empty_key;
43
45 bool _empty_pos = false;
46
48 const std::vector<std::vector<unsigned int>> _pattern;
49
51 const bool _extrude;
52
54 std::string _geom_type;
55
57 const bool _mesh_periphery;
61 const subdomain_id_type _periphery_region_id;
65 const unsigned int _outer_circle_num_segments;
67 const std::string _periphery_block_name;
69 const unsigned int _periphery_num_layers;
71 const Real _desired_area;
73 std::string _desired_area_func;
74
76 unsigned int _mesh_dimensions;
77
79 std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _pin_region_id_map;
80
82 std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _pin_block_name_map;
83
85 std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _duct_region_id_map;
86
88 std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _duct_block_name_map;
89
91 std::map<subdomain_id_type, std::vector<subdomain_id_type>> _background_region_id_map;
92
94 std::map<subdomain_id_type, std::vector<std::string>> _background_block_name_map;
95
97 std::map<subdomain_id_type, std::vector<std::vector<subdomain_id_type>>> _drum_region_id_map;
98
100 std::map<subdomain_id_type, std::vector<std::vector<std::string>>> _drum_block_name_map;
101
104 std::unique_ptr<MeshBase> * _build_mesh;
105
107 std::vector<std::unique_ptr<CSG::CSGBase> *> _input_csg_bases;
108};
Mesh generator for defining a reactor core using a Cartesian or hexagonal lattice with the option to ...
unsigned int _mesh_dimensions
The number of dimensions the mesh is ultimately going to have (2 or 3, declared in the ReactorMeshPar...
const unsigned int _outer_circle_num_segments
Number of segments in the outer circle boundary.
bool _empty_pos
Whether empty positions are to be used in the pattern.
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...
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...
const unsigned int _periphery_num_layers
Number of periphery layers.
const std::string _periphery_block_name
The subdomain name for the generated mesh outer boundary.
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...
std::string _geom_type
The geometry type for the reactor that is stored on the ReactorMeshParams object.
const bool _mesh_periphery
Whether the core periphery should be meshed.
std::unique_ptr< MeshBase > * _build_mesh
The final mesh that is generated by the subgenerators; This mesh is generated by the subgenerators wi...
bool constituentAssembliesNeedFlexibleStiching()
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 Real _outer_circle_radius
outer circle boundary radius
std::unique_ptr< CSG::CSGBase > generateCSG() override
static InputParameters validParams()
const Real _desired_area
Desired (maximum) triangle area.
const std::vector< MeshGeneratorName > _inputs
The names of the assemblies that compose the core.
const std::vector< std::vector< unsigned int > > _pattern
The 2D assembly layout of the core.
std::vector< std::unique_ptr< CSG::CSGBase > * > _input_csg_bases
List of pointers to all CSG bases created by input mesh generators.
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::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::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::string _desired_area_func
Desired (local) triangle area as a function of (x,y)
const MeshGeneratorName _empty_key
The name of "filler" assembly given in the input to represent an empty space in the core pattern.
const MooseEnum _periphery_meshgenerator
Which periphery meshgenerator to use.
std::unique_ptr< MeshBase > generate() override
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...
const InputParameters & parameters() const
A base class that contains common members for Reactor Geometry Mesh Builder mesh generators.