Skip to content

Commit

Permalink
Merge pull request #251 from MengnanLi91/input_vector_parameter_fix
Browse files Browse the repository at this point in the history
Add default value for vector type input parameters
  • Loading branch information
smpark7 authored Sep 28, 2023
2 parents 57f93b9 + ce42472 commit 999bd5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion moose
Submodule moose updated 1445 files
12 changes: 6 additions & 6 deletions src/actions/VariableNotAMooseObjectAction.C
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ VariableNotAMooseObjectAction::getSubdomainIDs()
{
// Extract and return the block ids supplied in the input
std::set<SubdomainID> blocks;
std::vector<SubdomainName> block_param = getParam<std::vector<SubdomainName>>("block");
for (const auto & subdomain_name : block_param)
{
SubdomainID blk_id = _problem->mesh().getSubdomainID(subdomain_name);
blocks.insert(blk_id);
}
if (isParamValid("block"))
for (const auto & subdomain_name : getParam<std::vector<SubdomainName>>("block"))
{
SubdomainID blk_id = _problem->mesh().getSubdomainID(subdomain_name);
blocks.insert(blk_id);
}
return blocks;
}

Expand Down
4 changes: 2 additions & 2 deletions src/kernels/TransientFissionHeatSource.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ TransientFissionHeatSource::validParams()
params.addParam<unsigned int>("num_decay_heat_groups", 0, "The number of decay heat groups.");
params.addCoupledVar("heat_concs", "All the variables that hold the decay heat "
"precursor concentrations.");
params.addParam<std::vector<Real>>("decay_heat_fractions", "Decay Heat Fractions");
params.addParam<std::vector<Real>>("decay_heat_constants", "Decay Heat Constants");
params.addParam<std::vector<Real>>("decay_heat_fractions", {}, "Decay Heat Fractions");
params.addParam<std::vector<Real>>("decay_heat_constants", {}, "Decay Heat Constants");
params.addParam<bool>("account_decay_heat", false, "Whether to account for decay heat.");
return params;
}
Expand Down

0 comments on commit 999bd5a

Please sign in to comment.