27 "StochasticReporter on the main application.");
30 "from_reporter",
"The name(s) of the Reporter(s) on the sub-app to transfer from.");
32 "stochastic_reporter",
"The name of the StochasticReporter object to transfer values to.");
34 params.
addParam<std::string>(
"prefix",
35 "Use the supplied string as the prefix for reporter " 36 "name rather than the transfer name.");
46 _sub_reporter_names(getParam<
std::vector<
ReporterName>>(
"from_reporter"))
49 paramError(
"to_multi_app",
"To and between multiapp directions are not implemented");
59 paramError(
"stochastic_reporter",
"This object must be a 'StochasticReporter' object.");
78 for (MooseIndex(n) i = 0; i < n; i++)
108 for (MooseIndex(n) i = 0; i < n; i++)
113 const std::string prefix =
isParamValid(
"prefix") ? getParam<std::string>(
"prefix") :
name();
115 for (MooseIndex(n) i = 0; i < n; i++)
125 " is of unsupported type ",
127 ". Contact MOOSE developers on how to transfer this type of reporter value.");
133 prefix + (prefix.empty() ?
"" :
":") +
"converged", *
_sampler_ptr);
150 (*_converged)[local_index] =
getFromMultiApp()->getExecutioner(app_index)->lastSolveConverged();
StochasticReporter * _results
StochasticReporter object where values are being transferred.
static InputParameters validParams()
const ExecFlagType EXEC_TRANSFER
T & getUserObject(const std::string &name, unsigned int tid=0) const
const std::shared_ptr< MultiApp > getFromMultiApp() const
void paramError(const std::string ¶m, Args... args) const
void addReporterTransferMode(const ReporterName &name, const ReporterMode &mode, FEProblemBase &problem)
const ReporterMode REPORTER_MODE_ROOT
virtual std::string type() const=0
virtual ReporterName declareStochasticReporterClone(const Sampler &sampler, const ReporterData &from_data, const ReporterName &from_reporter, std::string prefix="")
const std::vector< ReporterName > & _sub_reporter_names
Name of reporters on the sub-applications.
void intitializeStochasticReporters()
Used to declare reporter values on main app and add consumer modes on subapps.
dof_id_type getLocalRowBegin() const
FEProblemBase & _fe_problem
registerMooseObject("StochasticToolsApp", SamplerReporterTransfer)
virtual void initialSetup() override
std::vector< ReporterName > _reporter_names
Storage vector names.
bool contains(const std::string &value) const
const std::string & name() const
virtual void executeFromMultiapp() override
const ExecFlagEnum & getExecuteOnEnum() const
virtual void finalizeFromMultiapp() override
void transferStochasticReporters(dof_id_type global_index, dof_id_type app_index)
Transfer reporter values.
dof_id_type getLocalRowEnd() const
virtual void initializeFromMultiapp() override
Methods used when running in batch mode (see SamplerFullSolveMultiApp)
virtual void execute() override
Traditional Transfer callback.
virtual void initialize() override final
bool hasToMultiApp() const
std::vector< bool > * _converged
Reporter value for whether or not sub app converged.
bool isParamValid(const std::string &name) const
void transferToVectorReporter(const ReporterName &from_reporter, const ReporterName &to_reporter, const FEProblemBase &from_problem, FEProblemBase &to_problem, dof_id_type index, unsigned int time_index=0)
std::vector< T > & declareStochasticReporter(std::string value_name, const Sampler &sampler)
virtual void computeUserObjectByName(const ExecFlagType &type, const Moose::AuxGroup &group, const std::string &name)
Transfer Reporters from sub-applications to a StochasticReporter on the main application.
const ReporterContextBase & getReporterContextBase(const ReporterName &reporter_name) const
SamplerReporterTransfer(const InputParameters ¶meters)