16 params.addParam<std::vector<VariableName>>(
17 "initial_condition_variables",
19 "List of variables that should have an initial " 20 "condition defined on the blocks of this ActionComponent");
21 params.addParam<std::vector<MooseFunctorName>>(
22 "initial_condition_values",
24 "Functors that provide the initial values of the variables on this ActionComponent");
26 params.addParamNamesToGroup(
"initial_condition_variables initial_condition_values",
27 "Variable initialization");
34 _initial_condition_variables(
35 getParam<
std::vector<VariableName>>(
"initial_condition_variables")),
36 _variable_ic_functors(getParam<
std::vector<MooseFunctorName>>(
"initial_condition_values"))
42 checkVectorParamsNoOverlap<VariableName>({
"initial_condition_variables"});
45 "Should be the same size as 'initial_condition_values'");
56 const MooseFunctorName &
58 const std::string & requestor_name)
const 68 "Initial condition for variable '" + variable +
"' requested by '" + requestor_name +
69 "' has not been specified on this ActionComponent.");
77 std::string list_missing =
"";
80 list_missing = (list_missing ==
"" ?
"" :
", ") + ic_name;
83 "Initial conditions for variables '" + list_missing +
84 "' have been defined on this ActionComponent, but have not been requested by " ComponentInitialConditionInterface(const InputParameters ¶ms)
static InputParameters validParams()
const std::vector< MooseFunctorName > _variable_ic_functors
Functor values for the initial conditions of the variables.
Base class for components that are defined using an action.
static InputParameters validParams()
std::set< VariableName > _requested_ic_variables
Requested variables. If the IC for a variable was never requested, error.
bool hasInitialCondition(const VariableName &variable) const
Whether the component has an initial condition parameter set for the requested variable.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void addRequiredTask(const std::string &task)
Add a new required task for all physics deriving from this class NOTE: This does not register the tas...
const std::vector< VariableName > _initial_condition_variables
Names of the variables to set an initial condition on.
const MooseFunctorName & getInitialCondition(const VariableName &variable, const std::string &requestor_name) const
Get the name of the functor providing the initial condition for the requested variable.
auto index_range(const T &sizable)
void checkInitialConditionsAllRequested() const
Checks that all initial conditions were requested.