49 if (task ==
"add_variable")
51 for (
const auto i : make_range(
_problem->numNonlinearSystems()))
53 const auto & field_vars =
_problem->getNonlinearSystemBase(i).getVariables(0);
54 for (
const auto & var : field_vars)
56 std::set<OutputName> outputs = var->getOutputs();
60 const auto & scalar_vars =
_problem->getNonlinearSystemBase(i).getScalarVariables(0);
61 for (
const auto & var : scalar_vars)
63 std::set<OutputName> outputs = var->getOutputs();
69 else if (task ==
"add_aux_variable")
71 const auto & field_vars =
_problem->getAuxiliarySystem().getVariables(0);
72 for (
const auto & var : field_vars)
74 std::set<OutputName> outputs = var->getOutputs();
78 const auto & scalar_vars =
_problem->getAuxiliarySystem().getScalarVariables(0);
79 for (
const auto & var : scalar_vars)
81 std::set<OutputName> outputs = var->getOutputs();
96 const auto & materials =
_problem->getMaterialWarehouse().getActiveObjects();
101 for (
const auto & mat : materials)
104 std::set<OutputName> outputs = mat->getOutputs();
116 unsigned int num_screen_outputs = 0;
117 for (
const auto & console : console_ptrs)
118 if (console->getParam<
bool>(
"output_screen"))
119 num_screen_outputs++;
121 if (num_screen_outputs > 1)
124 ") Console output objects are writing to the "
125 "screen, this will likely cause duplicate "
126 "messages printed.");
134 bool has_console =
false;
136 for (
const auto & console : ptrs)
137 if (console->getParam<
bool>(
"output_screen"))
registerMooseAction("MooseApp", CheckOutputAction, "check_output")
static InputParameters validParams()
MooseApp & _app
The MOOSE application this is associated with.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Action for checking that "outputs" is properly populated for Materials.
void checkConsoleOutput()
Performs Console Output object related checks.
CheckOutputAction(const InputParameters ¶ms)
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
void checkVariableOutput(const std::string &task)
Performs check for "outputs" option for Variables and AuxVariables blocks.
void checkPerfLogOutput()
Performs PerfLog output settings.
void checkMaterialOutput()
Performs a set of checks on each of the Material objects that the "outputs" parameters has valid valu...
static InputParameters validParams()
An output object for writing to the console (screen)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
std::vector< T * > getOutputs(const std::vector< OutputName > &names)
Return a vector of objects by names.
void checkOutputs(const std::set< OutputName > &names, const bool supports_material_output=false)
Test that the output names exist.
void mooseWarning(Args &&... args) const
PerfLog perflog("libMesh", #ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING true #else false #endif)