21 "Control for receiving data from a Sampler via SamplerParameterTransfer.");
35 mooseError(
"Internal error: Number of parameters does not match number of values.");
41 const std::vector<Real> & value =
_values[i];
46 if (control_param.
check<Real>())
49 if (value.size() != 1)
52 "' expects a single value, but the vector supplying its values has a size of ",
55 control_param.
set<Real>(value[0]);
57 else if (control_param.
check<std::vector<Real>>())
58 control_param.
set<std::vector<Real>>(value);
61 mooseError(
"Unable to locate a Real or std::vector<Real> parameter with the name '",
75 for (
const auto & pv : param_values)
const ExecFlagType EXEC_TIMESTEP_BEGIN
registerMooseObject("StochasticToolsApp", SamplerReceiver)
static InputParameters validParams()
ControllableParameter getControllableParameterByName(const std::string ¶m_name)
void set(const T &value, bool type_check=true)
void mooseError(Args &&... args) const
A Control object for receiving data from a master application Sampler object.
std::vector< std::vector< Real > > _values
Values to use when modifying parameters.
static InputParameters validParams()
virtual void execute() override
std::vector< std::string > _parameters
Parameter names to modify.
SamplerReceiver(const InputParameters ¶meters)
void transfer(const std::map< std::string, std::vector< Real > > ¶m_values)
Update the parameters and associated values via _parameters and _values.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
const Parallel::Communicator & _communicator
processor_id_type processor_id() const