Example #1
0
InputParameters validParams<TableOutputter>()
{
  // Fit mode selection Enun
  MooseEnum pps_fit_mode(FormattedTable::getWidthModes());

  // Base class parameters
  InputParameters params = validParams<OutputBase>();

  // Suppressing the output of nodal and elemental variables disables this type of output
  params.suppressParameter<bool>("output_elemental_variables");
  params.suppressParameter<bool>("output_nodal_variables");
  params.suppressParameter<bool>("elemental_as_nodal");
  params.suppressParameter<bool>("scalar_as_nodal");
  params.suppressParameter<bool>("output_input");

  return params;
}
Example #2
0
InputParameters validParams<TableOutput>()
{
  // Fit mode selection Enum
  MooseEnum pps_fit_mode(FormattedTable::getWidthModes());

  // Base class parameters
  InputParameters params = validParams<AdvancedOutput<FileOutput> >();
  params += AdvancedOutput<FileOutput>::enableOutputTypes("postprocessor scalar vector_postprocessor");

  // Option for writing vector_postprocessor time file
  params.addParam<bool>("time_data", false, "When true and VecptorPostprocessor data exists, write a csv file containing the timestep and time information.");

  // Add option for appending file on restart
  params.addParam<bool>("append_restart", false, "Append existing file on restart");

  return params;
}
Example #3
0
InputParameters validParams<TableOutput>()
{
  // Fit mode selection Enum
  MooseEnum pps_fit_mode(FormattedTable::getWidthModes());

  // Base class parameters
  InputParameters params = validParams<PetscOutput>();

  // Suppressing the output of nodal and elemental variables disables this type of output
  params.suppressParameter<bool>("output_elemental_variables");
  params.suppressParameter<bool>("output_nodal_variables");
  params.suppressParameter<bool>("elemental_as_nodal");
  params.suppressParameter<bool>("scalar_as_nodal");
  params.suppressParameter<bool>("output_input");

  // Add option for appending file on restart
  params.addParam<bool>("append_restart", false, "Append existing file on restart");

  return params;
}
Example #4
0
InputParameters validParams<Console>()
{
  // Enum for selecting the fit mode for the table when printed to the screen
  MooseEnum pps_fit_mode(FormattedTable::getWidthModes());

  // Get the parameters from the base class
  InputParameters params = validParams<TableOutputter>();

  // Screen and file output toggles
  params.addParam<bool>("output_screen", true, "Output to the screen");
  params.addParam<bool>("output_file", false, "Output to the file");

  // Table fitting options
  params.addParam<unsigned int>("max_rows", 15, "The maximum number of postprocessor/scalar values displayed on screen during a timestep (set to 0 for unlimited)");
  params.addParam<MooseEnum>("fit_mode", pps_fit_mode, "Specifies the wrapping mode for post-processor tables that are printed to the screen (ENVIRONMENT: Read \"MOOSE_PPS_WIDTH\" for desired width, AUTO: Attempt to determine width automatically (serial only), <n>: Desired width");

  // Timestep verbosity
  params.addParam<bool>("verbose", false, "Print detailed diagnostics on timestep calculation");

  // Basic table output controls
  params.addParam<bool>("use_color", true, "If true, color will be added to the output");

  // Performance Logging
  params.addParam<bool>("perf_log", false, "If true, all performance logs will be printed. The individual log settings will override this option.");
  params.addParam<bool>("setup_log_early", false, "Specifies whether or not the Setup Performance log should be printed before the first time step.  It will still be printed at the end if ""perf_log"" is also enabled and likewise disabled if ""perf_log"" is false");
  params.addParam<bool>("setup_log", "Toggles the printing of the 'Setup Performance' log");
  params.addParam<bool>("solve_log", "Toggles the printing of the 'Moose Test Performance' log");
  params.addParam<bool>("perf_header", "Print the libMesh performance log header (requires that 'perf_log = true')");

#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING
  params.addParam<bool>("libmesh_log", true, "Print the libMesh performance log, requires libMesh to be configured with --enable-perflog");
#endif

  // Toggle for printing variable normals
  params.addParam<bool>("outlier_variable_norms", true, "If true, outlier variable norms will be printed after each solve");
  params.addParam<bool>("all_variable_norms", false, "If true, all variable norms will be printed after each solve");

  // Multipliers for coloring of variable residual norms
  std::vector<Real> multiplier;
  multiplier.push_back(0.8);
  multiplier.push_back(2);
  params.addParam<std::vector<Real> >("outlier_multiplier", multiplier, "Multiplier utilized to determine if a residual norm is an outlier. If the variable residual is less than multiplier[0] times the total residual it is colored red. If the variable residual is less than multiplier[1] times the average residual it is colored yellow.");

  // Advanced group
  params.addParamNamesToGroup("max_rows fit_node verbose", "Advanced");

  // Performance log group
  params.addParamNamesToGroup("perf_log setup_log_early setup_log solve_log perf_header", "Performance Log");
#ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING
  params.addParamNamesToGroup("libmesh_log", "Performance Log");
#endif

  // Variable norms group
  params.addParamNamesToGroup("outlier_variable_norms all_variable_norms outlier_multiplier", "Variable Norms");

  // By default the Console object outputs non linear iterations
  params.set<bool>("nonlinear_residuals") = true;

  // Set outputting of failed solves to true for Console outputters
  params.set<bool>("output_failed") = true;

  return params;
}
Example #5
0
InputParameters
validParams<Console>()
{
  // Enum for selecting the fit mode for the table when printed to the screen
  MooseEnum pps_fit_mode(FormattedTable::getWidthModes());

  // Get the parameters from the base class
  InputParameters params = validParams<TableOutput>();
  params += TableOutput::enableOutputTypes("system_information scalar postprocessor input");

  // Screen and file output toggles
  params.addParam<bool>("output_screen", true, "Output to the screen");
  params.addParam<bool>("output_file", false, "Output to the file");
  params.addParam<bool>(
      "show_multiapp_name", false, "Indent multiapp output using the multiapp name");

  // Table fitting options
  params.addParam<unsigned int>("max_rows",
                                15,
                                "The maximum number of postprocessor/scalar values "
                                "displayed on screen during a timestep (set to 0 "
                                "for unlimited)");
  params.addParam<MooseEnum>("fit_mode",
                             pps_fit_mode,
                             "Specifies the wrapping mode for post-processor tables that are "
                             "printed to the screen (ENVIRONMENT: Read \"MOOSE_PPS_WIDTH\" for "
                             "desired width, AUTO: Attempt to determine width automatically "
                             "(serial only), <n>: Desired width");

  // Verbosity
  params.addParam<bool>("verbose", false, "Print detailed diagnostics on timestep calculation");

  // Basic table output controls
  params.addParam<bool>(
      "scientific_time", false, "Control the printing of time and dt in scientific notation");
  params.addParam<unsigned int>(
      "time_precision",
      "The number of significant digits that are printed on time related outputs");

  // Performance Logging
  params.addParam<bool>("perf_log",
                        false,
                        "If true, all performance logs will be printed. The "
                        "individual log settings will override this option.");
  params.addParam<unsigned int>(
      "perf_log_interval", 0, "If set, the performance log will be printed every n time steps");
  params.addParam<bool>("solve_log", "Toggles the printing of the 'Moose Test Performance' log");
  params.addParam<bool>(
      "perf_header", "Print the libMesh performance log header (requires that 'perf_log = true')");

  params.addParam<bool>(
      "libmesh_log",
      true,
      "Print the libMesh performance log, requires libMesh to be configured with --enable-perflog");

  // Toggle printing of mesh information on adaptivity steps
  params.addParam<bool>("print_mesh_changed_info",
                        false,
                        "When true, each time the mesh is changed the mesh information is printed");

  // Toggle for printing variable norms
  params.addParam<bool>("outlier_variable_norms",
                        true,
                        "If true, outlier variable norms will be printed after each solve");
  params.addParam<bool>(
      "all_variable_norms", false, "If true, all variable norms will be printed after each solve");

  // Multipliers for coloring of variable residual norms
  std::vector<Real> multiplier;
  multiplier.push_back(0.8);
  multiplier.push_back(2);
  params.addParam<std::vector<Real>>("outlier_multiplier",
                                     multiplier,
                                     "Multiplier utilized to determine if a residual norm is an "
                                     "outlier. If the variable residual is less than "
                                     "multiplier[0] times the total residual it is colored red. "
                                     "If the variable residual is less than multiplier[1] times "
                                     "the average residual it is colored yellow.");

  // System information controls
  MultiMooseEnum info("framework mesh aux nonlinear relationship execution output",
                      "framework mesh aux nonlinear relationship execution");
  params.addParam<MultiMooseEnum>("system_info",
                                  info,
                                  "List of information types to display "
                                  "('framework', 'mesh', 'aux', 'nonlinear', 'relationship', "
                                  "'execution', 'output')");

  // Advanced group
  params.addParamNamesToGroup("max_rows verbose show_multiapp_name system_info", "Advanced");

  // Performance log group
  params.addParamNamesToGroup("perf_log solve_log perf_header", "Perf Log");
  params.addParamNamesToGroup("libmesh_log", "Performance Log");

  // Variable norms group
  params.addParamNamesToGroup("outlier_variable_norms all_variable_norms outlier_multiplier",
                              "Norms");

  /*
   * The following modifies the default behavior from base class parameters. Notice the extra flag
   * on
   * the set method. This enables "quiet mode". This is done to allow for the proper detection
   * of user-modified parameters
   */
  // By default set System Information to output on initial
  params.set<ExecFlagEnum>("execute_system_information_on", /*quite_mode=*/true) = EXEC_INITIAL;

  // Change the default behavior of 'execute_on' to included nonlinear iterations and failed
  // timesteps
  params.set<ExecFlagEnum>("execute_on", /*quiet_mode=*/true) = {
      EXEC_INITIAL, EXEC_TIMESTEP_BEGIN, EXEC_LINEAR, EXEC_NONLINEAR, EXEC_FAILED};

  // By default postprocessors and scalar are only output at the end of a timestep
  params.set<ExecFlagEnum>("execute_postprocessors_on", /*quiet_mode=*/true) = {EXEC_INITIAL,
                                                                                EXEC_TIMESTEP_END};
  params.set<ExecFlagEnum>("execute_vector_postprocessors_on",
                           /*quiet_mode=*/true) = {EXEC_INITIAL, EXEC_TIMESTEP_END};
  params.set<ExecFlagEnum>("execute_scalars_on", /*quiet_mode=*/true) = {EXEC_INITIAL,
                                                                         EXEC_TIMESTEP_END};

  return params;
}