25 "Output for displaying objects and parameters associated with the Control system.");
29 "clear_after_output",
true,
"Clear the active control display after each output.");
30 params.
addParam<
bool>(
"show_active_objects",
true,
"List active MooseObjects.");
38 _clear_after_output(getParam<bool>(
"clear_after_output")),
39 _show_active_objects(getParam<bool>(
"show_active_objects"))
63 std::map<std::shared_ptr<InputParameters>, std::set<MooseObjectName>> objects;
64 for (
const auto & iter : params)
65 objects[iter.second].insert(iter.first);
68 std::stringstream oss;
72 oss <<
"Active Objects:\n" << COLOR_DEFAULT;
73 for (
const auto & iter : objects)
75 std::shared_ptr<InputParameters> ptr = iter.first;
77 if (!ptr->have_parameter<
bool>(
"enable") || ptr->get<
bool>(
"enable"))
80 bool first_iteration =
true;
81 for (
const auto & obj_name : iter.second)
86 first_iteration =
false;
103 std::stringstream oss;
107 std::map<std::shared_ptr<InputParameters>, std::set<MooseObjectName>> objects;
108 for (
const auto & iter : params)
109 objects[iter.second].insert(iter.first);
112 oss <<
"Controls:\n";
113 for (
const auto & iter : objects)
115 std::shared_ptr<InputParameters> ptr = iter.first;
117 const std::set<std::string> & names = ptr->getControllableParameters();
122 << COLOR_DEFAULT <<
'\n';
126 for (
const auto & obj_name : iter.second)
127 oss << obj_name <<
" ";
131 const std::vector<std::string> & tags = ptr->get<std::vector<std::string>>(
"control_tags");
135 for (
const auto & tag_name : tags)
136 oss << tag_name <<
" ";
141 for (
const auto & param_name : names)
143 << ptr->type(param_name) <<
'\n';
156 _console <<
"\nActive Controls:\n" << dump << std::endl;
std::string indent(unsigned int spaces)
Create empty string for indenting.
A MultiMooseEnum object to hold "execute_on" flags.
void outputControls()
Output list of controllable parameters.
static InputParameters validParams()
bool _show_active_objects
Flag for showing active objects.
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
registerMooseObject("MooseApp", ControlOutput)
void outputActiveObjects()
Output a list of active MooseObjects.
static const unsigned int console_field_width
Width used for printing simulation information.
Based class for output objects.
const ExecFlagType EXEC_TIMESTEP_BEGIN
ExecFlagType _current_execute_flag
Current execute on flag.
void outputChangedControls()
Output list of parameters that have been controlled.
MooseApp & _app
The MOOSE application this is associated with.
bool _clear_after_output
Flag for clearing the controlled parameters after they are output.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Class for output information regarding Controls to the screen.
virtual void output() override
Perform the output of control information.
ControlOutput(const InputParameters ¶meters)
Class constructor.
static InputParameters validParams()
const ExecFlagType EXEC_INITIAL