31 SamplerName sampler_name;
34 for (
auto & sampler : samplers)
37 if (!sampler_name.empty())
38 mooseError(
"The case with multiple adaptive samplers is not currently supported");
39 sampler_name = sampler->
name();
42 if (sampler_name.empty())
49 params.
set<std::string>(
"message") =
"Sampling completed!";
51 _problem->addUserObject(
"Terminator",
"_terminate" + sampler_name, params);
56 params.
set<SamplerName>(
"sampler") = sampler_name;
58 params.
set<std::vector<OutputName>>(
"outputs") = {
"none"};
59 _problem->addUserObject(
"AdaptiveSamplingCompletedPostprocessor",
registerMooseAction("StochasticToolsApp", AdaptiveSamplerAction, "add_user_object")
const ExecFlagType EXEC_TIMESTEP_END
std::vector< const T * > getActions()
static InputParameters validParams()
std::shared_ptr< FEProblemBase > & _problem
const std::string & _current_task
static InputParameters validParams()
virtual void act() override
AdaptiveSamplerAction(const InputParameters ¶ms)
static std::set< SamplerName > adaptiveSamplerNames()
Returns the names of all the existing adaptive samplers.
static PostprocessorName adaptiveSamplingCompletedPostprocessorName()
Returns the name of the AdaptiveSamplingCompletedPostprocessor.
InputParameters getValidParams(const std::string &name) const
ActionWarehouse & actionWarehouse()
const std::string & name() const
void mooseError(Args &&... args) const