29 "show_top_residuals", 0,
"The number of top residuals to print out (0 = no output)");
31 "show_var_residual_norms",
33 "Print the residual norms of the individual solution variables at each nonlinear iteration");
34 params.
addParam<
bool>(
"show_action_dependencies",
false,
"Print out the action dependencies");
35 params.
addParam<
bool>(
"show_actions",
false,
"Print out the actions being executed");
37 "show_parser",
false,
"Shows parser block extraction and debugging information");
39 "show_material_props",
41 "Print out the material properties supplied for each block, face, neighbor, and/or sideset");
42 params.
addParam<
bool>(
"show_chain_control_data",
44 "Print out the chain control data on every time step setup");
45 params.
addParam<
bool>(
"show_controllable",
47 "Print out the controllable parameters from all input parameters");
48 params.
addParam<
bool>(
"show_mesh_meta_data",
false,
"Print out the available mesh meta data");
50 "show_reporters",
false,
"Print out information about the declared and requested Reporters");
52 "show_mesh_generators",
false,
"Print out the mesh generators being executed");
59 "show_execution_order",
61 "Print more information about the order of execution during calculations");
64 "Add a AuxVariable named \"pid\" that shows the processors and partitioning",
65 "pid_aux is deprecated, use output_process_domains");
67 "output_process_domains",
69 "Add a AuxVariable named \"pid\" that shows the partitioning for each process");
71 "show_functors",
false,
"Whether to print information about the functors in the problem");
73 "show_block_restriction",
75 "Print out active objects like variables supplied for each block.");
76 params.
addParam<
bool>(
"show_block_restriction_groups",
78 "Print groups of objects with identical block restrictions.");
79 params.
addParam<
bool>(
"show_boundary_restriction_groups",
81 "Print groups of objects with identical boundary restrictions.");
83 "error_on_residual_nan",
85 "This option applies only to dbg and devel modes. If enabled, residual contributions are "
86 "checked for NaN or Inf values; if found, an error is reported.");
105 if (
_pars.
get<
bool>(
"show_material_props"))
107 const std::string
type =
"MaterialPropertyDebugOutput";
109 _problem->addOutput(
type,
"_moose_material_property_debug_output", params);
113 if (
_pars.
get<
bool>(
"show_var_residual_norms"))
115 const std::string
type =
"VariableResidualNormsDebugOutput";
118 for (
const auto & sys_name :
_problem->getNonlinearSystemNames())
120 params.
set<NonlinearSystemName>(
"nl_sys") = sys_name;
121 _problem->addOutput(
type,
"_moose_variable_residual_norms_debug_output_" + sys_name, params);
126 if (
_pars.
get<
unsigned int>(
"show_top_residuals") > 0)
128 const std::string
type =
"TopResidualDebugOutput";
130 params.
set<
unsigned int>(
"num_residuals") =
_pars.
get<
unsigned int>(
"show_top_residuals");
131 _problem->addOutput(
type,
"_moose_top_residual_debug_output", params);
135 if (getParam<bool>(
"show_mesh_meta_data"))
140 for (
auto & data : it->second.first)
141 _console <<
" " << data.name() << std::endl;
145 if (getParam<bool>(
"show_reporters"))
147 const std::string
type =
"ReporterDebugOutput";
149 _problem->addOutput(
type,
"_moose_reporter_debug_output", params);
154 _problem->setExecutionPrinting(getParam<ExecFlagEnum>(
"show_execution_order"));
157 if (getParam<bool>(
"output_process_domains") ||
161 paramError(
"output_process_domains",
"Variable with the name \"pid\" already exists");
163 auto fe_type = FEType(CONSTANT, MONOMIAL);
169 params.
set<AuxVariableName>(
"variable") =
"pid";
171 _problem->addAuxKernel(
"ProcessorIDAux",
"pid_aux", params);
175 if (getParam<bool>(
"show_functors"))
176 _problem->setFunctorOutput(getParam<bool>(
"show_functors"));
179 if (getParam<bool>(
"show_chain_control_data"))
180 _problem->setChainControlDataOutput(
true);
185 const bool show_block_restriction_map =
186 block_restriction_scope.
isValid() && !block_restriction_scope.
contains(
"none");
187 const bool show_block_restriction_groups = getParam<bool>(
"show_block_restriction_groups");
188 const bool show_boundary_restriction_groups = getParam<bool>(
"show_boundary_restriction_groups");
189 if (show_block_restriction_map || show_block_restriction_groups ||
190 show_boundary_restriction_groups)
192 const std::string
type =
"BlockRestrictionDebugOutput";
195 params.set<
bool>(
"show_block_restriction_map") = show_block_restriction_map;
196 params.set<
bool>(
"show_block_restriction_groups") = show_block_restriction_groups;
197 params.set<
bool>(
"show_boundary_restriction_groups") = show_boundary_restriction_groups;
198 _problem->addOutput(
type,
"_moose_block_restriction_debug_output", params);
202 if (getParam<bool>(
"show_controllable"))
204 const std::string
type =
"ControlOutput";
206 _problem->addOutput(
type,
"_moose_controllable_debug_output", params);
210 if (getParam<bool>(
"error_on_residual_nan"))
213 mooseError(
"The parameter 'error_on_residual_nan' may only be set to 'true' for 'dbg' and "
216 _problem->setCheckResidualForNans(
true);
const ExecFlagType EXEC_TRANSFER
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_ALWAYS
const ExecFlagType EXEC_INITIAL
const ExecFlagType EXEC_FAILED
registerMooseAction("MooseApp", SetupDebugAction, "add_output")
void showActionDependencies(bool state=true)
This method sets a Boolean which is used to print information about action dependencies before variou...
void showParser(bool state=true)
This method sets a Boolean which is used to show debugging information when actions are inserted in t...
void showActions(bool state=true)
This method sets a Boolean which is used to show information about action execution of various wareho...
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.
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
static std::string variableType(const libMesh::FEType &fe_type, const bool is_fv=false, const bool is_array=false)
Determines a variable type.
static MultiMooseEnum getScopes(std::string default_scopes="")
Get the supported scopes of output (e.g., variables, etc.)
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
A MultiMooseEnum object to hold "execute_on" flags.
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
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.
auto getRestartableDataMapEnd()
MeshGeneratorSystem & getMeshGeneratorSystem()
Gets the system that manages the MeshGenerators.
static const RestartableDataMapName MESH_META_DATA
const InputParameters & parameters() const
Get the parameters of the object.
const std::string & type() const
Get the type of this class.
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 ...
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...
const InputParameters & _pars
The object's parameters.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
bool contains(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
virtual bool isValid() const override
IsValid.
Factory & _factory
The Factory associated with the MooseApp.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
static InputParameters validParams()
SetupDebugAction(const InputParameters ¶meters)
ExecFlagEnum getDefaultExecFlagEnum()