31 "show_top_residuals", 0,
"The number of top residuals to print out (0 = no output)");
33 "show_var_residual_norms",
35 "Print the residual norms of the individual solution variables at each nonlinear iteration");
36 params.
addParam<
bool>(
"show_action_dependencies",
false,
"Print out the action dependencies");
37 params.
addParam<
bool>(
"show_actions",
false,
"Print out the actions being executed");
39 "show_parser",
false,
"Shows parser block extraction and debugging information");
41 "show_material_props",
43 "Print out the material properties supplied for each block, face, neighbor, and/or sideset");
44 params.
addParam<
bool>(
"show_chain_control_data",
46 "Print out the chain control data on every time step setup");
47 params.
addParam<
bool>(
"show_controllable",
49 "Print out the controllable parameters from all input parameters");
50 params.
addParam<
bool>(
"show_mesh_meta_data",
false,
"Print out the available mesh meta data");
52 "show_reporters",
false,
"Print out information about the declared and requested Reporters");
54 "show_mesh_generators",
false,
"Print out the mesh generators being executed");
61 "show_execution_order",
63 "Print more information about the order of execution during calculations");
66 "Add a AuxVariable named \"pid\" that shows the processors and partitioning",
67 "pid_aux is deprecated, use output_process_domains");
69 "output_process_domains",
71 "Add a AuxVariable named \"pid\" that shows the partitioning for each process");
73 "show_functors",
false,
"Whether to print information about the functors in the problem");
75 "show_block_restriction",
77 "Print out active objects like variables supplied for each block.");
79 "error_on_residual_nan",
81 "This option applies only to dbg and devel modes. If enabled, residual contributions are " 82 "checked for NaN or Inf values; if found, an error is reported.");
101 if (
_pars.
get<
bool>(
"show_material_props"))
103 const std::string
type =
"MaterialPropertyDebugOutput";
105 _problem->addOutput(
type,
"_moose_material_property_debug_output", params);
109 if (
_pars.
get<
bool>(
"show_var_residual_norms"))
111 const std::string
type =
"VariableResidualNormsDebugOutput";
114 for (
const auto & sys_name :
_problem->getNonlinearSystemNames())
116 params.set<NonlinearSystemName>(
"nl_sys") = sys_name;
117 _problem->addOutput(
type,
"_moose_variable_residual_norms_debug_output_" + sys_name, params);
122 if (
_pars.
get<
unsigned int>(
"show_top_residuals") > 0)
124 const std::string
type =
"TopResidualDebugOutput";
126 params.set<
unsigned int>(
"num_residuals") =
_pars.
get<
unsigned int>(
"show_top_residuals");
127 _problem->addOutput(
type,
"_moose_top_residual_debug_output", params);
131 if (getParam<bool>(
"show_mesh_meta_data"))
136 for (
auto & data : it->second.first)
137 _console <<
" " << data.name() << std::endl;
141 if (getParam<bool>(
"show_reporters"))
143 const std::string
type =
"ReporterDebugOutput";
145 _problem->addOutput(
type,
"_moose_reporter_debug_output", params);
150 _problem->setExecutionPrinting(getParam<ExecFlagEnum>(
"show_execution_order"));
153 if (getParam<bool>(
"output_process_domains") ||
157 paramError(
"output_process_domains",
"Variable with the name \"pid\" already exists");
165 params.
set<AuxVariableName>(
"variable") =
"pid";
167 _problem->addAuxKernel(
"ProcessorIDAux",
"pid_aux", params);
171 if (getParam<bool>(
"show_functors"))
172 _problem->setFunctorOutput(getParam<bool>(
"show_functors"));
175 if (getParam<bool>(
"show_chain_control_data"))
176 _problem->setChainControlDataOutput(
true);
181 if (block_restriction_scope.
isValid() && !block_restriction_scope.
contains(
"none"))
183 const std::string
type =
"BlockRestrictionDebugOutput";
186 _problem->addOutput(
type,
"_moose_block_restriction_debug_output", params);
190 if (getParam<bool>(
"show_controllable"))
192 const std::string
type =
"ControlOutput";
194 _problem->addOutput(
type,
"_moose_controllable_debug_output", params);
198 if (getParam<bool>(
"error_on_residual_nan"))
201 mooseError(
"The parameter 'error_on_residual_nan' may only be set to 'true' for 'dbg' and " 204 _problem->setCheckResidualForNans(
true);
const ExecFlagType EXEC_TRANSFER
const ExecFlagType EXEC_FAILED
A MultiMooseEnum object to hold "execute_on" flags.
void setVerbose(const bool verbose)
Set the verbose flag.
auto getRestartableDataMapBegin()
Iterator based access to the extra RestartableDataMap objects; see Checkpoint.C for use case...
const InputParameters & _pars
The object's parameters.
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Factory & _factory
The Factory associated with the MooseApp.
static const RestartableDataMapName MESH_META_DATA
virtual bool isValid() const override
IsValid.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
void showActions(bool state=true)
This method sets a Boolean which is used to show information about action execution of various wareho...
void showActionDependencies(bool state=true)
This method sets a Boolean which is used to print information about action dependencies before variou...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
const ExecFlagType EXEC_ALWAYS
registerMooseAction("MooseApp", SetupDebugAction, "add_output")
SetupDebugAction(const InputParameters ¶meters)
ExecFlagEnum getDefaultExecFlagEnum()
bool contains(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
void showParser(bool state=true)
This method sets a Boolean which is used to show debugging information when actions are inserted in t...
static InputParameters validParams()
const ExecFlagType EXEC_TIMESTEP_BEGIN
const std::string & type() const
Get the type of this class.
static std::string variableType(const libMesh::FEType &fe_type, const bool is_fv=false, const bool is_array=false)
Determines a variable type.
MooseApp & _app
The MOOSE application this is associated with.
auto getRestartableDataMapEnd()
static MultiMooseEnum getScopes(std::string default_scopes="")
Get the supported scopes of output (e.g., variables, etc.)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
MeshGeneratorSystem & getMeshGeneratorSystem()
Gets the system that manages the MeshGenerators.
static InputParameters validParams()
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
const ExecFlagType EXEC_INITIAL