22 "What spatial discretization to use. Currently only `\"pwld\"` "
25 "Defines the level of harmonic expansion for the scattering source.");
27 "The eager limit to be used in message size during sweep initialization.\n"
28 " This expects to be followed by a size in bytes (Max 64,0000)See note below."
30 " ###Note on the Eager limit\n"
31 "The eager limit is the message size limit before which non-blocking MPI send"
32 "calls will execute without waiting for a matching receive call. The limit is"
33 "platform dependent but in general 64 kb. Some systems have 32 kb as a limit"
34 "and therefore we use that as a default limit in ChiTech. There is a fine"
35 "interplay between message size and the shear amount of messages that will be"
36 "sent. In general smaller messages tend to be more efficient, however, when"
37 "there are too many small messages being sent around the communication system"
38 "on the given platform will start to suffer. One can gain a small amount of"
39 "parallel efficiency by lowering this limit, however, there is a point where"
40 "the parallel efficiency will actually get worse so use with caution.");
42 "Flag indicating whether restart data is to be read.");
44 "Folder name to use when reading restart data.");
46 "File base name to use when reading restart data.");
48 "Flag indicating whether restart data is to be written.");
50 "Folder name to use when writing restart data.");
52 "File base name to use when writing restart data.");
54 "Interval at which restart data is to be written. Currently not implemented.");
56 "Flag for using delayed neutron precursors.");
58 "Flag for ignoring fixed sources and selectively using source moments "
59 "obtained elsewhere.");
61 "Flag indicating whether angular fluxes are to be stored or not.");
63 "Flag to control verbosity of inner iterations.");
65 "Flag to control verbosity of across-groupset iterations.");
67 "Flag to control verbosity of across-groupset iterations.");
69 "Flag to control the creation of the power generation field function. If set "
70 "to `true` then a field function will be created with the general name "
71 "`<solver_name>_power_generation`.");
73 "Default `kappa` value (Energy released per fission) to use for power "
74 "generation when cross sections do not have `kappa` values. Default: "
75 "3.20435e-11 Joule (corresponding to 200 MeV per fission).");
77 "Power normalization factor to use. Supply a negative or zero number to turn "
80 "Prefix option on field function names. Default: `\"prefix\"`. Can be "
83 "By default this option is `\"prefix\"` which means it uses the designated "
84 "\"prefix\" (another option), however, that is defaulted to nothing. "
85 "Therefore, default behavior is to export flux moment fields functions as "
86 "`phi_gXXX_mYYY` where `XXX` is the zero padded 3 digit group number and "
87 "similarly for `YYY`.");
89 "Prefix to use on all field functions. Default: `\"\"`. "
90 "By default this option is empty but if specified then flux moments will "
91 "exported as `prefix_phi_gXXX_mYYY` where `XXX` is the zero padded 3 digit "
92 "group number and similarly for `YYY`. The underscore after \"prefix\" is "
93 "added automatically.");
96 "A table contain sub-tables for each boundary specification.");
98 "lbs::BoundaryOptionsBlock");
102 AllowableRangeList::New({
"pwld"}));
105 AllowableRangeList::New({
"prefix",
"solver_name"}));
113 BoundaryOptionsBlock,
122 "Set options for boundary conditions. See \\ref LBSBCs");
126 "Boundary name that identifies the specific boundary");
128 "Boundary type specification.");
131 "Required only if `type` is `\"incident_isotropic\"`. An array of isotropic "
132 "strength per group");
135 "Text name of the lua function to be called for this boundary condition. For"
136 " more on this boundary condition type.");
140 "xmin",
"xmax",
"ymin",
"ymax",
"zmin",
"zmax"}));
143 "vacuum",
"incident_isotropic",
"reflecting",
144 "incident_anisotropic_heterogeneous"}));
155 for (
size_t p = 0; p < user_params.NumParameters(); ++p)
157 const auto& spec = user_params.
GetParam(p);
159 if (spec.Name() ==
"spatial_discretization")
161 auto sdm_name = spec.
GetValue<std::string>();
162 if (sdm_name ==
"pwld")
167 else if (spec.Name() ==
"scattering_order")
170 else if (spec.Name() ==
"sweep_eager_limit")
173 else if (spec.Name() ==
"read_restart_data")
176 else if (spec.Name() ==
"read_restart_folder_name")
178 spec.GetValue<std::string>();
180 else if (spec.Name() ==
"read_restart_file_base")
182 spec.GetValue<std::string>();
184 else if (spec.Name() ==
"write_restart_data")
187 else if (spec.Name() ==
"write_restart_folder_name")
189 spec.GetValue<std::string>();
191 else if (spec.Name() ==
"write_restart_file_base")
193 spec.GetValue<std::string>();
195 else if (spec.Name() ==
"write_restart_interval")
198 else if (spec.Name() ==
"use_precursors")
201 else if (spec.Name() ==
"use_source_moments")
204 else if (spec.Name() ==
"save_angular_flux")
207 else if (spec.Name() ==
"verbose_inner_iterations")
210 else if (spec.Name() ==
"verbose_ags_iterations")
213 else if (spec.Name() ==
"verbose_outer_iterations")
216 else if (spec.Name() ==
"power_field_function_on")
219 else if (spec.Name() ==
"power_default_kappa")
222 else if (spec.Name() ==
"power_normalization")
225 else if (spec.Name() ==
"field_function_prefix_option")
228 spec.GetValue<std::string>();
231 else if (spec.Name() ==
"field_function_prefix")
234 else if (spec.Name() ==
"boundary_conditions")
238 for (
size_t b = 0; b < spec.NumParameters(); ++b)
241 bndry_params.AssignParameters(spec.GetParam(b));
252 const std::string fname = __FUNCTION__;
254 const auto boundary_name = user_params.
GetParamValue<std::string>(
"name");
255 const auto bndry_type = user_params.GetParamValue<std::string>(
"type");
257 const std::map<std::string, uint64_t> supported_bndry_names = {{
"xmin", 1},
263 const auto bid = supported_bndry_names.at(boundary_name);
264 const std::map<std::string, lbs::BoundaryType> type_list = {
268 {
"incident_anisotropic_heterogeneous",
271 const auto type = type_list.at(bndry_type);
282 if (not user_params.Has(
"group_strength"))
284 std::string message = fname;
285 message +=
":boundary_conditions:"
286 "type=\"incident_isotropic\" requires parameter "
287 "\"group_strength\".";
289 throw std::invalid_argument(message);
291 user_params.RequireParameterBlockTypeIs(
295 const auto group_strength =
296 user_params.GetParamVectorValue<
double>(
"group_strength");
302 if (not user_params.Has(
"function_name"))
304 std::string message = fname;
305 message +=
":boundary_conditions:"
306 "type=\"incident_anisotropic_heterogeneous\" requires "
307 "parameter \"function_name\".";
309 throw std::invalid_argument(message);
311 const auto bndry_function_name =
312 user_params.GetParamValue<std::string>(
"function_name");
T GetParamValue(const std::string ¶m_name) const
ParameterBlock & GetParam(const std::string ¶m_name)
void SetBoundaryOptions(const chi::InputParameters ¶ms)
std::map< uint64_t, BoundaryPreference > & BoundaryPreferences()
static chi::InputParameters BoundaryOptionsBlock()
static chi::InputParameters OptionsBlock()
void SetOptions(const chi::InputParameters ¶ms)
@ PIECEWISE_LINEAR_DISCONTINUOUS
@ INCIDENT_ANISTROPIC_HETEROGENEOUS
RegisterSyntaxBlock(lbs, OptionsBlock, LBSSolver::OptionsBlock)
std::string write_restart_file_base
bool verbose_inner_iterations
std::string read_restart_file_base
std::string write_restart_folder_name
std::string field_function_prefix_option
double power_normalization
bool verbose_ags_iterations
bool verbose_outer_iterations
std::string field_function_prefix
double power_default_kappa
unsigned int scattering_order
double write_restart_interval
std::string read_restart_folder_name
bool power_field_function_on