49 if (task ==
"add_variable")
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"))
void checkMaterialOutput()
Performs a set of checks on each of the Material objects that the "outputs" parameters has valid valu...
void checkOutputs(const std::set< OutputName > &names, const bool supports_material_output=false)
Test that the output names exist.
An output object for writing to the console (screen)
std::vector< T * > getOutputs(const std::vector< OutputName > &names)
Return a vector of objects by names.
void checkVariableOutput(const std::string &task)
Performs check for "outputs" option for Variables and AuxVariables blocks.
void checkConsoleOutput()
Performs Console Output object related checks.
PerfLog perflog("libMesh", #ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING true #else false #endif)
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
void checkPerfLogOutput()
Performs PerfLog output settings.
Action for checking that "outputs" is properly populated for Materials.
static InputParameters validParams()
registerMooseAction("MooseApp", CheckOutputAction, "check_output")
MooseApp & _app
The MOOSE application this is associated with.
static InputParameters validParams()
IntRange< T > make_range(T beg, T end)
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
CheckOutputAction(const InputParameters ¶ms)
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.