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.");
78 params.
addParam<
bool>(
"show_block_restriction_groups",
80 "Print groups of objects with identical block restrictions.");
81 params.
addParam<
bool>(
"show_boundary_restriction_groups",
83 "Print groups of objects with identical boundary restrictions.");
85 "error_on_residual_nan",
87 "This option applies only to dbg and devel modes. If enabled, residual contributions are "
88 "checked for NaN or Inf values; if found, an error is reported.");
107 if (
_pars.
get<
bool>(
"show_material_props"))
109 const std::string
type =
"MaterialPropertyDebugOutput";
111 _problem->addOutput(
type,
"_moose_material_property_debug_output", params);
115 if (
_pars.
get<
bool>(
"show_var_residual_norms"))
117 const std::string
type =
"VariableResidualNormsDebugOutput";
120 for (
const auto & sys_name :
_problem->getNonlinearSystemNames())
122 params.set<NonlinearSystemName>(
"nl_sys") = sys_name;
123 _problem->addOutput(
type,
"_moose_variable_residual_norms_debug_output_" + sys_name, params);
128 if (
_pars.
get<
unsigned int>(
"show_top_residuals") > 0)
130 const std::string
type =
"TopResidualDebugOutput";
132 params.set<
unsigned int>(
"num_residuals") =
_pars.
get<
unsigned int>(
"show_top_residuals");
133 _problem->addOutput(
type,
"_moose_top_residual_debug_output", params);
137 if (getParam<bool>(
"show_mesh_meta_data"))
142 for (
auto & data : it->second.first)
143 _console <<
" " << data.name() << std::endl;
147 if (getParam<bool>(
"show_reporters"))
149 const std::string
type =
"ReporterDebugOutput";
151 _problem->addOutput(
type,
"_moose_reporter_debug_output", params);
156 _problem->setExecutionPrinting(getParam<ExecFlagEnum>(
"show_execution_order"));
159 if (getParam<bool>(
"output_process_domains") ||
163 paramError(
"output_process_domains",
"Variable with the name \"pid\" already exists");
171 params.
set<AuxVariableName>(
"variable") =
"pid";
173 _problem->addAuxKernel(
"ProcessorIDAux",
"pid_aux", params);
177 if (getParam<bool>(
"show_functors"))
178 _problem->setFunctorOutput(getParam<bool>(
"show_functors"));
181 if (getParam<bool>(
"show_chain_control_data"))
182 _problem->setChainControlDataOutput(
true);
187 const bool show_block_restriction_map =
188 block_restriction_scope.
isValid() && !block_restriction_scope.
contains(
"none");
189 const bool show_block_restriction_groups = getParam<bool>(
"show_block_restriction_groups");
190 const bool show_boundary_restriction_groups = getParam<bool>(
"show_boundary_restriction_groups");
191 if (show_block_restriction_map || show_block_restriction_groups ||
192 show_boundary_restriction_groups)
194 const std::string
type =
"BlockRestrictionDebugOutput";
197 params.set<
bool>(
"show_block_restriction_map") = show_block_restriction_map;
198 params.set<
bool>(
"show_block_restriction_groups") = show_block_restriction_groups;
199 params.set<
bool>(
"show_boundary_restriction_groups") = show_boundary_restriction_groups;
200 _problem->addOutput(
type,
"_moose_block_restriction_debug_output", params);
204 if (getParam<bool>(
"show_controllable"))
206 const std::string
type =
"ControlOutput";
208 _problem->addOutput(
type,
"_moose_controllable_debug_output", params);
212 if (getParam<bool>(
"error_on_residual_nan"))
215 mooseError(
"The parameter 'error_on_residual_nan' may only be set to 'true' for 'dbg' and "
218 _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.
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()
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...