https://mooseframework.inl.gov
PolygonMeshTrimmerBase.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 #include "MooseEnum.h"
13 
20 {
21 public:
23 
25 
26  std::unique_ptr<MeshBase> generate() override;
27 
28 protected:
30  const MeshGeneratorName _input_name;
32  std::vector<unsigned short> _trim_peripheral_region;
44  const BoundaryName _external_boundary_name;
46  const SubdomainName _tri_elem_subdomain_name_suffix;
50  std::unique_ptr<MeshBase> & _input;
52  unsigned int _num_sides;
53 
65  void centerTrimmer(ReplicatedMesh & mesh,
66  const unsigned int num_sides,
67  const unsigned int center_trim_sector_number,
68  const unsigned int trimming_start_sector,
69  const boundary_id_type external_boundary_id,
70  const boundary_id_type center_trimming_section_boundary_id,
71  const std::set<subdomain_id_type> subdomain_ids_set);
72 
83  void peripheralTrimmer(ReplicatedMesh & mesh,
84  const std::vector<unsigned short> trim_peripheral_region,
85  const boundary_id_type external_boundary_id,
86  const boundary_id_type peripheral_trimming_section_boundary_id,
87  const std::set<subdomain_id_type> subdomain_ids_set);
88 };
std::vector< unsigned short > _trim_peripheral_region
Index of the peripheral regions to be trimmed (see moosedocs for indexing scheme) ...
const subdomain_id_type _tri_elem_subdomain_shift
Customized id shift to define subdomain ids of the converted triangular elements. ...
unsigned int _num_sides
Number of polygon sides.
void peripheralTrimmer(ReplicatedMesh &mesh, const std::vector< unsigned short > trim_peripheral_region, const boundary_id_type external_boundary_id, const boundary_id_type peripheral_trimming_section_boundary_id, const std::set< subdomain_id_type > subdomain_ids_set)
Performs peripheral trimming on the input mesh.
std::unique_ptr< MeshBase > & _input
Reference to input mesh pointer.
static InputParameters validParams()
short _trimming_end_sector
Index of the sector to end trimming at (counter-clockwise direction)
const BoundaryName _center_trimming_section_boundary
Name of the section formed by center trimming.
std::unique_ptr< MeshBase > generate() override
This PolygonMeshTrimmerBase is the base class for CartesianMeshTrimmer and HexagonMeshTrimmer, which take in a cartesian/hexagonal assembly or core mesh and perform peripheral and/or center trimming on it.
int8_t boundary_id_type
unsigned short _center_trim_sector_number
Number of remaining sectors.
const BoundaryName _peripheral_trimming_section_boundary
Name of the section formed by peripheral trimming.
const BoundaryName _external_boundary_name
Name/ID of external boundary.
PolygonMeshTrimmerBase(const InputParameters &parameters)
A base class that contains common members for Reactor module mesh generators.
const MeshGeneratorName _input_name
Input mesh to be modified.
const SubdomainName _tri_elem_subdomain_name_suffix
SubdomainName suffix used to rename the converted triangular elements.
const InputParameters & parameters() const
short _trimming_start_sector
Index of the sector to start trimming from (counter-clockwise direction)
void centerTrimmer(ReplicatedMesh &mesh, const unsigned int num_sides, const unsigned int center_trim_sector_number, const unsigned int trimming_start_sector, const boundary_id_type external_boundary_id, const boundary_id_type center_trimming_section_boundary_id, const std::set< subdomain_id_type > subdomain_ids_set)
Performs center trimming on the input mesh.