11 #include "libmesh/quadrature.h"
21 params.addParam<Real>(
"view_factor_tol",
22 std::numeric_limits<Real>::max(),
23 "Tolerance for checking view factors. Default is to allow everything.");
24 params.addParam<
bool>(
"normalize_view_factor",
26 "Determines if view factors are normalized to sum to one (consistent with "
27 "their definition).");
28 params.addClassDescription(
29 "A base class for automatic computation of view factors between sidesets.");
34 : SideUserObject(parameters),
35 _n_sides(boundaryIDs().size()),
37 _view_factor_tol(getParam<Real>(
"view_factor_tol")),
38 _normalize_view_factor(getParam<bool>(
"normalize_view_factor"))
46 std::vector<BoundaryName> boundary_names = getParam<std::vector<BoundaryName>>(
"boundary");
47 for (
unsigned int j = 0; j < boundary_names.size(); ++j)
54 auto from_name = _mesh.getBoundaryName(from_id);
55 auto to_name = _mesh.getBoundaryName(to_id);
66 mooseError(
"Boundary id ",
67 _mesh.getBoundaryID(from_name),
70 " not listed in boundary parameter.");
73 mooseError(
"Boundary id ",
74 _mesh.getBoundaryID(to_name),
77 " not listed in boundary parameter.");
86 for (
unsigned int i = 0; i <
_n_sides; ++i)
96 const ViewFactorBase & pps = static_cast<const ViewFactorBase &>(y);
97 for (
unsigned int i = 0; i <
_n_sides; ++i)
99 for (
unsigned int j = 0; j <
_n_sides; ++j)
108 for (
unsigned int from = 0; from <
_n_sides; ++from)
111 for (
unsigned int to = 0; to <
_n_sides; ++to)
115 mooseError(
"View factor from boundary ", boundaryNames()[from],
" add to ", s);
118 for (
unsigned int to = 0; to <
_n_sides; ++to)