18 const std::vector<Real> & ring_radii,
19 const std::vector<std::string> & fill_mats)
25 mooseError(
"Pin universe engineering unit must have at least one ring radius defined");
29 for (
const auto i : make_range(
_ring_radii.size() - 1))
31 mooseError(
"Pin engineering unit must have ring radii defined in strictly ascending order");
34 mooseError(
"Size of region IDs must be one more than the number of radial rings in pin");
37std::unordered_map<std::string, AttributeVariant>
43std::unique_ptr<CSGUniverseEngUnit>
58 const bool build_ring_surf = i <
_ring_radii.size();
63 const auto surf_name =
_name +
"_radial_ring_" + std::to_string(i);
64 std::unique_ptr<CSG::CSGSurface> ring_surf_ptr =
65 std::make_unique<CSG::CSGZCylinder>(surf_name, 0, 0,
radius);
66 const auto & ring_surf =
_internal_base->addSurface(std::move(ring_surf_ptr));
69 if (inner_region.
getRegionType() == CSG::CSGRegion::RegionType::EMPTY)
73 cell_region = inner_region;
79 outer_region = ~inner_region;
81 cell_region = inner_region & outer_region;
85 cell_region = ~inner_region;
88 auto cell_name =
_name +
"_cell_radial_" + std::to_string(i);
void mooseError(Args &&... args)
std::unique_ptr< CSGBase > _internal_base
RegionType getRegionType() const
void expandUnit() override
Represent the pin cell as a single universe that contains cells that define each region of the pin ce...
const std::vector< Real > _ring_radii
List of ring radii of pin cell.
std::unique_ptr< CSGUniverseEngUnit > clone() const override
Return a deep copy of this unit.
std::vector< std::string > _fill_mats
Region IDs of pin cell.
std::unordered_map< std::string, AttributeVariant > getAttributes() const override
Return the pin engineering unit attributes for this object.
PinUniverseEngUnit(const std::string &name, const std::vector< Real > &ring_radii, const std::vector< std::string > &fill_mats)
Constructor for PinUniverseEngUnit.
CSG::CSGRegion getInnerRegion(const std::vector< std::reference_wrapper< const CSG::CSGSurface > > &surfaces, const libMesh::Point &origin)