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
11 
13 #include "MooseEnum.h"
14 
21 {
22 public:
24 
26 
27  std::unique_ptr<MeshBase> generate() override;
28 
29 protected:
31  const MeshGeneratorName _input_name;
33  std::vector<unsigned short> _trim_peripheral_region;
45  const BoundaryName _external_boundary_name;
47  const SubdomainName _tri_elem_subdomain_name_suffix;
51  std::unique_ptr<MeshBase> & _input;
53  unsigned int _num_sides;
54 
66  void centerTrimmer(ReplicatedMesh & mesh,
67  const unsigned int num_sides,
68  const unsigned int center_trim_sector_number,
69  const unsigned int trimming_start_sector,
70  const boundary_id_type external_boundary_id,
71  const boundary_id_type center_trimming_section_boundary_id,
72  const std::set<subdomain_id_type> subdomain_ids_set);
73 
84  void peripheralTrimmer(ReplicatedMesh & mesh,
85  const std::vector<unsigned short> trim_peripheral_region,
86  const boundary_id_type external_boundary_id,
87  const boundary_id_type peripheral_trimming_section_boundary_id,
88  const std::set<subdomain_id_type> subdomain_ids_set);
89 };
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.
const InputParameters & parameters() const
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.
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.