www.mooseframework.org
Classes | Functions
Console.h File Reference

Go to the source code of this file.

Classes

class  Console
 An output object for writing to the console (screen) More...
 

Functions

template<>
InputParameters validParams< Console > ()
 

Function Documentation

template<>
InputParameters validParams< Console > ( )

Definition at line 30 of file Console.C.

31 {
32  // Enum for selecting the fit mode for the table when printed to the screen
34 
35  // Get the parameters from the base class
37  params += TableOutput::enableOutputTypes("system_information scalar postprocessor input");
38 
39  // Screen and file output toggles
40  params.addParam<bool>("output_screen", true, "Output to the screen");
41  params.addParam<bool>("output_file", false, "Output to the file");
42  params.addParam<bool>(
43  "show_multiapp_name", false, "Indent multiapp output using the multiapp name");
44 
45  // Table fitting options
46  params.addParam<unsigned int>("max_rows",
47  15,
48  "The maximum number of postprocessor/scalar values "
49  "displayed on screen during a timestep (set to 0 "
50  "for unlimited)");
51  params.addParam<MooseEnum>("fit_mode",
52  pps_fit_mode,
53  "Specifies the wrapping mode for post-processor tables that are "
54  "printed to the screen (ENVIRONMENT: Read \"MOOSE_PPS_WIDTH\" for "
55  "desired width, AUTO: Attempt to determine width automatically "
56  "(serial only), <n>: Desired width");
57 
58  // Verbosity
59  params.addParam<bool>("verbose", false, "Print detailed diagnostics on timestep calculation");
60 
61  // Basic table output controls
62  params.addParam<bool>(
63  "scientific_time", false, "Control the printing of time and dt in scientific notation");
64  params.addParam<unsigned int>(
65  "time_precision",
66  "The number of significant digits that are printed on time related outputs");
67 
68  // Performance Logging
69  params.addParam<bool>("perf_log",
70  false,
71  "If true, all performance logs will be printed. The "
72  "individual log settings will override this option.");
73  params.addParam<unsigned int>(
74  "perf_log_interval", 0, "If set, the performance log will be printed every n time steps");
75  params.addParam<bool>("solve_log", "Toggles the printing of the 'Moose Test Performance' log");
76  params.addParam<bool>(
77  "perf_header", "Print the libMesh performance log header (requires that 'perf_log = true')");
78 
79  params.addParam<bool>(
80  "libmesh_log",
81  true,
82  "Print the libMesh performance log, requires libMesh to be configured with --enable-perflog");
83 
84  // Toggle printing of mesh information on adaptivity steps
85  params.addParam<bool>("print_mesh_changed_info",
86  false,
87  "When true, each time the mesh is changed the mesh information is printed");
88 
89  // Toggle for printing variable norms
90  params.addParam<bool>("outlier_variable_norms",
91  true,
92  "If true, outlier variable norms will be printed after each solve");
93  params.addParam<bool>(
94  "all_variable_norms", false, "If true, all variable norms will be printed after each solve");
95 
96  // Multipliers for coloring of variable residual norms
97  std::vector<Real> multiplier;
98  multiplier.push_back(0.8);
99  multiplier.push_back(2);
100  params.addParam<std::vector<Real>>("outlier_multiplier",
101  multiplier,
102  "Multiplier utilized to determine if a residual norm is an "
103  "outlier. If the variable residual is less than "
104  "multiplier[0] times the total residual it is colored red. "
105  "If the variable residual is less than multiplier[1] times "
106  "the average residual it is colored yellow.");
107 
108  // System information controls
109  MultiMooseEnum info("framework mesh aux nonlinear execution output",
110  "framework mesh aux nonlinear execution");
111  params.addParam<MultiMooseEnum>("system_info",
112  info,
113  "List of information types to display "
114  "('framework', 'mesh', 'aux', 'nonlinear', "
115  "'execution', 'output')");
116 
117  // Advanced group
118  params.addParamNamesToGroup("max_rows verbose show_multiapp_name system_info", "Advanced");
119 
120  // Performance log group
121  params.addParamNamesToGroup("perf_log solve_log perf_header", "Perf Log");
122  params.addParamNamesToGroup("libmesh_log", "Performance Log");
123 
124  // Variable norms group
125  params.addParamNamesToGroup("outlier_variable_norms all_variable_norms outlier_multiplier",
126  "Norms");
127 
128  /*
129  * The following modifies the default behavior from base class parameters. Notice the extra flag
130  * on
131  * the set method. This enables "quiet mode". This is done to allow for the proper detection
132  * of user-modified parameters
133  */
134  // By default set System Information to output on initial
135  params.set<MultiMooseEnum>("execute_system_information_on", /*quiet_mode=*/true) = "initial";
136 
137  // Change the default behavior of 'execute_on' to included nonlinear iterations and failed
138  // timesteps
139  params.set<MultiMooseEnum>("execute_on", /*quiet_mode=*/true)
140  .push_back("initial timestep_begin linear nonlinear failed");
141 
142  // By default postprocessors and scalar are only output at the end of a timestep
143  params.set<MultiMooseEnum>("execute_postprocessors_on", /*quiet_mode=*/true) =
144  "initial timestep_end";
145  params.set<MultiMooseEnum>("execute_vector_postprocessors_on", /*quiet_mode=*/true) =
146  "initial timestep_end";
147  params.set<MultiMooseEnum>("execute_scalars_on", /*quiet_mode=*/true) = "initial timestep_end";
148 
149  return params;
150 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static MooseEnum getWidthModes()
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
static InputParameters enableOutputTypes(const std::string &names=std::string())
A method for enabling individual output type control.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
InputParameters validParams< TableOutput >()
Definition: TableOutput.C:32