20 "boundary",
"List of boundary names for which this component applies");
29 _boundary(getParam<
std::vector<BoundaryName>>(
"boundary")),
30 _hs_name(getParam<
std::string>(
"hs"))
37 checkComponentOfTypeExistsByName<HeatStructureInterface>(
_hs_name);
39 if (hasComponentByName<HeatStructureBase>(
_hs_name))
44 for (
unsigned int i = 0; i <
_boundary.size(); i++)
53 logError(
"The heat structure side of the heat structure '",
55 "' corresponding to the boundary name '",
57 "' has a zero perimeter. This can be caused by applying the boundary on the "
58 "axis of symmetry of a cylindrical heat structure.");
68 const auto & comp2d = getComponentByName<Component2D>(
_hs_name);
70 if (!comp2d.hasExternalBoundary(boundary))
79 logError(
"The boundaries given in 'boundary' must all be external.");
87 const auto & comp2d = getComponentByName<Component2D>(
_hs_name);
88 const auto common_boundary_type = comp2d.getExternalBoundaryType(
_boundary[0]);
89 for (
unsigned int i = 1; i <
_boundary.size(); i++)
91 const auto boundary_type = comp2d.getExternalBoundaryType(
_boundary[i]);
92 if (boundary_type != common_boundary_type)
97 mooseError(
"No boundaries were supplied in 'boundary'.");
105 const auto & comp2d = getComponentByName<Component2D>(
_hs_name);
106 return comp2d.getExternalBoundaryType(
_boundary[0]);
110 "The boundaries supplied in 'boundary' do not have a common external boundary type.");
Base class for components of a boundary type.
static InputParameters validParams()
ExternalBoundaryType
External boundary type.
ExternalBoundaryType getExternalBoundaryType(const BoundaryName &boundary_name) const
Gets the external boundary type of the given boundary.
bool hasExternalBoundary(const BoundaryName &boundary_name) const
Returns true if this component has the supplied external boundary.
void logError(Args &&... args) const
Logs an error.
bool hasCommonComponent2DExternalBoundaryType() const
Returns true if all of the boundaries have the same external boundary type.
const std::vector< BoundaryName > & _boundary
Boundary names for which the boundary component applies.
HSBoundary(const InputParameters ¶ms)
bool allComponent2DBoundariesAreExternal() const
Returns true if all of the boundaries are external.
void checkAllComponent2DBoundariesAreExternal() const
Logs an error if any boundary is not external.
static InputParameters validParams()
const std::string & _hs_name
Heat structure name.
Component2D::ExternalBoundaryType getCommonComponent2DExternalBoundaryType() const
Gets the common external boundary type.
virtual void check() const override
Check the component integrity.
Base class for 2D generated heat structures.
virtual Real getUnitPerimeter(const ExternalBoundaryType &side) const =0
Gets the perimeter of one unit of this heat structure on the specified side.
void mooseError(Args &&... args) const