www.mooseframework.org
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
Console Class Reference

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

#include <Console.h>

Inheritance diagram for Console:
[legend]

Public Member Functions

 Console (const InputParameters &parameters)
 Class constructor. More...
 
virtual ~Console ()
 Destructor. More...
 
virtual void initialSetup () override
 Initial setup function Prints the system information, this is done here so that the system information is printed prior to any PETSc solve information. More...
 
virtual void output (const ExecFlagType &type) override
 Customizes the order of output for the various components as well as adds additional output such as timestep information and nonlinear/linear residual information. More...
 
virtual std::string filename () override
 Creates the output file name Appends the user-supplied 'file_base' input parameter with a '.txt' extension. More...
 
void meshChanged () override
 Performs console related printing when the mesh is changed. More...
 
MultiMooseEnumsystemInfoFlags ()
 Return system information flags. More...
 
void clear ()
 
virtual bool hasOutput ()
 Returns true if any of the other has methods return true. More...
 
bool hasOutput (const ExecFlagType &type)
 Tests that any output exist for the given output type. More...
 
bool hasNodalVariableOutput ()
 Returns true if there exists nodal nonlinear variables for output. More...
 
const std::set< std::string > & getNodalVariableOutput ()
 The list of nodal nonlinear variables names that are set for output. More...
 
bool hasElementalVariableOutput ()
 Returns true if there exists elemental nonlinear variables for output. More...
 
const std::set< std::string > & getElementalVariableOutput ()
 The list of elemental nonlinear variables names that are set for output. More...
 
bool hasScalarOutput ()
 Returns true if there exists scalar variables for output. More...
 
const std::set< std::string > & getScalarOutput ()
 The list of scalar variables names that are set for output. More...
 
bool hasPostprocessorOutput ()
 Returns true if there exists postprocessors for output. More...
 
const std::set< std::string > & getPostprocessorOutput ()
 The list of postprocessor names that are set for output. More...
 
bool hasVectorPostprocessorOutput ()
 Returns true if there exists VectorPostprocessors for output. More...
 
const std::set< std::string > & getVectorPostprocessorOutput ()
 The list of VectorPostprocessor names that are set for output. More...
 
const OutputOnWarehouseadvancedExecuteOn () const
 Get the current advanced 'execute_on' selections for display. More...
 
void setFileNumber (unsigned int num)
 Sets the file number manually. More...
 
unsigned int getFileNumber ()
 Return the current file number for this outputter. More...
 
virtual Real time () override
 Get the output time. More...
 
virtual Real timeOld ()
 Get the old output time. More...
 
virtual Real dt ()
 Get the current time step size. More...
 
virtual Real dtOld ()
 Get old time step size. More...
 
virtual int timeStep ()
 Get the current time step. More...
 
const unsigned int & interval () const
 Get the output interval. More...
 
const MultiMooseEnumexecuteOn () const
 Get the current 'execute_on' selections for display. More...
 
bool isAdvanced ()
 Returns true if this object is an AdvancedOutput object. More...
 
void allowOutput (bool state)
 Method for controlling the allow output state. More...
 
virtual void outputStep (const ExecFlagType &type)
 A single call to this function should output all the necessary data for a single timestep. More...
 
const std::string & type () const
 Get the type of this object. More...
 
const std::string & name () const
 Get the name of the object. More...
 
const InputParametersparameters () const
 Get the parameters of the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid. More...
 
MooseAppgetMooseApp () const
 Get the MooseApp this object is associated with. More...
 
virtual bool enabled () const
 Return the enabled status of the object. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void mooseError (Args &&... args) const
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
virtual void timestepSetup ()
 Gets called at the beginning of the timestep before this object is asked to do its job. More...
 
virtual void jacobianSetup ()
 Gets called just before the Jacobian is computed and before this object is asked to do its job. More...
 
virtual void residualSetup ()
 Gets called just before the residual is computed and before this object is asked to do its job. More...
 
virtual void subdomainSetup ()
 Gets called when the subdomain changes (i.e. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the execute on MultiMooseEnum for this object. More...
 
virtual const std::vector< ExecFlagType > & execFlags () const
 (DEPRECATED) Get the execution flag for the object TODO: ExecFlagType More...
 
ExecFlagType execBitFlags () const
 (DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType More...
 

Static Public Member Functions

static void petscSetupOutput ()
 Output string for setting up PETSC output. More...
 
static InputParameters enableOutputTypes (const std::string &names=std::string())
 A method for enabling individual output type control. More...
 
static std::string getOutputFileBase (const MooseApp &app, std::string suffix="_out")
 Returns the default output file base. More...
 
static MultiMooseEnum getExecuteOptions (std::string default_type="")
 (DEPRECATED) Return the support output execution times More...
 
static ExecFlagEnum getExecuteOptions ()
 (DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType More...
 
static ExecFlagEnum getDefaultExecFlagEnum ()
 Return an ExecFlagEnum object with the available execution flags for Output objects. More...
 
static void addDeprecatedInputParameters (InputParameters &params)
 A static helper for injecting deprecated parameters. More...
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Protected Member Functions

void init ()
 Adds the printing of system information to the init() method. More...
 
virtual void outputInput () override
 Print the input file at the beginning of the simulation. More...
 
virtual void outputScalarVariables () override
 Prints the aux scalar variables table to the screen. More...
 
virtual void outputPostprocessors () override
 Prints the postprocessor table to the screen. More...
 
virtual void outputVectorPostprocessors () override
 Not implemented. More...
 
virtual void outputSystemInformation () override
 Print system information. More...
 
std::string outputNorm (const Real &old_norm, const Real &norm)
 A helper function for outputting norms in color. More...
 
void writeTimestepInformation ()
 Prints the time step information for the screen output. More...
 
void write (std::string message, bool indent=true)
 Write message to screen and/or file. More...
 
void writeStreamToFile (bool append=true)
 Write the file stream to the file. More...
 
void writeVariableNorms ()
 Print the L2-norms for each variable. More...
 
virtual bool shouldOutput (const ExecFlagType &type)
 Handles logic for determining if a step should be output. More...
 
virtual void outputNodalVariables ()
 Performs output of nodal nonlinear variables The child class must define this method to output the nonlinear variables as desired. More...
 
virtual void outputElementalVariables ()
 Performs output of elemental nonlinear variables The child class must define this method to output the nonlinear variables as desired. More...
 
bool checkFilename ()
 Checks the filename for output Checks the output against the 'output_if_base_contians' list. More...
 
virtual bool onInterval ()
 Returns true if the output interval is satisfied. More...
 
template<typename T >
T & declareRestartableData (std::string data_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, void *context)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithContext (std::string data_name, const T &init_value, void *context)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRecoverableData (std::string data_name)
 Declare a piece of data as "recoverable". More...
 
template<typename T >
T & declareRecoverableData (std::string data_name, const T &init_value)
 Declare a piece of data as "restartable" and initialize it. More...
 
template<typename T >
T & declareRestartableDataWithObjectName (std::string data_name, std::string object_name)
 Declare a piece of data as "restartable". More...
 
template<typename T >
T & declareRestartableDataWithObjectNameWithContext (std::string data_name, std::string object_name, void *context)
 Declare a piece of data as "restartable". More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 

Protected Attributes

unsigned int _max_rows
 The max number of table rows. More...
 
MooseEnum _fit_mode
 The FormattedTable fit mode. More...
 
bool _scientific_time
 Toggle for outputting time in time and dt in scientific notation. More...
 
bool _write_file
 Flag for controlling outputting console information to a file. More...
 
bool _write_screen
 Flag for controlling outputting console information to screen. More...
 
bool _verbose
 Flag for writing detailed time step information. More...
 
std::stringstream _file_output_stream
 Stream for storing information to be written to a file. More...
 
bool _perf_log
 State for all performance logging. More...
 
unsigned int _perf_log_interval
 The interval at which the performance log is printed. More...
 
bool _solve_log
 State for solve performance log. More...
 
bool _libmesh_log
 Control the display libMesh performance log. More...
 
bool _perf_header
 State for the performance log header information. More...
 
bool _all_variable_norms
 Flag for writing all variable norms. More...
 
bool _outlier_variable_norms
 Flag for writing outlier variable norms. More...
 
std::vector< Real > _outlier_multiplier
 Multipliers for coloring variable residual norms (default [2, 0.8]) More...
 
unsigned int _precision
 Number of significant digits. More...
 
bool _tables_restartable
 Flag for allowing all table data to become restartable. More...
 
FormattedTable_postprocessor_table
 Table containing postprocessor data. More...
 
std::map< std::string, FormattedTable_vector_postprocessor_tables
 Formatted tables for outputting vector postprocessor data. One per VectorPostprocessor. More...
 
std::map< std::string, FormattedTable > & _vector_postprocessor_time_tables
 Table for vector postprocessor time data. More...
 
FormattedTable_scalar_table
 Table containing scalar aux variables. More...
 
FormattedTable_all_data_table
 Table containing postprocessor values and scalar aux variables. More...
 
const Real _new_row_tol
 Tolerance used when deciding whether or not to add a new row to the table. More...
 
const bool _time_data
 Enable/disable VecptorPostprocessor time data file. More...
 
const bool _time_column
 Enable/disable output of time column for Postprocessors. More...
 
bool _elemental_as_nodal
 Flags to control nodal output. More...
 
bool _scalar_as_nodal
 
std::string _file_base
 The base filename from the input paramaters. More...
 
unsigned int & _file_num
 A file number counter, initialized to 0 (this must be controlled by the child class, see Exodus) More...
 
unsigned int _padding
 Number of digits to pad the extensions. More...
 
std::vector< std::string > _output_if_base_contains
 Storage for 'output_if_base_contains'. More...
 
Real _norm
 Current norm returned from PETSc. More...
 
PetscInt _nonlinear_iter
 Current non-linear iteration returned from PETSc. More...
 
PetscInt _linear_iter
 Current linear iteration returned from PETSc. More...
 
FEProblemBase_problem_ptr
 Pointer the the FEProblemBase object for output object (use this) More...
 
bool _transient
 Transient flag (true = transient) More...
 
bool _use_displaced
 Flag for using displaced mesh. More...
 
EquationSystems * _es_ptr
 Reference the the libMesh::EquationSystems object that contains the data. More...
 
MooseMesh_mesh_ptr
 A convenience pointer to the current mesh (reference or displaced depending on "use_displaced") More...
 
bool _sequence
 Flag for forcing call to outputSetup() with every call to output() (restartable) More...
 
ExecFlagEnum _execute_on
 The common Execution types; this is used as the default execution type for everything except system information and input. More...
 
Real & _time
 The current time for output purposes. More...
 
Real & _time_old
 The old time. More...
 
int & _t_step
 The current time step. More...
 
Real & _dt
 Time step delta. More...
 
Real & _dt_old
 Old time step delta. More...
 
unsigned int _num
 The number of outputs written. More...
 
const unsigned int _interval
 The output time step interval. More...
 
std::set< Real > _sync_times
 Sync times for this outputter. More...
 
Real _start_time
 Start outputting time. More...
 
Real _end_time
 End outputting time. More...
 
int _start_step
 Start outputting at this time step. More...
 
int _end_step
 End outputting at this time step. More...
 
Real _t_tol
 Time checking tolerance. More...
 
bool _sync_only
 Flag for only executing at sync times. More...
 
bool _initialized
 True if init() has been called. More...
 
bool _allow_output
 Flag for disabling output. More...
 
bool _is_advanced
 Flag for advanced output testing. More...
 
OutputOnWarehouse _advanced_execute_on
 Storage for the individual component execute flags. More...
 
PerfID _output_step_timer
 Timers. More...
 
const InputParameters_pars
 Parameters of this object, references the InputParameters stored in the InputParametersWarehouse. More...
 
MooseApp_app
 The MooseApp this object is associated with. More...
 
const std::string & _type
 The type of this object (the Class name) More...
 
const std::string & _name
 The name of this object, reference to value stored in InputParameters. More...
 
const bool & _enabled
 Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects. More...
 
FEProblemBase_mci_feproblem
 Reference to FEProblemBase instance. More...
 
const ExecFlagEnum_execute_enum
 Execute settings for this oejct. More...
 
const std::vector< ExecFlagType_exec_flags
 (DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType More...
 
const ExecFlagType_current_execute_flag
 Reference to FEProblemBase. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 

Private Member Functions

void mooseConsole (const std::string &message)
 Add a message to the output streams. More...
 

Private Attributes

const std::ostringstream & _console_buffer
 Reference to cached messages from calls to _console. More...
 
Real _old_linear_norm
 Storage for the old linear residual (needed for color output and only when used when printing to the screen) More...
 
Real _old_nonlinear_norm
 Storage for the old non linear residual (needed for color output and only when used when printing to the screen) More...
 
bool _print_mesh_changed_info
 Flag for printing mesh information when the mesh changes. More...
 
MultiMooseEnum _system_info_flags
 Flags for controlling the what simulations information is shown. More...
 
bool _allow_changing_sysinfo_flag
 A boolean for protecting _system_info_flags from being changed undesirably. More...
 

Friends

class OutputWarehouse
 

Detailed Description

An output object for writing to the console (screen)

Definition at line 25 of file Console.h.

Constructor & Destructor Documentation

◆ Console()

Console::Console ( const InputParameters parameters)

Class constructor.

Definition at line 159 of file Console.C.

161  _max_rows(getParam<unsigned int>("max_rows")),
162  _fit_mode(getParam<MooseEnum>("fit_mode")),
163  _scientific_time(getParam<bool>("scientific_time")),
164  _write_file(getParam<bool>("output_file")),
165  _write_screen(getParam<bool>("output_screen")),
166  _verbose(getParam<bool>("verbose")),
167  _perf_log(getParam<bool>("perf_log")),
168  _perf_log_interval(getParam<unsigned int>("perf_log_interval")),
169  _solve_log(isParamValid("solve_log") ? getParam<bool>("solve_log") : _perf_log),
170  _libmesh_log(getParam<bool>("libmesh_log")),
171  _perf_header(isParamValid("perf_header") ? getParam<bool>("perf_header") : _perf_log),
172  _all_variable_norms(getParam<bool>("all_variable_norms")),
173  _outlier_variable_norms(getParam<bool>("outlier_variable_norms")),
174  _outlier_multiplier(getParam<std::vector<Real>>("outlier_multiplier")),
175  _precision(isParamValid("time_precision") ? getParam<unsigned int>("time_precision") : 0),
177  _old_linear_norm(std::numeric_limits<Real>::max()),
178  _old_nonlinear_norm(std::numeric_limits<Real>::max()),
179  _print_mesh_changed_info(getParam<bool>("print_mesh_changed_info")),
180  _system_info_flags(getParam<MultiMooseEnum>("system_info")),
182 {
183  // Apply the special common console flags (print_...)
185  const auto & actions = awh.getActionListByName("common_output");
186  mooseAssert(actions.size() == 1, "Should be only one common_output Action");
187  Action * common_action = *actions.begin();
188 
189  // Honor the 'print_linear_residuals' option, only if 'execute_on' has not been set by the user
190  if (!parameters.isParamSetByUser("execute_on"))
191  {
192  if (common_action->getParam<bool>("print_linear_residuals"))
193  _execute_on.push_back("linear");
194  else
195  _execute_on.erase("linear");
196  }
197 
198  if (!_pars.isParamSetByUser("perf_log") && common_action->getParam<bool>("print_perf_log"))
199  {
200  _perf_log = true;
201  _solve_log = true;
202  }
203 
204  // Append the common 'execute_on' to the setting for this object
205  // This is unique to the Console object, all other objects inherit from the common options
206  const ExecFlagEnum & common_execute_on = common_action->getParam<ExecFlagEnum>("execute_on");
207  for (auto & mme : common_execute_on)
208  _execute_on.push_back(mme);
209 
210  // If --show-outputs is used, enable it
211  if (_app.getParam<bool>("show_outputs"))
212  _system_info_flags.push_back("output");
213 }
bool _libmesh_log
Control the display libMesh performance log.
Definition: Console.h:184
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
ExecFlagEnum _execute_on
The common Execution types; this is used as the default execution type for everything except system i...
Definition: Output.h:192
unsigned int _precision
Number of significant digits.
Definition: Console.h:199
MooseEnum _fit_mode
The FormattedTable fit mode.
Definition: Console.h:157
bool _all_variable_norms
Flag for writing all variable norms.
Definition: Console.h:190
bool _verbose
Flag for writing detailed time step information.
Definition: Console.h:169
bool _write_screen
Flag for controlling outputting console information to screen.
Definition: Console.h:166
const std::ostringstream & _console_buffer
Reference to cached messages from calls to _console.
Definition: Console.h:215
Storage for action instances.
const std::list< Action * > & getActionListByName(const std::string &task) const
Retrieve a constant list of Action pointers associated with the passed in task.
bool _allow_changing_sysinfo_flag
A boolean for protecting _system_info_flags from being changed undesirably.
Definition: Console.h:233
Base class for actions.
Definition: Action.h:36
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:185
bool _outlier_variable_norms
Flag for writing outlier variable norms.
Definition: Console.h:193
bool _perf_header
State for the performance log header information.
Definition: Console.h:187
MultiMooseEnum _system_info_flags
Flags for controlling the what simulations information is shown.
Definition: Console.h:227
TableOutput(const InputParameters &parameters)
Class constructor.
Definition: TableOutput.C:60
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
bool _solve_log
State for solve performance log.
Definition: Console.h:181
unsigned int _perf_log_interval
The interval at which the performance log is printed.
Definition: Console.h:178
ActionWarehouse & actionWarehouse()
Definition: MooseApp.h:139
std::ostringstream & consoleBuffer()
The buffered messages stream for Console objects.
void erase(const std::string &names)
Un-assign a value.
unsigned int _max_rows
The max number of table rows.
Definition: Console.h:154
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
Real _old_nonlinear_norm
Storage for the old non linear residual (needed for color output and only when used when printing to ...
Definition: Console.h:221
bool _write_file
Flag for controlling outputting console information to a file.
Definition: Console.h:163
bool _perf_log
State for all performance logging.
Definition: Console.h:175
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
std::vector< Real > _outlier_multiplier
Multipliers for coloring variable residual norms (default [2, 0.8])
Definition: Console.h:196
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:903
void push_back(const std::string &names)
Insert operators Operator to insert (push_back) values into the enum.
Real _old_linear_norm
Storage for the old linear residual (needed for color output and only when used when printing to the ...
Definition: Console.h:218
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
bool _scientific_time
Toggle for outputting time in time and dt in scientific notation.
Definition: Console.h:160
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:81
bool _print_mesh_changed_info
Flag for printing mesh information when the mesh changes.
Definition: Console.h:224
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1056

◆ ~Console()

Console::~Console ( )
virtual

Destructor.

Definition at line 215 of file Console.C.

216 {
217  // Write the libMesh log
218  if (_libmesh_log)
219  write(libMesh::perflog.get_perf_info(), false);
220 
221  // Write the file output stream
223 
224  // Disable logging so that the destructor in libMesh doesn't print
225  Moose::perf_log.disable_logging();
226  libMesh::perflog.disable_logging();
227 }
bool _libmesh_log
Control the display libMesh performance log.
Definition: Console.h:184
void write(std::string message, bool indent=true)
Write message to screen and/or file.
Definition: Console.C:617
PerfLog perf_log
Perflog to be used by applications.
void writeStreamToFile(bool append=true)
Write the file stream to the file.
Definition: Console.C:349

Member Function Documentation

◆ addDeprecatedInputParameters()

static void Output::addDeprecatedInputParameters ( InputParameters params)
staticinherited

A static helper for injecting deprecated parameters.

◆ advancedExecuteOn()

const OutputOnWarehouse & AdvancedOutput::advancedExecuteOn ( ) const
virtualinherited

Get the current advanced 'execute_on' selections for display.

Reimplemented from Output.

Definition at line 763 of file AdvancedOutput.C.

764 {
765  return _advanced_execute_on;
766 }
OutputOnWarehouse _advanced_execute_on
Storage for the individual component execute flags.
Definition: Output.h:249

◆ allowOutput()

void Output::allowOutput ( bool  state)
inlineinherited

Method for controlling the allow output state.

Parameters
stateThe state to set the allow flag to

Definition at line 128 of file Output.h.

128 { _allow_output = state; }
bool _allow_output
Flag for disabling output.
Definition: Output.h:240

◆ checkFilename()

bool FileOutput::checkFilename ( )
protectedinherited

Checks the filename for output Checks the output against the 'output_if_base_contians' list.

Returns
Returns true if the filename is valid for output

Definition at line 147 of file FileOutput.C.

Referenced by FileOutput::shouldOutput(), and AdvancedOutput::shouldOutput().

148 {
149  // Return true if 'output_if_base_contains' is not utilized
150  if (_output_if_base_contains.empty())
151  return true;
152 
153  // Assumed output is false
154  bool output = false;
155 
156  // Loop through each string in the list
157  for (const auto & search_string : _output_if_base_contains)
158  {
159  // Search for the string in the file base, if found set the output to true and break the loop
160  if (_file_base.find(search_string) != std::string::npos)
161  {
162  output = true;
163  break;
164  }
165  }
166 
167  // Return the value
168  return output;
169 }
virtual void output(const ExecFlagType &type)=0
Overload this function with the desired output activities.
std::string _file_base
The base filename from the input paramaters.
Definition: FileOutput.h:82
std::vector< std::string > _output_if_base_contains
Storage for &#39;output_if_base_contains&#39;.
Definition: FileOutput.h:91

◆ clear()

void TableOutput::clear ( )
inherited

Definition at line 221 of file TableOutput.C.

222 {
224  for (auto & pair : _vector_postprocessor_tables)
225  pair.second.clear();
226  for (auto & pair : _vector_postprocessor_time_tables)
227  pair.second.clear();
230 }
FormattedTable & _postprocessor_table
Table containing postprocessor data.
Definition: TableOutput.h:67
FormattedTable & _scalar_table
Table containing scalar aux variables.
Definition: TableOutput.h:76
FormattedTable & _all_data_table
Table containing postprocessor values and scalar aux variables.
Definition: TableOutput.h:79
std::map< std::string, FormattedTable > _vector_postprocessor_tables
Formatted tables for outputting vector postprocessor data. One per VectorPostprocessor.
Definition: TableOutput.h:70
std::map< std::string, FormattedTable > & _vector_postprocessor_time_tables
Table for vector postprocessor time data.
Definition: TableOutput.h:73

◆ declareRecoverableData() [1/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "recoverable".

This means that in the event of a recovery this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 269 of file Restartable.h.

270 {
271  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
272 
273  registerRecoverableDataOnApp(full_name);
274 
275  return declareRestartableDataWithContext<T>(data_name, nullptr);
276 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRecoverableData() [2/2]

template<typename T >
T & Restartable::declareRecoverableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

Note - this data will NOT be restored on Restart!

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data

Definition at line 280 of file Restartable.h.

281 {
282  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
283 
284  registerRecoverableDataOnApp(full_name);
285 
286  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
287 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
void registerRecoverableDataOnApp(std::string name)
Helper function for actually registering the restartable data.
Definition: Restartable.C:54

◆ declareRestartableData() [1/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)

Definition at line 202 of file Restartable.h.

203 {
204  return declareRestartableDataWithContext<T>(data_name, nullptr);
205 }

◆ declareRestartableData() [2/2]

template<typename T >
T & Restartable::declareRestartableData ( std::string  data_name,
const T &  init_value 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data

Definition at line 209 of file Restartable.h.

210 {
211  return declareRestartableDataWithContext<T>(data_name, init_value, nullptr);
212 }

◆ declareRestartableDataWithContext() [1/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
contextContext pointer that will be passed to the load and store functions

Definition at line 216 of file Restartable.h.

217 {
218  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
219  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
220  T & restartable_data_ref = data_ptr->get();
221 
222  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
223 
224  return restartable_data_ref;
225 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:197
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithContext() [2/2]

template<typename T >
T & Restartable::declareRestartableDataWithContext ( std::string  data_name,
const T &  init_value,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable" and initialize it.

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
init_valueThe initial value of the data
contextContext pointer that will be passed to the load and store functions

Definition at line 229 of file Restartable.h.

232 {
233  std::string full_name = _restartable_system_name + "/" + _restartable_name + "/" + data_name;
234  auto data_ptr = libmesh_make_unique<RestartableData<T>>(full_name, context);
235  data_ptr->set() = init_value;
236 
237  T & restartable_data_ref = data_ptr->get();
238  registerRestartableDataOnApp(full_name, std::move(data_ptr), _restartable_tid);
239 
240  return restartable_data_ref;
241 }
std::string _restartable_system_name
The system name this object is in.
Definition: Restartable.h:194
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191
THREAD_ID _restartable_tid
The thread ID for this object.
Definition: Restartable.h:197
void registerRestartableDataOnApp(std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
Helper function for actually registering the restartable data.
Definition: Restartable.C:46

◆ declareRestartableDataWithObjectName()

template<typename T >
T & Restartable::declareRestartableDataWithObjectName ( std::string  data_name,
std::string  object_name 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.

Definition at line 245 of file Restartable.h.

246 {
247  return declareRestartableDataWithObjectNameWithContext<T>(data_name, object_name, nullptr);
248 }

◆ declareRestartableDataWithObjectNameWithContext()

template<typename T >
T & Restartable::declareRestartableDataWithObjectNameWithContext ( std::string  data_name,
std::string  object_name,
void *  context 
)
protectedinherited

Declare a piece of data as "restartable".

This means that in the event of a restart this piece of data will be restored back to its previous value.

NOTE: This returns a reference! Make sure you store it in a reference!

Parameters
data_nameThe name of the data (usually just use the same name as the member variable)
object_nameA supplied name for the object that is declaring this data.
contextContext pointer that will be passed to the load and store functions

Definition at line 252 of file Restartable.h.

255 {
256  std::string old_name = _restartable_name;
257 
258  _restartable_name = object_name;
259 
260  T & value = declareRestartableDataWithContext<T>(data_name, context);
261 
262  _restartable_name = old_name;
263 
264  return value;
265 }
std::string _restartable_name
The name of the object.
Definition: Restartable.h:191

◆ dt()

Real Output::dt ( )
virtualinherited

Get the current time step size.

Definition at line 253 of file Output.C.

Referenced by writeTimestepInformation().

254 {
255  if (_transient)
256  return _dt;
257  else
258  return 1;
259 }
bool _transient
Transient flag (true = transient)
Definition: Output.h:177
Real & _dt
Time step delta.
Definition: Output.h:204

◆ dtOld()

Real Output::dtOld ( )
virtualinherited

Get old time step size.

Definition at line 262 of file Output.C.

263 {
264  if (_transient)
265  return _dt_old;
266  else
267  return 1;
268 }
Real & _dt_old
Old time step delta.
Definition: Output.h:207
bool _transient
Transient flag (true = transient)
Definition: Output.h:177

◆ enabled()

virtual bool MooseObject::enabled ( ) const
inlinevirtualinherited

Return the enabled status of the object.

Reimplemented in EigenKernel.

Definition at line 91 of file MooseObject.h.

Referenced by EigenKernel::enabled().

91 { return _enabled; }
const bool & _enabled
Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.
Definition: MooseObject.h:180

◆ enableOutputTypes()

InputParameters AdvancedOutput::enableOutputTypes ( const std::string &  names = std::string())
staticinherited

A method for enabling individual output type control.

Parameters
names(optional) Space separated of output type names that are supported by this Output object, if this is omitted all outputs types will be supported. The list of available output types is given below.

Output objects vary widely in what type of outputs they support (e.g., elemental variables, or postprocessor data). This method provides the user a means for controlling the types of outputs that are supported for the object being created. This is a static method that MUST be used to append parameters inside the objects validParams function.

List of Output Types and Method Names The output system is designed around overloading virtual method calls to output the various output types, the following list gives the name of the output type and the associated virtual method that should be overloaded to perform the output in the object being created.

Type virtual Method Name


nodal outputNodalVariables() elemental outputElementalVariables() scalar outputScalarVariables() postprocessor outputPostprocessors() vector_postprocessor outputVectorPostprocessors() input outputInput() system_information outputSystemInformation()

See also
CSV Exodus

Definition at line 101 of file AdvancedOutput.C.

Referenced by validParams< Console >(), validParams< Exodus >(), validParams< Nemesis >(), and validParams< TableOutput >().

102 {
103  // The parameters object that will be returned
105 
106  // Get the MultiEnum of output types
107  MultiMooseEnum output_types = getOutputTypes();
108 
109  // Update the enum of output types to append
110  if (names.empty())
111  output_types = output_types.getRawNames();
112  else
113  output_types = names;
114 
115  // Add the parameters and return them
116  addValidParams(params, output_types);
117  return params;
118 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string getRawNames() const
Method for returning the raw name strings for this instance.
InputParameters emptyInputParameters()
static void addValidParams(InputParameters &params, const MultiMooseEnum &types)
Method for defining the available parameters based on the types of outputs.
static MultiMooseEnum getOutputTypes()
Get the supported types of output (e.g., postprocessors, etc.)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...

◆ execBitFlags()

ExecFlagType SetupInterface::execBitFlags ( ) const
inherited

(DEPRECATED) Build and return the execution flags as a bitfield TODO: ExecFlagType

Definition at line 85 of file SetupInterface.C.

86 {
87  // TODO: ExecFlagType
88  mooseDeprecated("The execBitFlags method is being removed because MOOSE was updated to use a "
89  "ExecFlagEnum for execute flags. This method maintains the behavior of the "
90  "original method but the use of this method should be removed from your "
91  "application. The ExecFlagEnum should be inspected directly via the "
92  "getExecuteOnEnum() method.");
93 
94  unsigned int exec_bit_field = EXEC_NONE;
95  for (const auto & flag : _exec_flags)
96  exec_bit_field |= flag.id();
97  return ExecFlagType("deprecated", exec_bit_field);
98 }
MooseEnumItem ExecFlagType
Definition: Moose.h:85
const ExecFlagType EXEC_NONE
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const int & id() const
Return the numeric, name, or raw name.
Definition: MooseEnumItem.h:37
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ execFlags()

const std::vector< ExecFlagType > & SetupInterface::execFlags ( ) const
virtualinherited

(DEPRECATED) Get the execution flag for the object TODO: ExecFlagType

Reimplemented in MultiAppTransfer.

Definition at line 73 of file SetupInterface.C.

74 {
75  // TODO: ExecFlagType
76  mooseDeprecated("The execFlags() method is being removed because MOOSE has been updated to use a "
77  "ExecFlagEnum for execute flags. The current flags should be retrieved from "
78  "the \"exeucte_on\" parameters of your object or by using the \"_execute_enum\" "
79  "reference to the parameter or the getExecuteOnEnum() method.");
80 
81  return _exec_flags;
82 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
const std::vector< ExecFlagType > _exec_flags
(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType ...

◆ executeOn()

const MultiMooseEnum & Output::executeOn ( ) const
inherited

Get the current 'execute_on' selections for display.

Definition at line 277 of file Output.C.

278 {
279  return _execute_on;
280 }
ExecFlagEnum _execute_on
The common Execution types; this is used as the default execution type for everything except system i...
Definition: Output.h:192

◆ filename()

std::string Console::filename ( )
overridevirtual

Creates the output file name Appends the user-supplied 'file_base' input parameter with a '.txt' extension.

Returns
A string containing the output filename

Reimplemented from FileOutput.

Definition at line 278 of file Console.C.

Referenced by writeStreamToFile().

279 {
280  return _file_base + ".txt";
281 }
std::string _file_base
The base filename from the input paramaters.
Definition: FileOutput.h:82

◆ getCheckedPointerParam()

template<typename T >
T MooseObject::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inlineinherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 72 of file MooseObject.h.

73  {
74  return parameters().getCheckedPointerParam<T>(name, error_string);
75  }
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:57
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getDefaultExecFlagEnum()

ExecFlagEnum Output::getDefaultExecFlagEnum ( )
staticinherited

Return an ExecFlagEnum object with the available execution flags for Output objects.

Definition at line 89 of file Output.C.

Referenced by validParams< CommonOutputAction >(), and validParams< Output >().

90 {
92  exec_enum.addAvailableFlags(EXEC_FAILED);
93  return exec_enum;
94 }
const ExecFlagType EXEC_FAILED
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Definition: ExecFlagEnum.h:85
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:724

◆ getElementalVariableOutput()

const std::set< std::string > & AdvancedOutput::getElementalVariableOutput ( )
inherited

The list of elemental nonlinear variables names that are set for output.

Returns
A vector of strings containing the names of the nonlinear variables for output
See also
hasElementalVariableOutput

Definition at line 721 of file AdvancedOutput.C.

Referenced by Nemesis::output(), and Exodus::outputElementalVariables().

722 {
723  return _execute_data["elemental"].output;
724 }
OutputDataWarehouse _execute_data
Storage structures for the various output types.

◆ getExecuteOnEnum()

const ExecFlagEnum & SetupInterface::getExecuteOnEnum ( ) const
inherited

Return the execute on MultiMooseEnum for this object.

Definition at line 67 of file SetupInterface.C.

Referenced by ExecuteMooseObjectWarehouse< Transfer >::addObjectMask(), EigenExecutionerBase::init(), AttribExecOns::initFrom(), and MultiAppTransfer::MultiAppTransfer().

68 {
69  return _execute_enum;
70 }
const ExecFlagEnum & _execute_enum
Execute settings for this oejct.

◆ getExecuteOptions() [1/2]

ExecFlagEnum SetupInterface::getExecuteOptions ( )
staticinherited

(DEPRECATED) Returns the available options for the 'execute_on' input parameters TODO: ExecFlagType

Returns
A MooseEnum with the available 'execute_on' options, the default is 'residual'

Definition at line 101 of file SetupInterface.C.

102 {
103  // TODO: ExecFlagType
104  ::mooseDeprecated("The 'getExecuteOptions' was replaced by the ExecFlagEnum class because MOOSE "
105  "was updated to use this for the execute flags and the new function provides "
106  "additional arguments for modification of the enum.");
108 }
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:724
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ getExecuteOptions() [2/2]

MultiMooseEnum Output::getExecuteOptions ( std::string  default_type = "")
staticinherited

(DEPRECATED) Return the support output execution times

Parameters
default_typeThe default MultiMooseEnum option

Definition at line 77 of file Output.C.

78 {
79  // TODO: ExecFlagType
80  ::mooseDeprecated("This version 'getExecuteOptions' was replaced by the "
81  "Output::getDefaultExecFlagEnum() static function.");
83  exec_enum.addAvailableFlags(EXEC_FAILED);
84  exec_enum = default_type;
85  return exec_enum;
86 }
const ExecFlagType EXEC_FAILED
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:25
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Definition: ExecFlagEnum.h:85
ExecFlagEnum getDefaultExecFlagEnum()
Return the default ExecFlagEnum for MOOSE.
Definition: MooseUtils.C:724
void mooseDeprecated(Args &&... args) const
Definition: MooseObject.h:155

◆ getFileNumber()

unsigned int FileOutput::getFileNumber ( )
inherited

Return the current file number for this outputter.

This method was implemented for the MultiApp system, particularly when reseting an application and a new output file is desired after the reset.

Definition at line 184 of file FileOutput.C.

Referenced by OutputWarehouse::getFileNumbers().

185 {
186  return _file_num;
187 }
unsigned int & _file_num
A file number counter, initialized to 0 (this must be controlled by the child class, see Exodus)
Definition: FileOutput.h:85

◆ getMooseApp()

MooseApp& MooseObject::getMooseApp ( ) const
inlineinherited

Get the MooseApp this object is associated with.

Definition at line 86 of file MooseObject.h.

Referenced by RestartableDataIO::createBackup(), RestartableDataIO::deserializeRestartableData(), ConsoleUtils::outputMeshInformation(), Resurrector::restartRestartableData(), and RestartableDataIO::restoreBackup().

86 { return _app; }
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ getNodalVariableOutput()

const std::set< std::string > & AdvancedOutput::getNodalVariableOutput ( )
inherited

The list of nodal nonlinear variables names that are set for output.

Returns
A vector of strings containing the names of the nodal nonlinear variables for output

Note: The list returned by this will contain the names of both elemental and nodal variable names if 'elemental_as_nodal = true' in the input file. The libMesh output system (EquationSystems::build_solution_vector) performs the correct action within the solution vector by setting the nodal values as the average of the values for each of the element that the node shares.

See also
hasNodalVariableOutput

Definition at line 709 of file AdvancedOutput.C.

Referenced by Nemesis::output(), and Exodus::outputNodalVariables().

710 {
711  return _execute_data["nodal"].output;
712 }
OutputDataWarehouse _execute_data
Storage structures for the various output types.

◆ getOutputFileBase()

std::string FileOutput::getOutputFileBase ( const MooseApp app,
std::string  suffix = "_out" 
)
staticinherited

Returns the default output file base.

Returns
The name of the input file with '_out' append to the end

This method is static to allow for outside objects to call it, namely CommonOutputAction::setRecoverFileBase().

See also
CommonOutputAction::setRecoverFileBase()

Definition at line 111 of file FileOutput.C.

Referenced by FileOutput::FileOutput(), and MooseApp::getCheckpointDirectories().

112 {
113  // If the App has an outputfile, then use it (MultiApp scenario)
114  if (!app.getOutputFileBase().empty())
115  return app.getOutputFileBase();
116 
117  // If the output base is not set it must be determined from the input file
118  /* This will only return a non-empty string if the setInputFileName() was called, which is
119  * generally not the case. One exception is when CoupledExecutioner is used */
120  std::string input_filename = app.getInputFileName();
121  if (input_filename.empty())
122  input_filename = app.getFileName();
123 
124  // Assert that the filename is not empty
125  mooseAssert(!input_filename.empty(), "Input Filename is NULL");
126 
127  // Determine location of "." in extension, assert if it is not found
128  size_t pos = input_filename.find_last_of('.');
129  mooseAssert(pos != std::string::npos, "Unable to determine suffix of input file name");
130 
131  // Append the "_out" to the name and return it
132  size_t start = 0;
133  if (input_filename.find_last_of('/') != std::string::npos)
134  start = input_filename.find_last_of('/') + 1;
135  return input_filename.substr(start, pos - start) + suffix;
136 }
std::string getFileName(bool stripLeadingPath=true) const
Return the filename that was parsed.
Definition: MooseApp.C:1050
std::string getOutputFileBase() const
Override the selection of the output file base name.
Definition: MooseApp.C:783
std::string getInputFileName() const
Returns the input file name that was set with setInputFileName.
Definition: MooseApp.h:153

◆ getParam()

template<typename T >
const T & MooseObject::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 185 of file MooseObject.h.

Referenced by FEProblemBase::addMaterialHelper(), ConstraintWarehouse::addObject(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromXandY(), DerivativeParsedMaterial::DerivativeParsedMaterial(), EigenKernel::EigenKernel(), FEProblemBase::FEProblemBase(), FieldSplitPreconditioner::FieldSplitPreconditioner(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), SideSetsBetweenSubdomainsGenerator::generate(), ExtraNodesetGenerator::generate(), MeshExtruderGenerator::generate(), SideSetsAroundSubdomainGenerator::generate(), GenericConstantRankTwoTensor::GenericConstantRankTwoTensor(), TimeSequenceStepper::init(), AttribThread::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), initialSetup(), AdvancedOutput::initialSetup(), SideSetsBetweenSubdomains::modify(), AddExtraNodeset::modify(), MeshExtruder::modify(), SideSetsAroundSubdomain::modify(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterial::ParsedMaterial(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), TimePeriod::TimePeriod(), and VectorOfPostprocessors::VectorOfPostprocessors().

186 {
187  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
188 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ getPostprocessorOutput()

const std::set< std::string > & AdvancedOutput::getPostprocessorOutput ( )
inherited

The list of postprocessor names that are set for output.

Returns
A vector of strings containing the names of the postprocessor variables for output
See also
hasPostprocessorOutput

Definition at line 745 of file AdvancedOutput.C.

Referenced by TableOutput::outputPostprocessors(), Nemesis::outputPostprocessors(), and Exodus::outputPostprocessors().

746 {
747  return _execute_data["postprocessors"].output;
748 }
OutputDataWarehouse _execute_data
Storage structures for the various output types.

◆ getScalarOutput()

const std::set< std::string > & AdvancedOutput::getScalarOutput ( )
inherited

The list of scalar variables names that are set for output.

Returns
A vector of strings containing the names of the scalar variables for output
See also
hasScalarVariableOutput

Definition at line 733 of file AdvancedOutput.C.

Referenced by TableOutput::outputScalarVariables(), Nemesis::outputScalarVariables(), and Exodus::outputScalarVariables().

734 {
735  return _execute_data["scalars"].output;
736 }
OutputDataWarehouse _execute_data
Storage structures for the various output types.

◆ getVectorPostprocessorOutput()

const std::set< std::string > & AdvancedOutput::getVectorPostprocessorOutput ( )
inherited

The list of VectorPostprocessor names that are set for output.

Returns
A vector of strings containing the names of the VectorPostprocessor variables for output
See also
hasVectorPostprocessorOutput

Definition at line 757 of file AdvancedOutput.C.

Referenced by TableOutput::outputVectorPostprocessors().

758 {
759  return _execute_data["vector_postprocessors"].output;
760 }
OutputDataWarehouse _execute_data
Storage structures for the various output types.

◆ hasElementalVariableOutput()

bool AdvancedOutput::hasElementalVariableOutput ( )
inherited

Returns true if there exists elemental nonlinear variables for output.

Returns
True if nonlinear variable output exists
See also
getElementalVariableOutput

Definition at line 715 of file AdvancedOutput.C.

Referenced by Exodus::initialSetup().

716 {
717  return hasOutputHelper("elemental");
718 }
bool hasOutputHelper(const std::string &name)
Helper method for checking if output types exists.

◆ hasNodalVariableOutput()

bool AdvancedOutput::hasNodalVariableOutput ( )
inherited

Returns true if there exists nodal nonlinear variables for output.

Returns
True if nonlinear variable output exists
See also
getNodalVariableOutput

Definition at line 703 of file AdvancedOutput.C.

Referenced by Exodus::initialSetup(), and Exodus::outputElementalVariables().

704 {
705  return hasOutputHelper("nodal");
706 }
bool hasOutputHelper(const std::string &name)
Helper method for checking if output types exists.

◆ hasOutput() [1/2]

bool AdvancedOutput::hasOutput ( )
virtualinherited

Returns true if any of the other has methods return true.

Definition at line 350 of file AdvancedOutput.C.

Referenced by Exodus::initialSetup(), Exodus::output(), and AdvancedOutput::shouldOutput().

351 {
352  // Test that variables exist for output AND that output execution flags are valid
353  for (const auto & it : _execute_data)
354  if (!(it.second).output.empty() && _advanced_execute_on.contains(it.first) &&
355  _advanced_execute_on[it.first].isValid())
356  return true;
357 
358  // Test execution flags for non-variable output
359  if (_advanced_execute_on.contains("system_information") &&
360  _advanced_execute_on["system_information"].isValid())
361  return true;
362  if (_advanced_execute_on.contains("input") && _advanced_execute_on["input"].isValid())
363  return true;
364 
365  return false;
366 }
OutputOnWarehouse _advanced_execute_on
Storage for the individual component execute flags.
Definition: Output.h:249
OutputDataWarehouse _execute_data
Storage structures for the various output types.
bool contains(const std::string &name)
A method for testing of a key exists.

◆ hasOutput() [2/2]

bool AdvancedOutput::hasOutput ( const ExecFlagType type)
inherited

Tests that any output exist for the given output type.

See also
Exodus

Definition at line 338 of file AdvancedOutput.C.

339 {
340  // If any of the component outputs are true, then there is some output to perform
341  for (const auto & it : _advanced_execute_on)
342  if (wantOutput(it.first, type))
343  return true;
344 
345  // There is nothing to output
346  return false;
347 }
OutputOnWarehouse _advanced_execute_on
Storage for the individual component execute flags.
Definition: Output.h:249
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
bool wantOutput(const std::string &name, const ExecFlagType &type)
Handles logic for determining if a step should be output.

◆ hasPostprocessorOutput()

bool AdvancedOutput::hasPostprocessorOutput ( )
inherited

Returns true if there exists postprocessors for output.

Returns
True if postprocessor output exists
See also
getPostprocessorOutput

Definition at line 739 of file AdvancedOutput.C.

Referenced by Exodus::initialSetup().

740 {
741  return hasOutputHelper("postprocessors");
742 }
bool hasOutputHelper(const std::string &name)
Helper method for checking if output types exists.

◆ hasScalarOutput()

bool AdvancedOutput::hasScalarOutput ( )
inherited

Returns true if there exists scalar variables for output.

Returns
True if scalar variable output exists
See also
getScalarVariableOutput

Definition at line 727 of file AdvancedOutput.C.

Referenced by Exodus::initialSetup().

728 {
729  return hasOutputHelper("scalars");
730 }
bool hasOutputHelper(const std::string &name)
Helper method for checking if output types exists.

◆ hasVectorPostprocessorOutput()

bool AdvancedOutput::hasVectorPostprocessorOutput ( )
inherited

Returns true if there exists VectorPostprocessors for output.

Returns
True if VectorPostprocessor output exists
See also
getVectorPostprocessorOutput

Definition at line 751 of file AdvancedOutput.C.

752 {
753  return hasOutputHelper("vector_postprocessors");
754 }
bool hasOutputHelper(const std::string &name)
Helper method for checking if output types exists.

◆ init()

void Console::init ( )
protected

Adds the printing of system information to the init() method.

◆ initialSetup()

void Console::initialSetup ( )
overridevirtual

Initial setup function Prints the system information, this is done here so that the system information is printed prior to any PETSc solve information.

Reimplemented from AdvancedOutput.

Definition at line 230 of file Console.C.

231 {
232  // Only allow the main app to change the perf_log settings.
233  if (_app.name() == "main")
234  {
235  // Disable libMesh log
236  if (!_libmesh_log)
237  libMesh::perflog.disable_logging();
238  }
239 
240  // system info flag can be changed only before console initial setup
242 
243  // If execute_on = 'initial' perform the output
244  if (wantOutput("system_information", EXEC_INITIAL))
246 
247  // Call the base class method
249 
250  // If file output is desired, wipe out the existing file if not recovering
251  if (!_app.isRecovering())
252  writeStreamToFile(false);
253 
254  // Enable verbose output if Executioner has it enabled
255  if (_app.getExecutioner()->isParamValid("verbose") &&
256  _app.getExecutioner()->getParam<bool>("verbose"))
257  _verbose = true;
258 
259  // Display a message to indicate the application is running (useful for MultiApps)
261  write(std::string("\nRunning App: ") + _app.name() + "\n");
262 
263  // If the user adds "final" to the execute on, append this to the postprocessors, scalars, etc.,
264  // but only
265  // if the parameter (e.g., postprocessor_execute_on) has not been modified by the user.
266  if (_execute_on.contains("final"))
267  {
268  if (!_pars.isParamSetByUser("postprocessor_execute_on"))
269  _advanced_execute_on["postprocessors"].push_back("final");
270  if (!_pars.isParamSetByUser("scalars_execute_on"))
271  _advanced_execute_on["scalars"].push_back("final");
272  if (!_pars.isParamSetByUser("vector_postprocessor_execute_on"))
273  _advanced_execute_on["vector_postprocessors"].push_back("final");
274  }
275 }
bool _libmesh_log
Control the display libMesh performance log.
Definition: Console.h:184
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:72
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.h:248
ExecFlagEnum _execute_on
The common Execution types; this is used as the default execution type for everything except system i...
Definition: Output.h:192
OutputOnWarehouse _advanced_execute_on
Storage for the individual component execute flags.
Definition: Output.h:249
virtual void outputSystemInformation() override
Print system information.
Definition: Console.C:563
bool _verbose
Flag for writing detailed time step information.
Definition: Console.h:169
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:515
bool _allow_changing_sysinfo_flag
A boolean for protecting _system_info_flags from being changed undesirably.
Definition: Console.h:233
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:185
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
void write(std::string message, bool indent=true)
Write message to screen and/or file.
Definition: Console.C:617
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:174
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
bool wantOutput(const std::string &name, const ExecFlagType &type)
Handles logic for determining if a step should be output.
void writeStreamToFile(bool append=true)
Write the file stream to the file.
Definition: Console.C:349
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
virtual void initialSetup()
Initialization method.
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
bool hasMultiApps() const
Returns whether or not the current simulation has any multiapps.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:81
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:852
const ExecFlagType EXEC_INITIAL

◆ interval()

const unsigned int& Output::interval ( ) const
inherited

Get the output interval.

◆ isAdvanced()

bool Output::isAdvanced ( )
inherited

Returns true if this object is an AdvancedOutput object.

Definition at line 283 of file Output.C.

284 {
285  return _is_advanced;
286 }
bool _is_advanced
Flag for advanced output testing.
Definition: Output.h:243

◆ isParamValid()

bool MooseObject::isParamValid ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 81 of file MooseObject.h.

Referenced by AdvancedOutput::AdvancedOutput(), BicubicSplineFunction::BicubicSplineFunction(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), CSVReader::CSVReader(), MultiAppNearestNodeTransfer::execute(), Exodus::Exodus(), FEProblemBase::FEProblemBase(), FileOutput::FileOutput(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), RenameBoundaryGenerator::generate(), ElementSubdomainIDGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), ExtraNodesetGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshSideSetGenerator::generate(), RenameBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), MeshExtruderGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), PatternedMeshGenerator::generate(), MultiAppNearestNodeTransfer::getLocalEntities(), MeshGenerator::getMesh(), MultiAppNearestNodeTransfer::getNearestNode(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), MooseMesh::init(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), MooseParsedVectorFunction::initialSetup(), initialSetup(), Receiver::initialSetup(), SolutionFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedFunction::initialSetup(), AdvancedOutput::initialSetup(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), BreakBoundaryOnSubdomain::modify(), MeshExtruder::modify(), MeshSideSet::modify(), LowerDBlockFromSideset::modify(), AssignElementSubdomainID::modify(), ParsedSubdomainMeshModifier::modify(), RenameBlock::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), EigenExecutionerBase::normalizeSolution(), Output::Output(), PetscOutput::PetscOutput(), Piecewise::Piecewise(), SolutionUserObject::readExodusII(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), SolutionUserObject::SolutionUserObject(), and TimePeriod::TimePeriod().

81 { return _pars.isParamValid(name); }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ jacobianSetup()

void SetupInterface::jacobianSetup ( )
virtualinherited

Gets called just before the Jacobian is computed and before this object is asked to do its job.

Reimplemented in EqualValueEmbeddedConstraint.

Definition at line 52 of file SetupInterface.C.

53 {
54 }

◆ meshChanged()

void Console::meshChanged ( )
overridevirtual

Performs console related printing when the mesh is changed.

Reimplemented from MeshChangedInterface.

Definition at line 600 of file Console.C.

601 {
603  {
604  _console << ConsoleUtils::outputMeshInformation(*_problem_ptr, /*verbose = */ false);
605 
607  if (!output.empty())
608  _console << "Nonlinear System:\n" << output;
609 
611  if (!output.empty())
612  _console << "Auxiliary System:\n" << output;
613  }
614 }
std::string outputNonlinearSystemInformation(FEProblemBase &problem)
Output the Nonlinear system information.
Definition: ConsoleUtils.C:114
std::string outputAuxiliarySystemInformation(FEProblemBase &problem)
Output the Auxiliary system information.
Definition: ConsoleUtils.C:108
virtual void output(const ExecFlagType &type) override
Customizes the order of output for the various components as well as adds additional output such as t...
Definition: Console.C:284
std::string outputMeshInformation(FEProblemBase &problem, bool verbose=true)
Output the mesh information.
Definition: ConsoleUtils.C:54
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:174
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
bool _print_mesh_changed_info
Flag for printing mesh information when the mesh changes.
Definition: Console.h:224

◆ mooseConsole()

void Console::mooseConsole ( const std::string &  message)
private

Add a message to the output streams.

Parameters
messageThe message to add to the output streams

Any call to this method will write the supplied message to the screen and/or file, following the same restrictions as outputStep.

Calls to this method should be made via OutputWarehouse::mooseConsole so that the output stream buffer is cleaned up correctly. Thus, it is a private method.

Definition at line 637 of file Console.C.

638 {
639  // Write the messages
640  write(message);
641 
642  // Flush the stream to the screen
643  Moose::out << std::flush;
644 }
void write(std::string message, bool indent=true)
Write message to screen and/or file.
Definition: Console.C:617

◆ mooseDeprecated()

template<typename... Args>
void MooseObject::mooseDeprecated ( Args &&...  args) const
inlineinherited

◆ mooseError()

template<typename... Args>
void MooseObject::mooseError ( Args &&...  args) const
inlineinherited

Definition at line 140 of file MooseObject.h.

Referenced by PetscExternalPartitioner::_do_partition(), GridPartitioner::_do_partition(), FEProblemBase::addConstraint(), FEProblemBase::addInitialCondition(), FEProblem::addLineSearch(), FEProblemBase::addLineSearch(), FEProblemBase::addOutput(), DiracKernel::addPointWithValidId(), FEProblemBase::addPostprocessor(), MooseMesh::addQuadratureNode(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AllSideSetsByNormalsGenerator::AllSideSetsByNormalsGenerator(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), Function::average(), Axisymmetric2D3DSolutionFunction::Axisymmetric2D3DSolutionFunction(), BicubicSplineFunction::BicubicSplineFunction(), BoundingValueElementDamper::BoundingValueElementDamper(), BoundingValueNodalDamper::BoundingValueNodalDamper(), BoundsAux::BoundsAux(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), MooseMesh::buildCoarseningMap(), Piecewise::buildFromFile(), Piecewise::buildFromXandY(), Piecewise::buildFromXY(), TiledMesh::buildMesh(), FileMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), DistributedGeneratedMesh::buildMesh(), GeneratedMesh::buildMesh(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildRefinementMap(), MooseMesh::buildSideList(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), SubProblem::checkBoundaryMatProps(), FEProblemBase::checkCoordinateSystems(), FEProblemBase::checkDependMaterialsHelper(), FEProblemBase::checkDisplacementOrders(), Material::checkExecutionStage(), BreakMeshByBlockBase::checkInputParameter(), Steady::checkIntegrity(), EigenExecutionerBase::checkIntegrity(), ActuallyExplicitEuler::checkLinearConvergence(), FEProblemBase::checkProblemIntegrity(), Material::checkStatefulSanity(), FEProblemBase::checkUserObjects(), LibmeshPartitioner::clone(), MooseMesh::clone(), ComparisonPostprocessor::comparisonIsTrue(), CompositeFunction::CompositeFunction(), ElementLpNormAux::compute(), ElementH1ErrorFunctionAux::compute(), NodalPatchRecovery::compute(), InterfaceKernel::computeElemNeighJacobian(), TimeSequenceStepperBase::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), TimeStepper::computeFailedDT(), HistogramVectorPostprocessor::computeHistogram(), EqualValueEmbeddedConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), FEProblemBase::computeResidualInternal(), FEProblemBase::computeResidualTag(), FEProblemBase::computeResidualType(), StatisticsVectorPostprocessor::computeStatValue(), Material::computeSubdomainProperties(), BDF2::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ActuallyExplicitEuler::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), AStableDirk4::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), PenetrationAux::computeValue(), ConcentricCircleMesh::ConcentricCircleMesh(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), TimeStepper::constrainStep(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), CoupledForce::CoupledForce(), DebugResidualAux::DebugResidualAux(), BicubicSplineFunction::derivative(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernel::DGKernel(), FEProblemBase::duplicateVariableCheck(), EigenProblem::EigenProblem(), Eigenvalues::Eigenvalues(), ElementalVariableValue::ElementalVariableValue(), ElementQualityAux::ElementQualityAux(), MooseMesh::errorIfDistributedMesh(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), PerflogDumper::execute(), MultiAppPostprocessorTransfer::execute(), DiscreteElementUserObject::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), ElementQualityChecker::execute(), NodalValueSampler::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), FindValueOnLine::execute(), TimeExtremeValue::execute(), VectorPostprocessorComparison::execute(), LeastSquaresFit::execute(), LeastSquaresFitHistory::execute(), FEProblemBase::executeControls(), MultiAppVectorPostprocessorTransfer::executeFromMultiapp(), MultiAppVectorPostprocessorTransfer::executeToMultiapp(), Exodus::Exodus(), FileOutput::FileOutput(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), VerifyElementUniqueID::finalize(), VerifyNodalUniqueID::finalize(), DiscreteElementUserObject::finalize(), ElementQualityChecker::finalize(), MemoryUsage::finalize(), PointSamplerBase::finalize(), Transfer::find_sys(), BreakMeshByBlockBase::findFreeBoundaryId(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), FunctionDT::FunctionDT(), FunctionMaterialBase::FunctionMaterialBase(), ParsedMaterialHelper::functionParse(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), GapValueAux::GapValueAux(), ExtraNodesetGenerator::generate(), ElementSubdomainIDGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), StitchedMeshGenerator::generate(), GeneratedMeshGenerator::generate(), MeshExtruderGenerator::generate(), SpiralAnnularMeshGenerator::generate(), SideSetsFromBoundingBoxGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), PatternedMeshGenerator::generate(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), RandomICBase::generateRandom(), GenericConstantMaterial::GenericConstantMaterial(), GenericFunctionMaterial::GenericFunctionMaterial(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), MooseMesh::getCoarseningMap(), Control::getControllableParameterByName(), FEProblemBase::getCoordSystem(), PiecewiseConstant::getDirection(), FEProblemBase::getDistribution(), ElementGenerator::getElemType(), MultiApp::getExecutioner(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), AuxKernel::getMaterialProperty(), AuxKernel::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOlder(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), DistributedGeneratedMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), FEProblemBase::getMaxQps(), FEProblemBase::getMaxShapeFunctions(), AnnularMesh::getMinInDimension(), DistributedGeneratedMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MooseMesh::getMortarInterface(), MooseMesh::getMortarInterfaceByName(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), FEProblemBase::getNonlinearSystem(), MooseMesh::getPairedBoundaryMapping(), ImageMeshGenerator::GetPixelInfo(), ImageMesh::GetPixelInfo(), MaterialStdVectorAux::getRealValue(), MooseMesh::getRefinementMap(), FEProblemBase::getSampler(), DisplacedProblem::getScalarVariable(), FEProblemBase::getScalarVariable(), DisplacedProblem::getStandardVariable(), FEProblemBase::getStandardVariable(), MooseMesh::getSubdomainBoundaryIds(), MooseMesh::getSubdomainID(), DisplacedProblem::getSystem(), FEProblemBase::getSystem(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), PerformanceData::getValue(), Residual::getValue(), PerfGraphData::getValue(), LineValueSampler::getValue(), FindValueOnLine::getValueAtPoint(), SubProblem::getVariableHelper(), SubProblem::getVectorTagID(), DisplacedProblem::getVectorVariable(), FEProblemBase::getVectorVariable(), MultiApp::globalAppToLocal(), MooseParsedVectorFunction::gradient(), AdvancedOutput::hasOutputHelper(), CrankNicolson::init(), CSVTimeSequenceStepper::init(), IterationAdaptiveDT::init(), EigenExecutionerBase::init(), Transient::init(), MooseMesh::init(), FEProblemBase::init(), NumPicardIterations::initialize(), PiecewiseBase::initialSetup(), FullSolveMultiApp::initialSetup(), SolutionAux::initialSetup(), Axisymmetric2D3DSolutionFunction::initialSetup(), Exodus::initialSetup(), SolutionFunction::initialSetup(), SolutionUserObject::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initShowHideLists(), Material::initStatefulProperties(), Function::integral(), InterfaceKernel::InterfaceKernel(), InterfaceTimeKernel::InterfaceTimeKernel(), EigenExecutionerBase::inversePowerIteration(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LinearCombinationFunction::LinearCombinationFunction(), LinearCombinationPostprocessor::LinearCombinationPostprocessor(), LinearNodalConstraint::LinearNodalConstraint(), LineMaterialSamplerBase< Real >::LineMaterialSamplerBase(), LineSearch::lineSearch(), LineValueSampler::LineValueSampler(), MaterialRealTensorValueAux::MaterialRealTensorValueAux(), MaterialRealVectorValueAux::MaterialRealVectorValueAux(), MaterialStdVectorRealGradientAux::MaterialStdVectorRealGradientAux(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), SubProblem::meshChanged(), MeshExtruder::MeshExtruder(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshSideSetGenerator::MeshSideSetGenerator(), SideSetsFromNormals::modify(), SideSetsFromPoints::modify(), MeshExtruder::modify(), BreakMeshByBlockBase::modify(), AddExtraNodeset::modify(), SmoothMesh::modify(), AssignElementSubdomainID::modify(), ElementDeleterBase::modify(), AddAllSideSetsByNormals::modify(), RenameBlock::modify(), ParsedSubdomainMeshModifier::modify(), ImageSubdomain::modify(), BoundingBoxNodeSet::modify(), OrientedSubdomainBoundingBox::modify(), AddSideSetsFromBoundingBox::modify(), SubdomainBoundingBox::modify(), MooseMesh::MooseMesh(), MultiAppMeshFunctionTransfer::MultiAppMeshFunctionTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), NearestNodeDistanceAux::NearestNodeDistanceAux(), NearestNodeValueAux::NearestNodeValueAux(), RenameBlockGenerator::newBlockID(), RenameBlock::newBlockID(), RenameBlockGenerator::newBlockName(), RenameBlock::newBlockName(), NewmarkBeta::NewmarkBeta(), NodalConstraint::NodalConstraint(), NodalScalarKernel::NodalScalarKernel(), NodalVariableValue::NodalVariableValue(), NumDOFs::NumDOFs(), NumNonlinearIterations::NumNonlinearIterations(), NumVars::NumVars(), ElementSideNeighborLayers::operator()(), ElementPointNeighbors::operator()(), RelationshipManager::operator==(), XDA::output(), SolutionHistory::output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), Exodus::outputSetup(), AdvancedOutput::outputSystemInformation(), outputVectorPostprocessors(), AdvancedOutput::outputVectorPostprocessors(), MooseObject::paramError(), PiecewiseBilinear::parse(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PatternedMesh::PatternedMesh(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), Piecewise::Piecewise(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseMulticonstant::PiecewiseMulticonstant(), PiecewiseMultiInterpolation::PiecewiseMultiInterpolation(), SolutionUserObject::pointValueGradientWrapper(), SolutionUserObject::pointValueWrapper(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), ImplicitMidpoint::postResidual(), ExplicitTVDRK2::postResidual(), AStableDirk4::postResidual(), LStableDirk4::postResidual(), ExplicitRK2::postResidual(), Predictor::Predictor(), SolutionUserObject::readExodusII(), SolutionUserObject::readXda(), EqualValueEmbeddedConstraint::reinitConstraint(), RelativeSolutionDifferenceNorm::RelativeSolutionDifferenceNorm(), RenameBlock::RenameBlock(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), ScalarComponentIC::ScalarComponentIC(), BicubicSplineFunction::secondDerivative(), FEProblemBase::setCoordSystem(), PiecewiseBase::setData(), EigenProblem::setEigenproblemType(), Sampler::setNumberOfRequiedRandomSeeds(), Exodus::setOutputDimension(), Split::setup(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideSetsFromNormals::SideSetsFromNormals(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPoints::SideSetsFromPoints(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), SolutionUserObject::SolutionUserObject(), ActuallyExplicitEuler::solve(), FullSolveMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), StitchedMesh::StitchedMesh(), NodalUserObject::subdomainSetup(), GeneralUserObject::subdomainSetup(), Constraint::subdomainSetup(), systemInfoFlags(), Terminator::Terminator(), TestSetupPostprocessorDataActionFunction::TestSetupPostprocessorDataActionFunction(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), ThreadedGeneralUserObject::threadJoin(), DiscreteElementUserObject::threadJoin(), GeneralUserObject::threadJoin(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), VectorPostprocessorVisualizationAux::timestepSetup(), MultiAppCopyTransfer::transfer(), MultiAppMeshFunctionTransfer::transferVariable(), Transient::Transient(), TransientMultiApp::TransientMultiApp(), FEProblemBase::uDotDotOldRequested(), FEProblemBase::uDotOldRequested(), EqualValueBoundaryConstraint::updateConstrainedNodes(), SolutionUserObject::updateExodusBracketingTimeIndices(), Axisymmetric2D3DSolutionFunction::value(), ValueRangeMarker::ValueRangeMarker(), ValueThresholdMarker::ValueThresholdMarker(), MultiAppTransfer::variableIntegrityCheck(), VariableTimeIntegrationAux::VariableTimeIntegrationAux(), VectorNodalBC::VectorNodalBC(), VectorOfPostprocessors::VectorOfPostprocessors(), VectorPostprocessorFunction::VectorPostprocessorFunction(), MooseParsedGradFunction::vectorValue(), MooseParsedFunction::vectorValue(), VolumeHistogram::VolumeHistogram(), VTKOutput::VTKOutput(), DOFMapOutput::writeStreamToFile(), and writeStreamToFile().

141  {
142  std::ostringstream oss;
143  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
144  std::string msg = oss.str();
145  callMooseErrorRaw(msg, &_app);
146  }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:87
void callMooseErrorRaw(std::string &msg, MooseApp *app)
Definition: MooseObject.C:57
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ mooseInfo()

template<typename... Args>
void MooseObject::mooseInfo ( Args &&...  args) const
inlineinherited

◆ mooseWarning()

template<typename... Args>
void MooseObject::mooseWarning ( Args &&...  args) const
inlineinherited

◆ name()

const std::string& MooseObject::name ( ) const
inlineinherited

Get the name of the object.

Returns
The name of the object

Definition at line 51 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), Executioner::addAttributeReporter(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), MooseMesh::addMortarInterface(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), Output::advancedExecuteOn(), AllSideSetsByNormalsGenerator::AllSideSetsByNormalsGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), DerivativeParsedMaterialHelper::assembleDerivatives(), AStableDirk4::AStableDirk4(), Function::average(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), FEProblemBase::checkDependMaterialsHelper(), Damper::checkMinDamping(), Material::checkStatefulSanity(), CompositeFunction::CompositeFunction(), Material::computeSubdomainProperties(), VectorPostprocessorVisualizationAux::computeValue(), AuxKernel::coupledCallback(), AuxKernel::coupledDot(), AuxKernel::coupledDotDu(), MultiApp::createApp(), FEProblemBase::declareVectorPostprocessorVector(), DOFMapOutput::demangle(), DerivativeSumMaterial::DerivativeSumMaterial(), DGKernel::DGKernel(), DumpObjectsProblem::dumpObjectHelper(), ElementValueSampler::ElementValueSampler(), MooseMesh::errorIfDistributedMesh(), AB2PredictorCorrector::estimateTimeError(), SolutionUserObject::evalMeshFunction(), SolutionUserObject::evalMeshFunctionGradient(), SolutionUserObject::evalMultiValuedMeshFunction(), SolutionUserObject::evalMultiValuedMeshFunctionGradient(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), StatisticsVectorPostprocessor::execute(), MultiAppNearestNodeTransfer::execute(), PointValue::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), HistogramVectorPostprocessor::execute(), MultiAppCopyTransfer::execute(), Exodus::Exodus(), FileOutput::FileOutput(), MultiApp::fillPositions(), PointSamplerBase::finalize(), DerivativeParsedMaterialHelper::findMatPropDerivative(), FunctionDT::FunctionDT(), GeneralUserObject::GeneralUserObject(), LowerDBlockFromSidesetGenerator::generate(), StitchedMeshGenerator::generate(), Material::getADMaterialProperty(), MultiApp::getBoundingBox(), MooseObject::getCheckedPointerParam(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getDistribution(), MultiApp::getExecutioner(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SolutionUserObject::getLocalVarIndex(), Marker::getMarkerValue(), FEProblemBase::getMaterial(), NodalPatchRecovery::getMaterialProperty(), AuxKernel::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), AuxKernel::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), AuxKernel::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MeshGenerator::getMesh(), MooseMesh::getMortarInterfaceByName(), OutputWarehouse::getOutput(), MooseObject::getParam(), GeneralUserObject::getPostprocessorValue(), AuxKernel::getPostprocessorValue(), FEProblemBase::getPostprocessorValue(), GeneralUserObject::getPostprocessorValueByName(), AuxKernel::getPostprocessorValueByName(), FEProblemBase::getPostprocessorValueOld(), FEProblemBase::getPostprocessorValueOlder(), FEProblemBase::getSampler(), AuxKernel::getScatterVectorPostprocessorValue(), FEProblemBase::getScatterVectorPostprocessorValue(), AuxKernel::getScatterVectorPostprocessorValueByName(), FEProblemBase::getScatterVectorPostprocessorValueOld(), Transient::getTimeStepperName(), AuxKernel::getUserObject(), InitialConditionBase::getUserObject(), FEProblemBase::getUserObject(), InitialConditionBase::getUserObjectBase(), AuxKernel::getUserObjectBase(), FEProblemBase::getUserObjectBase(), AuxKernel::getUserObjectByName(), InitialConditionBase::getUserObjectByName(), GeneralUserObject::getVectorPostprocessorValue(), AuxKernel::getVectorPostprocessorValue(), FEProblemBase::getVectorPostprocessorValue(), GeneralUserObject::getVectorPostprocessorValueByName(), AuxKernel::getVectorPostprocessorValueByName(), FEProblemBase::getVectorPostprocessorValueOld(), FEProblemBase::hasFunction(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasUserObject(), FEProblemBase::hasVectorPostprocessor(), FEProblemBase::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), CSVReader::initialize(), StatisticsVectorPostprocessor::initialize(), HistogramVectorPostprocessor::initialize(), MultiAppProjectionTransfer::initialSetup(), DerivativeFunctionMaterialBase::initialSetup(), SolutionUserObject::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPostprocessorData(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), Material::initStatefulProperties(), FEProblemBase::initVectorPostprocessorData(), Function::integral(), InterfaceKernel::InterfaceKernel(), MooseObject::isParamValid(), LinearCombinationFunction::LinearCombinationFunction(), Marker::Marker(), MatDiffusionBase< Real >::MatDiffusionBase(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), MaterialVectorPostprocessor::MaterialVectorPostprocessor(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshSideSetGenerator::MeshSideSetGenerator(), ElementDeleterBase::modify(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodalValueSampler::NodalValueSampler(), NodalVariableValue::NodalVariableValue(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), ConsoleUtils::outputOutputInformation(), Nemesis::outputPostprocessors(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedAddSideset::ParsedAddSideset(), ParsedAux::ParsedAux(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ParsedSubdomainMeshModifier::ParsedSubdomainMeshModifier(), PointSamplerBase::PointSamplerBase(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), Material::resetQpProperties(), Sampler::Sampler(), ScalarComponentIC::ScalarComponentIC(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), Exodus::setOutputDimension(), MooseMesh::setSubdomainName(), Split::setup(), TransientMultiApp::setupApp(), SideSetsFromNormalsGenerator::SideSetsFromNormalsGenerator(), SideSetsFromPointsGenerator::SideSetsFromPointsGenerator(), SideValueSampler::SideValueSampler(), TransientMultiApp::solveStep(), UserObject::spatialValue(), SphericalAverage::SphericalAverage(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), SubProblem::storeSubdomainZeroMatProp(), TaggingInterface::TaggingInterface(), ThreadedGeneralUserObject::ThreadedGeneralUserObject(), TiledMeshGenerator::TiledMeshGenerator(), Function::timeDerivative(), VectorPostprocessorVisualizationAux::timestepSetup(), TransientMultiApp::TransientMultiApp(), MultiAppTransfer::variableIntegrityCheck(), and AdvancedOutput::wantOutput().

51 { return _name; }
const std::string & _name
The name of this object, reference to value stored in InputParameters.
Definition: MooseObject.h:177

◆ onInterval()

bool Output::onInterval ( )
protectedvirtualinherited

Returns true if the output interval is satisfied.

Definition at line 211 of file Output.C.

Referenced by output(), OversampleOutput::outputStep(), and Output::outputStep().

212 {
213  // The output flag to return
214  bool output = false;
215 
216  // Return true if the current step on the current output interval and within the output time range
217  // and within the output step range
218  if (_time >= _start_time && _time <= _end_time && _t_step >= _start_step &&
219  _t_step <= _end_step && (_t_step % _interval) == 0)
220  output = true;
221 
222  // Return false if 'sync_only' is set to true
223  if (_sync_only)
224  output = false;
225 
226  // If sync times are not skipped, return true if the current time is a sync_time
227  if (_sync_times.find(_time) != _sync_times.end())
228  output = true;
229 
230  // Return the output status
231  return output;
232 }
virtual void output(const ExecFlagType &type)=0
Overload this function with the desired output activities.
Real _start_time
Start outputting time.
Definition: Output.h:219
int & _t_step
The current time step.
Definition: Output.h:201
int _start_step
Start outputting at this time step.
Definition: Output.h:225
const unsigned int _interval
The output time step interval.
Definition: Output.h:213
int _end_step
End outputting at this time step.
Definition: Output.h:228
bool _sync_only
Flag for only executing at sync times.
Definition: Output.h:234
std::set< Real > _sync_times
Sync times for this outputter.
Definition: Output.h:216
Real & _time
The current time for output purposes.
Definition: Output.h:195

◆ output()

void Console::output ( const ExecFlagType type)
overridevirtual

Customizes the order of output for the various components as well as adds additional output such as timestep information and nonlinear/linear residual information.

This method explicitly re-implements portions of AdvancedOutput::output, which is generally not recommended. This is done here to get the output ordering desired. If additional output types (e.g., elemental or nodal) are required in the future this calls will need to be explicitly added as well.

Reimplemented from AdvancedOutput.

Definition at line 284 of file Console.C.

Referenced by meshChanged(), outputSystemInformation(), and writeStreamToFile().

285 {
286  // Return if the current output is not on the desired interval
287  if (type != EXEC_FINAL && !onInterval())
288  return;
289 
290  // Output the system information first; this forces this to be the first item to write by default
291  // However, 'output_system_information_on' still operates correctly, so it may be changed by the
292  // user
293  if (wantOutput("system_information", type) && !(type == EXEC_INITIAL && _initialized))
295 
296  // Write the input
297  if (wantOutput("input", type))
298  outputInput();
299 
300  // Write the timestep information ("Time Step 0 ..."), this is controlled with "execute_on"
304 
305  // Print Non-linear Residual (control with "execute_on")
307  {
308  if (_nonlinear_iter == 0)
309  _old_nonlinear_norm = std::numeric_limits<Real>::max();
310 
311  _console << std::setw(2) << _nonlinear_iter
312  << " Nonlinear |R| = " << outputNorm(_old_nonlinear_norm, _norm) << '\n';
313 
315  }
316 
317  // Print Linear Residual (control with "execute_on")
319  {
320  if (_linear_iter == 0)
321  _old_linear_norm = std::numeric_limits<Real>::max();
322 
323  _console << std::setw(7) << _linear_iter
324  << " Linear |R| = " << outputNorm(_old_linear_norm, _norm) << '\n';
325 
327  }
328 
329  // Write variable norms
330  else if (type == EXEC_TIMESTEP_END)
331  {
333  write(Moose::perf_log.get_perf_info(), false);
335  }
336 
337  // Write Postprocessors and Scalars
338  if (wantOutput("postprocessors", type))
340 
341  if (wantOutput("scalars", type))
343 
344  // Write the file
346 }
ExecFlagEnum _execute_on
The common Execution types; this is used as the default execution type for everything except system i...
Definition: Output.h:192
virtual bool onInterval()
Returns true if the output interval is satisfied.
Definition: Output.C:211
void writeVariableNorms()
Print the L2-norms for each variable.
Definition: Console.C:417
virtual void outputSystemInformation() override
Print system information.
Definition: Console.C:563
int & _t_step
The current time step.
Definition: Output.h:201
const ExecFlagType EXEC_TIMESTEP_END
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
bool _initialized
True if init() has been called.
Definition: Output.h:237
PetscInt _linear_iter
Current linear iteration returned from PETSc.
Definition: PetscOutput.h:52
virtual void outputPostprocessors() override
Prints the postprocessor table to the screen.
Definition: Console.C:530
const ExecFlagType EXEC_TIMESTEP_BEGIN
void write(std::string message, bool indent=true)
Write message to screen and/or file.
Definition: Console.C:617
unsigned int _perf_log_interval
The interval at which the performance log is printed.
Definition: Console.h:178
PerfLog perf_log
Perflog to be used by applications.
virtual void outputInput() override
Print the input file at the beginning of the simulation.
Definition: Console.C:517
virtual void outputScalarVariables() override
Prints the aux scalar variables table to the screen.
Definition: Console.C:545
const ExecFlagType EXEC_LINEAR
Real _norm
Current norm returned from PETSc.
Definition: PetscOutput.h:46
Real _old_nonlinear_norm
Storage for the old non linear residual (needed for color output and only when used when printing to ...
Definition: Console.h:221
bool wantOutput(const std::string &name, const ExecFlagType &type)
Handles logic for determining if a step should be output.
void writeStreamToFile(bool append=true)
Write the file stream to the file.
Definition: Console.C:349
const ExecFlagType EXEC_NONLINEAR
Real _old_linear_norm
Storage for the old linear residual (needed for color output and only when used when printing to the ...
Definition: Console.h:218
void writeTimestepInformation()
Prints the time step information for the screen output.
Definition: Console.C:376
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
const ExecFlagType EXEC_FINAL
std::string outputNorm(const Real &old_norm, const Real &norm)
A helper function for outputting norms in color.
Definition: Console.C:499
PetscInt _nonlinear_iter
Current non-linear iteration returned from PETSc.
Definition: PetscOutput.h:49
const ExecFlagType EXEC_INITIAL

◆ outputElementalVariables()

void AdvancedOutput::outputElementalVariables ( )
protectedvirtualinherited

Performs output of elemental nonlinear variables The child class must define this method to output the nonlinear variables as desired.

See also
Exodus::outputElementalVariables

Reimplemented in Exodus.

Definition at line 192 of file AdvancedOutput.C.

Referenced by AdvancedOutput::output().

193 {
194  mooseError(
195  "Individual output of elemental variables is not support for this output object named '",
196  name(),
197  "'");
198 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ outputInput()

void Console::outputInput ( )
overrideprotectedvirtual

Print the input file at the beginning of the simulation.

Reimplemented from AdvancedOutput.

Definition at line 517 of file Console.C.

Referenced by output().

518 {
519  if (!_write_screen && !_write_file)
520  return;
521 
522  std::ostringstream oss;
523  oss << "--- " << _app.getInputFileName()
524  << " ------------------------------------------------------";
526  _console << oss.str() << '\n';
527 }
bool _write_screen
Flag for controlling outputting console information to screen.
Definition: Console.h:166
void printInputFile(std::ostream &out)
This method uses the Actions in the warehouse to reproduce the input file.
std::string getInputFileName() const
Returns the input file name that was set with setInputFileName.
Definition: MooseApp.h:153
ActionWarehouse & actionWarehouse()
Definition: MooseApp.h:139
bool _write_file
Flag for controlling outputting console information to a file.
Definition: Console.h:163
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ outputNodalVariables()

void AdvancedOutput::outputNodalVariables ( )
protectedvirtualinherited

Performs output of nodal nonlinear variables The child class must define this method to output the nonlinear variables as desired.

See also
Exodus::outputNodalVariables

Reimplemented in Exodus.

Definition at line 184 of file AdvancedOutput.C.

Referenced by AdvancedOutput::output().

185 {
186  mooseError("Individual output of nodal variables is not support for the output object named '",
187  name(),
188  "'");
189 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:51

◆ outputNorm()

std::string Console::outputNorm ( const Real &  old_norm,
const Real &  norm 
)
protected

A helper function for outputting norms in color.

Parameters
old_normThe old residual norm to compare against
normThe current residual norm

Definition at line 499 of file Console.C.

Referenced by output().

500 {
501  std::string color = COLOR_GREEN;
502 
503  // Red if the residual went up... or if the norm is nan
504  if (norm != norm || norm > old_norm)
505  color = COLOR_RED;
506  // Yellow if change is less than 5%
507  else if ((old_norm - norm) / old_norm <= 0.05)
508  color = COLOR_YELLOW;
509 
510  std::stringstream oss;
511  oss << std::scientific << color << norm << COLOR_DEFAULT;
512 
513  return oss.str();
514 }

◆ outputPostprocessors()

void Console::outputPostprocessors ( )
overrideprotectedvirtual

Prints the postprocessor table to the screen.

Reimplemented from TableOutput.

Definition at line 530 of file Console.C.

Referenced by output().

531 {
533 
535  {
536  std::stringstream oss;
537  oss << "\nPostprocessor Values:\n";
540  _console << oss.str() << '\n';
541  }
542 }
MooseEnum _fit_mode
The FormattedTable fit mode.
Definition: Console.h:157
FormattedTable & _postprocessor_table
Table containing postprocessor data.
Definition: TableOutput.h:67
bool empty() const
Returns a boolean value based on whether the FormattedTable contains data or not. ...
unsigned int _max_rows
The max number of table rows.
Definition: Console.h:154
virtual void outputPostprocessors() override
Populates the tables with postprocessor values.
Definition: TableOutput.C:86
void printTable(std::ostream &out, unsigned int last_n_entries=0)
Methods for dumping the table to the stream - either by filename or by stream handle.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void sortColumns()
Sorts columns alphabetically.

◆ outputScalarVariables()

void Console::outputScalarVariables ( )
overrideprotectedvirtual

Prints the aux scalar variables table to the screen.

Reimplemented from TableOutput.

Definition at line 545 of file Console.C.

Referenced by output().

546 {
548 
549  if (!_scalar_table.empty())
550  {
551  std::stringstream oss;
552  oss << "\nScalar Variable Values:\n";
553  if (processor_id() == 0)
554  {
557  }
558  _console << oss.str() << '\n';
559  }
560 }
MooseEnum _fit_mode
The FormattedTable fit mode.
Definition: Console.h:157
bool empty() const
Returns a boolean value based on whether the FormattedTable contains data or not. ...
FormattedTable & _scalar_table
Table containing scalar aux variables.
Definition: TableOutput.h:76
unsigned int _max_rows
The max number of table rows.
Definition: Console.h:154
void printTable(std::ostream &out, unsigned int last_n_entries=0)
Methods for dumping the table to the stream - either by filename or by stream handle.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void sortColumns()
Sorts columns alphabetically.
virtual void outputScalarVariables() override
Populates the tables with scalar aux variables.
Definition: TableOutput.C:147

◆ outputStep()

void Output::outputStep ( const ExecFlagType type)
virtualinherited

A single call to this function should output all the necessary data for a single timestep.

Parameters
typeThe type execution flag (see Moose.h)
See also
outputNodalVariables outputElementalVariables outputScalarVariables outputPostprocessors

Reimplemented in OversampleOutput.

Definition at line 177 of file Output.C.

Referenced by PetscOutput::petscLinearOutput(), and PetscOutput::petscNonlinearOutput().

178 {
179  // Output is not allowed
180  if (!_allow_output && type != EXEC_FORCED)
181  return;
182 
183  // If recovering disable output of initial condition, it was already output
184  if (type == EXEC_INITIAL && _app.isRecovering())
185  return;
186 
187  // Return if the current output is not on the desired interval
188  if (type != EXEC_FINAL && !onInterval())
189  return;
190 
191  // Call the output method
192  if (shouldOutput(type))
193  {
194  TIME_SECTION(_output_step_timer);
195  output(type);
196  }
197 }
const ExecFlagType EXEC_FORCED
virtual bool onInterval()
Returns true if the output interval is satisfied.
Definition: Output.C:211
virtual void output(const ExecFlagType &type)=0
Overload this function with the desired output activities.
virtual bool shouldOutput(const ExecFlagType &type)
Handles logic for determining if a step should be output.
Definition: Output.C:200
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
bool _allow_output
Flag for disabling output.
Definition: Output.h:240
PerfID _output_step_timer
Timers.
Definition: Output.h:252
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:852
const ExecFlagType EXEC_FINAL
const ExecFlagType EXEC_INITIAL

◆ outputSystemInformation()

void Console::outputSystemInformation ( )
overrideprotectedvirtual

Print system information.

Reimplemented from AdvancedOutput.

Definition at line 563 of file Console.C.

Referenced by initialSetup(), and output().

564 {
565  if (_system_info_flags.contains("framework"))
567 
568  if (_system_info_flags.contains("mesh"))
570 
571  if (_system_info_flags.contains("nonlinear"))
572  {
574  if (!output.empty())
575  _console << "Nonlinear System:\n" << output;
576  }
577 
578  if (_system_info_flags.contains("aux"))
579  {
581  if (!output.empty())
582  _console << "Auxiliary System:\n" << output;
583  }
584 
585  if (_system_info_flags.contains("relationship"))
586  {
588  if (!output.empty())
589  _console << "Relationship Managers:\n" << output;
590  }
591 
592  if (_system_info_flags.contains("execution"))
594 
595  if (_system_info_flags.contains("output"))
597 }
std::string outputNonlinearSystemInformation(FEProblemBase &problem)
Output the Nonlinear system information.
Definition: ConsoleUtils.C:114
std::string outputExecutionInformation(const MooseApp &app, FEProblemBase &problem)
Output execution information.
Definition: ConsoleUtils.C:242
std::string outputAuxiliarySystemInformation(FEProblemBase &problem)
Output the Auxiliary system information.
Definition: ConsoleUtils.C:108
std::string outputOutputInformation(MooseApp &app)
Output the output information.
Definition: ConsoleUtils.C:270
virtual void output(const ExecFlagType &type) override
Customizes the order of output for the various components as well as adds additional output such as t...
Definition: Console.C:284
std::string outputMeshInformation(FEProblemBase &problem, bool verbose=true)
Output the mesh information.
Definition: ConsoleUtils.C:54
bool contains(const std::string &value) const
Contains methods for seeing if a value is in the MultiMooseEnum.
MultiMooseEnum _system_info_flags
Flags for controlling the what simulations information is shown.
Definition: Console.h:227
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:174
std::string outputFrameworkInformation(const MooseApp &app)
Outputs framework information.
Definition: ConsoleUtils.C:35
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string outputRelationshipManagerInformation(const MooseApp &app)
Output action RelationshipManager information.
Definition: ConsoleUtils.C:222

◆ outputVectorPostprocessors()

virtual void Console::outputVectorPostprocessors ( )
inlineoverrideprotectedvirtual

Not implemented.

Reimplemented from TableOutput.

Definition at line 109 of file Console.h.

110  {
111  mooseError("Can't currently output VectorPostprocessors to the screen");
112  };
void mooseError(Args &&... args) const
Definition: MooseObject.h:140

◆ paramError()

template<typename... Args>
void MooseObject::paramError ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 100 of file MooseObject.h.

Referenced by ADKernel< compute_stage >::ADKernel(), DGKernel::DGKernel(), ElementValueSampler::ElementValueSampler(), IntegratedBC::IntegratedBC(), Kernel::Kernel(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalValueSampler::NodalValueSampler(), RandomIC::RandomIC(), and MultiAppCopyTransfer::transfer().

101  {
102  auto prefix = param + ": ";
103  if (!_pars.inputLocation(param).empty())
104  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
105  mooseError(prefix, args...);
106  }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parameters()

const InputParameters& MooseObject::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 57 of file MooseObject.h.

Referenced by FEProblemBase::addADJacobianMaterial(), FEProblemBase::addADResidualMaterial(), DumpObjectsProblem::addAuxKernel(), FEProblemBase::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarKernel(), DumpObjectsProblem::addBoundaryCondition(), FEProblemBase::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), DumpObjectsProblem::addDGKernel(), FEProblemBase::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), DumpObjectsProblem::addInitialCondition(), FEProblemBase::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), FEProblemBase::addInterfaceKernel(), DumpObjectsProblem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), DumpObjectsProblem::addMaterial(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), FEProblemBase::addVectorPostprocessor(), AdvancedOutput::AdvancedOutput(), assemble_l2(), Moose::assemble_matrix(), AuxKernel::AuxKernel(), AuxScalarKernel::AuxScalarKernel(), BoundsAux::BoundsAux(), LibmeshPartitioner::clone(), OversampleOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), Console(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), EigenProblem::EigenProblem(), Eigenvalue::Eigenvalue(), Executioner::Executioner(), Exodus::Exodus(), FEProblem::FEProblem(), GapValueAux::GapValueAux(), MooseObject::getCheckedPointerParam(), MooseMesh::init(), BlockRestrictable::initializeBlockRestrictable(), FEProblemBase::initNullSpaceVectors(), InterfaceKernel::InterfaceKernel(), isValid(), MooseVariableInterface< Real >::MooseVariableInterface(), NearestPointBase< LayeredAverage >::NearestPointBase(), NodeFaceConstraint::NodeFaceConstraint(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), MultiAppProjectionTransfer::projectSolution(), RandomIC::RandomIC(), InputParameterWarehouse::removeInputParameters(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), DumpObjectsProblem::stringifyParameters(), and Transient::Transient().

57 { return _pars; }
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168

◆ paramInfo()

template<typename... Args>
void MooseObject::paramInfo ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 131 of file MooseObject.h.

132  {
133  auto prefix = param + ": ";
134  if (!_pars.inputLocation(param).empty())
135  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
136  mooseInfo(prefix, args...);
137  }
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
void mooseInfo(Args &&... args) const
Definition: MooseObject.h:161
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ paramWarning()

template<typename... Args>
void MooseObject::paramWarning ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 115 of file MooseObject.h.

116  {
117  auto prefix = param + ": ";
118  if (!_pars.inputLocation(param).empty())
119  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
120  mooseWarning(prefix, args...);
121  }
void mooseWarning(Args &&... args) const
Definition: MooseObject.h:149
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:168
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ petscSetupOutput()

void Console::petscSetupOutput ( )
static

Output string for setting up PETSC output.

Definition at line 647 of file Console.C.

Referenced by Moose::PetscSupport::petscSetupOutput().

648 {
649  char c[] = {
650  32, 47, 94, 92, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
651  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
652  32, 32, 32, 32, 32, 32, 32, 47, 94, 92, 13, 10, 124, 32, 32, 32, 92, 95, 47,
653  94, 92, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
654  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 94, 92, 95, 47,
655  32, 32, 32, 124, 13, 10, 124, 32, 32, 32, 32, 32, 32, 32, 32, 92, 95, 47, 94,
656  92, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
657  32, 32, 32, 47, 94, 92, 95, 47, 32, 32, 32, 32, 32, 32, 32, 32, 124, 13, 10,
658  32, 92, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 92, 95, 47, 94, 92,
659  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 94, 92, 95, 47, 32, 32, 32,
660  32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 13, 10, 32, 32, 92, 95, 95, 32, 32,
661  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 92, 95, 95, 95, 45, 45, 45,
662  95, 95, 95, 47, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 95,
663  95, 47, 13, 10, 32, 32, 32, 32, 32, 45, 45, 45, 95, 95, 95, 32, 32, 32, 32,
664  32, 32, 32, 32, 32, 47, 32, 32, 32, 32, 32, 32, 32, 92, 32, 32, 32, 32, 32,
665  32, 32, 32, 32, 95, 95, 95, 45, 45, 45, 13, 10, 32, 32, 32, 32, 32, 32, 32,
666  32, 32, 32, 32, 45, 45, 45, 95, 95, 95, 32, 32, 124, 32, 32, 32, 32, 32, 32,
667  32, 32, 32, 124, 32, 32, 95, 95, 95, 45, 45, 45, 13, 10, 32, 32, 32, 32, 32,
668  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 124, 32, 32, 95, 32,
669  32, 32, 95, 32, 32, 124, 45, 45, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
670  32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 124, 111, 124, 32, 124, 111, 124,
671  32, 32, 124, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
672  32, 32, 32, 47, 32, 32, 32, 32, 45, 32, 32, 32, 45, 32, 32, 32, 32, 92, 13,
673  10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32,
674  32, 32, 32, 32, 32, 95, 95, 95, 32, 32, 32, 32, 32, 32, 124, 13, 10, 32, 32,
675  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 32, 32, 32,
676  45, 45, 32, 32, 32, 45, 45, 32, 32, 32, 32, 32, 92, 13, 10, 32, 32, 32, 32,
677  32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 32, 32, 32, 32, 32, 32, 32,
678  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 92, 13, 10, 32, 32, 32, 32,
679  32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 32, 32, 32, 32, 32, 47, 92, 32,
680  32, 32, 32, 32, 47, 92, 32, 32, 32, 32, 32, 32, 32, 124, 13, 10, 32, 32, 32,
681  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 92, 32, 32, 92, 32, 32, 32, 32, 32,
682  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 47, 13, 10, 32, 32, 32,
683  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 92, 32, 32, 92, 95, 95, 95, 95,
684  95, 95, 95, 95, 95, 95, 95, 95, 32, 47, 32, 32, 47, 92, 13, 10, 32, 32, 32,
685  32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 92, 32, 32, 32, 32, 32, 32,
686  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 92, 13, 10, 32, 32,
687  32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 32, 32, 92, 32, 32, 32, 32,
688  32, 39, 95, 95, 95, 39, 32, 32, 32, 32, 32, 47, 32, 32, 32, 32, 92, 13, 10,
689  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 92, 32, 32, 32, 32, 32, 92, 32,
690  45, 45, 95, 95, 45, 45, 45, 95, 95, 45, 45, 32, 47, 32, 32, 32, 32, 32, 47,
691  92, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 92, 47, 32, 32,
692  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
693  92, 47, 32, 32, 92, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 32,
694  47, 32, 32, 32, 32, 32, 32, 32, 77, 46, 79, 46, 79, 46, 83, 46, 69, 32, 32,
695  32, 32, 32, 32, 32, 92, 32, 32, 32, 92, 13, 10, 32, 32, 32, 32, 32, 32, 32,
696  47, 32, 32, 32, 124, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
697  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 32, 92, 13, 10, 32,
698  32, 32, 32, 32, 32, 124, 32, 32, 32, 32, 124, 45, 45, 45, 45, 45, 45, 45, 45,
699  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 124, 32,
700  32, 32, 32, 124, 13, 10, 32, 32, 32, 32, 32, 32, 32, 92, 32, 32, 32, 32, 92,
701  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
702  32, 32, 32, 32, 47, 32, 32, 32, 32, 47, 13, 10, 32, 32, 32, 32, 32, 32, 32,
703  32, 32, 92, 92, 32, 92, 95, 92, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
704  32, 32, 32, 32, 32, 32, 32, 32, 47, 95, 47, 32, 47, 47, 13, 10, 32, 32, 32,
705  32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 32, 92, 32, 32, 32, 32, 32, 32,
706  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 47, 32, 32, 45, 45, 13, 10, 32,
707  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 45,
708  45, 45, 95, 95, 95, 95, 95, 45, 45, 45, 32, 32, 124, 13, 10, 32, 32, 32, 32,
709  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 32, 32, 32, 124,
710  32, 32, 32, 124, 32, 32, 32, 32, 32, 124, 13, 10, 32, 32, 32, 32, 32, 32, 32,
711  32, 32, 32, 32, 32, 32, 32, 32, 32, 124, 32, 32, 32, 32, 32, 124, 32, 32, 32,
712  124, 32, 32, 32, 32, 32, 124, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
713  32, 32, 32, 32, 32, 47, 32, 86, 32, 32, 32, 32, 32, 92, 32, 47, 32, 32, 32,
714  32, 86, 32, 32, 92, 13, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
715  32, 32, 32, 124, 95, 124, 95, 95, 95, 95, 95, 124, 32, 124, 95, 95, 95, 95, 124,
716  95, 95, 124};
717  Moose::out << std::string(c) << std::endl << std::endl;
718 }

◆ registerTimedSection()

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
)
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 50 of file PerfGraphInterface.C.

51 {
52  if (_prefix != "")
53  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
54  else
55  return _perf_graph.registerSection(section_name, level);
56 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:41

◆ residualSetup()

void SetupInterface::residualSetup ( )
virtualinherited

Gets called just before the residual is computed and before this object is asked to do its job.

Definition at line 57 of file SetupInterface.C.

58 {
59 }

◆ setFileNumber()

void FileOutput::setFileNumber ( unsigned int  num)
inherited

Sets the file number manually.

This method was implemented for the MultiApp system, particularly when reseting an application and a new output file is desired after the reset.

Definition at line 178 of file FileOutput.C.

Referenced by OutputWarehouse::setFileNumbers().

179 {
180  _file_num = num;
181 }
unsigned int & _file_num
A file number counter, initialized to 0 (this must be controlled by the child class, see Exodus)
Definition: FileOutput.h:85

◆ shouldOutput()

bool AdvancedOutput::shouldOutput ( const ExecFlagType type)
protectedvirtualinherited

Handles logic for determining if a step should be output.

Returns
True if a call if output should be preformed

Reimplemented from FileOutput.

Definition at line 240 of file AdvancedOutput.C.

Referenced by Nemesis::output(), and OversampleOutput::outputStep().

241 {
242  if (!checkFilename())
243  return false;
244 
245  if (hasOutput(type))
246  return true;
247  else
248  return Output::shouldOutput(type);
249 }
virtual bool hasOutput()
Returns true if any of the other has methods return true.
virtual bool shouldOutput(const ExecFlagType &type)
Handles logic for determining if a step should be output.
Definition: Output.C:200
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:45
bool checkFilename()
Checks the filename for output Checks the output against the &#39;output_if_base_contians&#39; list...
Definition: FileOutput.C:147

◆ subdomainSetup()

void SetupInterface::subdomainSetup ( )
virtualinherited

Gets called when the subdomain changes (i.e.

in a Jacobian or residual loop) and before this object is asked to do its job

Reimplemented in Material, Constraint, GeneralUserObject, NodalUserObject, and ThreadedGeneralUserObject.

Definition at line 62 of file SetupInterface.C.

63 {
64 }

◆ systemInfoFlags()

MultiMooseEnum& Console::systemInfoFlags ( )
inline

Return system information flags.

Definition at line 77 of file Console.h.

78  {
80  mooseError(
81  "accessing console system information flags is not allowed after console initial setup");
82  return _system_info_flags;
83  }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
bool _allow_changing_sysinfo_flag
A boolean for protecting _system_info_flags from being changed undesirably.
Definition: Console.h:233
MultiMooseEnum _system_info_flags
Flags for controlling the what simulations information is shown.
Definition: Console.h:227

◆ time()

Real PetscOutput::time ( )
overridevirtualinherited

Get the output time.

This outputter enables the ability to perform output on the nonlinear and linear iterations performed by PETSc. To separate theses outputs within the output a pseudo time is defined, this function provides this time and it should be used in place of _time from Outputter.

Reimplemented from Output.

Definition at line 253 of file PetscOutput.C.

Referenced by FileOutput::FileOutput(), Tecplot::output(), Nemesis::output(), Exodus::outputEmptyTimestep(), Exodus::outputNodalVariables(), TableOutput::outputPostprocessors(), TableOutput::outputScalarVariables(), and writeTimestepInformation().

254 {
256  return _nonlinear_time;
257  else if (_on_linear_residual)
258  return _linear_time;
259  else
260  return Output::time();
261 }
bool _on_linear_residual
True if current output calls is on the linear residual (used by time())
Definition: PetscOutput.h:89
Real _linear_time
Psuedo linear time.
Definition: PetscOutput.h:83
bool _on_nonlinear_residual
True if current output call is on the non-linear residual (used by time())
Definition: PetscOutput.h:92
Real _nonlinear_time
The psuedo non-linear time.
Definition: PetscOutput.h:77
virtual Real time()
Get the output time.
Definition: Output.C:235

◆ timeOld()

Real Output::timeOld ( )
virtualinherited

Get the old output time.

Returns
The old output time, which may be different than the simulation time
See also
time()

Definition at line 244 of file Output.C.

Referenced by writeTimestepInformation().

245 {
246  if (_transient)
247  return _time_old;
248  else
249  return _t_step - 1;
250 }
Real & _time_old
The old time.
Definition: Output.h:198
int & _t_step
The current time step.
Definition: Output.h:201
bool _transient
Transient flag (true = transient)
Definition: Output.h:177

◆ timeStep()

int Output::timeStep ( )
virtualinherited

Get the current time step.

Definition at line 271 of file Output.C.

Referenced by Checkpoint::filename(), CSV::getVectorPostprocessorFileName(), and writeTimestepInformation().

272 {
273  return _t_step;
274 }
int & _t_step
The current time step.
Definition: Output.h:201

◆ timestepSetup()

void SetupInterface::timestepSetup ( )
virtualinherited

Gets called at the beginning of the timestep before this object is asked to do its job.

Reimplemented in SolutionUserObject, VectorPostprocessorVisualizationAux, NumNonlinearIterations, EqualValueEmbeddedConstraint, VectorMemoryUsage, and MemoryUsage.

Definition at line 47 of file SetupInterface.C.

48 {
49 }

◆ type()

const std::string& MooseObject::type ( ) const
inlineinherited

Get the type of this object.

Returns
the name of the type of this object

Definition at line 45 of file MooseObject.h.

Referenced by DumpObjectsProblem::addAuxKernel(), DumpObjectsProblem::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), DumpObjectsProblem::addAuxVariable(), DisplacedProblem::addAuxVariable(), FEProblemBase::addAuxVariable(), DumpObjectsProblem::addBoundaryCondition(), DumpObjectsProblem::addConstraint(), DumpObjectsProblem::addDGKernel(), DumpObjectsProblem::addDiracKernel(), FEProblemBase::addDistribution(), DumpObjectsProblem::addFunction(), FEProblemBase::addFunction(), DumpObjectsProblem::addInitialCondition(), DumpObjectsProblem::addInterfaceKernel(), DumpObjectsProblem::addKernel(), DumpObjectsProblem::addMaterial(), DumpObjectsProblem::addNodalKernel(), FEProblemBase::addPredictor(), FEProblemBase::addSampler(), DumpObjectsProblem::addScalarKernel(), FEProblemBase::addScalarVariable(), PhysicsBasedPreconditioner::addSystem(), FEProblemBase::addTimeIntegrator(), DumpObjectsProblem::addVariable(), DisplacedProblem::addVariable(), FEProblemBase::addVariable(), FEProblemBase::advanceMultiApps(), FEProblemBase::backupMultiApps(), MooseMesh::buildRefinementAndCoarseningMaps(), FEProblemBase::computeAuxiliaryKernels(), ElemElemConstraint::computeElemNeighJacobian(), InterfaceKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighResidual(), InterfaceKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), FEProblemBase::computeMultiAppsDT(), InterfaceKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), DGConvection::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), DGConvection::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), DGDiffusion::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), FEProblemBase::computeUserObjects(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), FEProblemBase::finishMultiAppStep(), ElementSubdomainIDGenerator::generate(), ElementGenerator::getElemType(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), FEProblemBase::getTransfers(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), SolutionUserObject::initialSetup(), AdvancedOutput::initShowHideLists(), AssignElementSubdomainID::modify(), ControlOutput::output(), Gnuplot::output(), Exodus::output(), CSV::output(), output(), Nemesis::output(), AdvancedOutput::output(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), FEProblemBase::restoreMultiApps(), FEProblemBase::setCoupling(), FileOutput::shouldOutput(), Output::shouldOutput(), AdvancedOutput::shouldOutput(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), and AdvancedOutput::wantOutput().

45 { return _type; }
const std::string & _type
The type of this object (the Class name)
Definition: MooseObject.h:174

◆ write()

void Console::write ( std::string  message,
bool  indent = true 
)
protected

Write message to screen and/or file.

Parameters
messageThe desired message
indentTrue if multiapp indenting is desired

Definition at line 617 of file Console.C.

Referenced by initialSetup(), mooseConsole(), output(), and ~Console().

618 {
619  // Do nothing if the message is empty, writing empty strings messes with multiapp indenting
620  if (message.empty())
621  return;
622 
623  // Write the message to file
624  if (_write_file)
625  _file_output_stream << message;
626 
627  // Apply MultiApp indenting
628  if (indent && _app.multiAppLevel() > 0)
629  MooseUtils::indentMessage(_app.name(), message);
630 
631  // Write message to the screen
632  if (_write_screen)
633  Moose::out << message;
634 }
std::string indent(unsigned int spaces)
Create empty string for indenting.
Definition: ConsoleUtils.C:29
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:72
void indentMessage(const std::string &prefix, std::string &message, const char *color=COLOR_CYAN)
Indents the supplied message given the prefix and color.
Definition: MooseUtils.C:488
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:515
bool _write_screen
Flag for controlling outputting console information to screen.
Definition: Console.h:166
std::stringstream _file_output_stream
Stream for storing information to be written to a file.
Definition: Console.h:172
bool _write_file
Flag for controlling outputting console information to a file.
Definition: Console.h:163
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:171

◆ writeStreamToFile()

void Console::writeStreamToFile ( bool  append = true)
protected

Write the file stream to the file.

Parameters
appendToggle for appending the file

This helper function writes the _file_output_stream to the file and clears the stream, by default the file is appended. This does nothing if 'output_file' is false.

Definition at line 349 of file Console.C.

Referenced by initialSetup(), output(), and ~Console().

350 {
351  if (!_write_file)
352  return;
353 
354  // Create the stream
355  std::ofstream output;
356 
357  // Open the file
358  if (append)
359  output.open(filename().c_str(), std::ios::app | std::ios::out);
360  else
361  output.open(filename().c_str(), std::ios::trunc);
362 
363  if (output.fail())
364  mooseError("Unable to open file ", filename());
365 
366  std::string s = _file_output_stream.str();
367  // Write contents of file output stream and close the file
369  output.close();
370 
371  // Clear the file output stream
372  _file_output_stream.str("");
373 }
void mooseError(Args &&... args) const
Definition: MooseObject.h:140
virtual void output(const ExecFlagType &type) override
Customizes the order of output for the various components as well as adds additional output such as t...
Definition: Console.C:284
virtual std::string filename() override
Creates the output file name Appends the user-supplied &#39;file_base&#39; input parameter with a &#39;...
Definition: Console.C:278
std::stringstream _file_output_stream
Stream for storing information to be written to a file.
Definition: Console.h:172
std::string & removeColor(std::string &msg)
remove ANSI escape sequences for teminal color from msg
Definition: MooseUtils.C:480
bool _write_file
Flag for controlling outputting console information to a file.
Definition: Console.h:163

◆ writeTimestepInformation()

void Console::writeTimestepInformation ( )
protected

Prints the time step information for the screen output.

Definition at line 376 of file Console.C.

Referenced by output().

377 {
378  // Stream to build the time step information
379  std::stringstream oss;
380 
381  // Write timestep data for transient executioners
382  if (_transient)
383  {
384  // Write time step and time information
385  oss << "\nTime Step " << timeStep();
386 
387  // Set precision
388  if (_precision > 0)
389  oss << std::setw(_precision) << std::setprecision(_precision) << std::setfill('0')
390  << std::showpoint;
391 
392  // Show scientific notation
393  if (_scientific_time)
394  oss << std::scientific;
395 
396  // Print the time
397  oss << ", time = " << time() << '\n';
398 
399  // Show old time information, if desired
400  if (_verbose)
401  oss << std::right << std::setw(21) << std::setfill(' ') << "old time = " << std::left
402  << timeOld() << '\n';
403 
404  // Show the time delta information
405  oss << std::right << std::setw(21) << std::setfill(' ') << "dt = " << std::left << dt() << '\n';
406 
407  // Show the old time delta information, if desired
408  if (_verbose)
409  oss << std::right << std::setw(21) << std::setfill(' ') << "old dt = " << _dt_old << '\n';
410  }
411 
412  // Output to the screen
413  _console << oss.str() << std::flush;
414 }
unsigned int _precision
Number of significant digits.
Definition: Console.h:199
virtual Real dt()
Get the current time step size.
Definition: Output.C:253
Real & _dt_old
Old time step delta.
Definition: Output.h:207
virtual Real time() override
Get the output time.
Definition: PetscOutput.C:253
bool _verbose
Flag for writing detailed time step information.
Definition: Console.h:169
bool _transient
Transient flag (true = transient)
Definition: Output.h:177
virtual Real timeOld()
Get the old output time.
Definition: Output.C:244
bool _scientific_time
Toggle for outputting time in time and dt in scientific notation.
Definition: Console.h:160
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
virtual int timeStep()
Get the current time step.
Definition: Output.C:271

◆ writeVariableNorms()

void Console::writeVariableNorms ( )
protected

Print the L2-norms for each variable.

Definition at line 417 of file Console.C.

Referenced by output().

418 {
419  // If all_variable_norms is true, then so should outlier printing
422 
423  // if we are not priting anything, let's not waste time computing the norms below and just exit
424  // this call
425  if ((_all_variable_norms == false) && (_outlier_variable_norms == false))
426  return;
427 
428  // if it is an eigenvalue prolblem, we do not know to define RHS,
429  // and then we do not know how to compute variable norms
430  if (dynamic_cast<EigenProblem *>(_problem_ptr) != nullptr)
431  return;
432 
433  // Flag set when header prints
434  bool header = false;
435 
436  // String stream for variable norm information
437  std::ostringstream oss;
438 
439  // Get a references to the NonlinearSystem and libMesh system
441  System & sys = nl.system();
442 
443  // Storage for norm outputs
444  std::map<std::string, Real> other;
445  std::map<std::string, Real> outlier;
446 
447  // Average norm
448  unsigned int n_vars = sys.n_vars();
449  Real avg_norm = (nl.nonlinearNorm() * nl.nonlinearNorm()) / n_vars;
450 
451  // Compute the norms for each of the variables
452  for (unsigned int i = 0; i < n_vars; i++)
453  {
454  // Compute the norm and extract the variable name
455  Real var_norm = sys.calculate_norm(nl.RHS(), i, DISCRETE_L2);
456  var_norm *= var_norm; // use the norm squared
457  std::string var_name = sys.variable_name(i);
458 
459  // Outlier if the variable norm is greater than twice (default) of the average norm
460  if (_outlier_variable_norms && (var_norm > _outlier_multiplier[1] * avg_norm))
461  {
462  // Print the header
463  if (!header)
464  {
465  oss << "\nOutlier Variable Residual Norms:\n";
466  header = true;
467  }
468 
469  // Set the color, RED if the variable norm is 0.8 (default) of the total norm
470  std::string color = COLOR_YELLOW;
471  if (_outlier_variable_norms && (var_norm > _outlier_multiplier[0] * avg_norm * n_vars))
472  color = COLOR_RED;
473 
474  // Display the residual
475  oss << " " << var_name << ": " << std::scientific << color << std::sqrt(var_norm)
476  << COLOR_DEFAULT << '\n';
477  }
478 
479  // GREEN
480  else if (_all_variable_norms)
481  {
482  // Print the header if it doesn't already exist
483  if (!header)
484  {
485  oss << "\nVariable Residual Norms:\n";
486  header = true;
487  }
488  oss << " " << var_name << ": " << std::scientific << COLOR_GREEN << std::sqrt(var_norm)
489  << COLOR_DEFAULT << '\n';
490  }
491  }
492 
493  // Update the output streams
494  _console << oss.str();
495 }
NonlinearSystemBase & getNonlinearSystemBase()
bool _all_variable_norms
Flag for writing all variable norms.
Definition: Console.h:190
bool _outlier_variable_norms
Flag for writing outlier variable norms.
Definition: Console.h:193
NonlinearSystemBase * nl
Nonlinear system to be solved.
FEProblemBase * _problem_ptr
Pointer the the FEProblemBase object for output object (use this)
Definition: Output.h:174
virtual NumericVector< Number > & RHS()=0
std::vector< Real > _outlier_multiplier
Multipliers for coloring variable residual norms (default [2, 0.8])
Definition: Console.h:196
virtual System & system() override
Get the reference to the libMesh system.
Real nonlinearNorm() const
Return the last nonlinear norm.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

Friends And Related Function Documentation

◆ OutputWarehouse

friend class OutputWarehouse
friend

Definition at line 229 of file Console.h.

Member Data Documentation

◆ _advanced_execute_on

OutputOnWarehouse Output::_advanced_execute_on
protectedinherited

◆ _all_data_table

FormattedTable& TableOutput::_all_data_table
protectedinherited

Table containing postprocessor values and scalar aux variables.

Definition at line 79 of file TableOutput.h.

Referenced by TableOutput::clear(), CSV::initialSetup(), Gnuplot::output(), CSV::output(), TableOutput::outputPostprocessors(), TableOutput::outputScalarVariables(), and TableOutput::TableOutput().

◆ _all_variable_norms

bool Console::_all_variable_norms
protected

Flag for writing all variable norms.

Definition at line 190 of file Console.h.

Referenced by writeVariableNorms().

◆ _allow_changing_sysinfo_flag

bool Console::_allow_changing_sysinfo_flag
private

A boolean for protecting _system_info_flags from being changed undesirably.

Definition at line 233 of file Console.h.

Referenced by initialSetup(), and systemInfoFlags().

◆ _allow_output

bool Output::_allow_output
protectedinherited

Flag for disabling output.

Definition at line 240 of file Output.h.

Referenced by Output::allowOutput(), OversampleOutput::outputStep(), and Output::outputStep().

◆ _app

MooseApp& MooseObject::_app
protectedinherited

The MooseApp this object is associated with.

Definition at line 171 of file MooseObject.h.

Referenced by GridPartitioner::_do_partition(), AB2PredictorCorrector::AB2PredictorCorrector(), Executioner::addAttributeReporter(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addOutput(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), AlgebraicRelationshipManager::attachAlgebraicFunctorHelper(), RelationshipManager::attachRelationshipManagers(), ElementSideNeighborLayers::attachRelationshipManagersInternal(), ElementPointNeighbors::attachRelationshipManagersInternal(), FileMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), FEProblemBase::checkNonlinearConvergence(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeResidualTags(), Console(), TimeStepper::constrainStep(), MultiApp::createApp(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::dumpVariableHelper(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), NonlinearEigen::execute(), InversePowerMethod::execute(), Transient::execute(), Steady::execute(), FileOutput::FileOutput(), FEProblemBase::forceOutput(), MeshGenerator::getMesh(), MeshGenerator::getMeshByName(), MooseObject::getMooseApp(), InversePowerMethod::init(), NonlinearEigen::init(), Transient::init(), Steady::init(), MooseMesh::init(), NumPicardIterations::initialize(), TimePeriod::initialSetup(), initialSetup(), MultiApp::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), FEProblemBase::initPetscOutput(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), InversePowerMethod::InversePowerMethod(), MooseObject::mooseError(), MooseMesh::MooseMesh(), NonlinearEigen::NonlinearEigen(), EigenExecutionerBase::normalizeSolution(), PerfGraphOutput::output(), Tecplot::output(), Exodus::output(), Nemesis::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), outputSystemInformation(), MultiApp::parentOutputPositionChanged(), PerformanceData::PerformanceData(), PetscOutput::petscLinearOutput(), PetscOutput::petscNonlinearOutput(), FEProblemBase::projectSolution(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), TimeSequenceStepperBase::setupSequence(), Transient::setupTimeIntegrator(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), FEProblemBase::theWarehouse(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), Transient::Transient(), and write().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 32 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), SimplePredictor::apply(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualTags(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), AB2PredictorCorrector::converged(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), FEProblemBase::FEProblemBase(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), PerfGraphOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), outputInput(), outputPostprocessors(), outputScalarVariables(), outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), Transient::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), writeTimestepInformation(), writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _console_buffer

const std::ostringstream& Console::_console_buffer
private

Reference to cached messages from calls to _console.

Definition at line 215 of file Console.h.

◆ _current_execute_flag

const ExecFlagType& SetupInterface::_current_execute_flag
protectedinherited

Reference to FEProblemBase.

Definition at line 98 of file SetupInterface.h.

◆ _dt

Real& Output::_dt
protectedinherited

Time step delta.

Definition at line 204 of file Output.h.

Referenced by Output::dt(), and PetscOutput::solveSetup().

◆ _dt_old

Real& Output::_dt_old
protectedinherited

Old time step delta.

Definition at line 207 of file Output.h.

Referenced by Output::dtOld(), and writeTimestepInformation().

◆ _elemental_as_nodal

bool AdvancedOutput::_elemental_as_nodal
protectedinherited

Flags to control nodal output.

Definition at line 260 of file AdvancedOutput.h.

Referenced by AdvancedOutput::AdvancedOutput(), Exodus::Exodus(), and AdvancedOutput::initialSetup().

◆ _enabled

const bool& MooseObject::_enabled
protectedinherited

Reference to the "enable" InputParaemters, used by Controls for toggling on/off MooseObjects.

Definition at line 180 of file MooseObject.h.

Referenced by MooseObject::enabled().

◆ _end_step

int Output::_end_step
protectedinherited

End outputting at this time step.

Definition at line 228 of file Output.h.

Referenced by Output::onInterval().

◆ _end_time

Real Output::_end_time
protectedinherited

End outputting time.

Definition at line 222 of file Output.h.

◆ _es_ptr

EquationSystems* Output::_es_ptr
protectedinherited

◆ _exec_flags

const std::vector<ExecFlagType> SetupInterface::_exec_flags
protectedinherited

(DEPRECATED) execution flag (when is the object executed/evaluated) TODO: ExecFlagType

Definition at line 95 of file SetupInterface.h.

Referenced by SetupInterface::execBitFlags(), MultiAppTransfer::execFlags(), and SetupInterface::execFlags().

◆ _execute_enum

const ExecFlagEnum& SetupInterface::_execute_enum
protectedinherited

Execute settings for this oejct.

Definition at line 92 of file SetupInterface.h.

Referenced by ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), and SetupInterface::getExecuteOnEnum().

◆ _execute_on

ExecFlagEnum Output::_execute_on
protectedinherited

The common Execution types; this is used as the default execution type for everything except system information and input.

Definition at line 192 of file Output.h.

Referenced by AdvancedOutput::AdvancedOutput(), Console(), Output::executeOn(), AdvancedOutput::initExecutionTypes(), initialSetup(), output(), Output::Output(), PetscOutput::PetscOutput(), Output::shouldOutput(), and PetscOutput::solveSetup().

◆ _file_base

std::string FileOutput::_file_base
protectedinherited

◆ _file_num

unsigned int& FileOutput::_file_num
protectedinherited

◆ _file_output_stream

std::stringstream Console::_file_output_stream
protected

Stream for storing information to be written to a file.

Definition at line 172 of file Console.h.

Referenced by write(), and writeStreamToFile().

◆ _fit_mode

MooseEnum Console::_fit_mode
protected

The FormattedTable fit mode.

Definition at line 157 of file Console.h.

Referenced by outputPostprocessors(), and outputScalarVariables().

◆ _initialized

bool Output::_initialized
protectedinherited

True if init() has been called.

Definition at line 237 of file Output.h.

Referenced by AdvancedOutput::hasOutputHelper(), Output::initialSetup(), AdvancedOutput::initialSetup(), and output().

◆ _interval

const unsigned int Output::_interval
protectedinherited

The output time step interval.

Definition at line 213 of file Output.h.

Referenced by Output::onInterval().

◆ _is_advanced

bool Output::_is_advanced
protectedinherited

Flag for advanced output testing.

Definition at line 243 of file Output.h.

Referenced by AdvancedOutput::AdvancedOutput(), and Output::isAdvanced().

◆ _libmesh_log

bool Console::_libmesh_log
protected

Control the display libMesh performance log.

Definition at line 184 of file Console.h.

Referenced by initialSetup(), and ~Console().

◆ _linear_iter

PetscInt PetscOutput::_linear_iter
protectedinherited

Current linear iteration returned from PETSc.

Definition at line 52 of file PetscOutput.h.

Referenced by output(), and PetscOutput::petscLinearOutput().

◆ _max_rows

unsigned int Console::_max_rows
protected

The max number of table rows.

Definition at line 154 of file Console.h.

Referenced by outputPostprocessors(), and outputScalarVariables().

◆ _mci_feproblem

FEProblemBase& MeshChangedInterface::_mci_feproblem
protectedinherited

Reference to FEProblemBase instance.

Definition at line 42 of file MeshChangedInterface.h.

Referenced by MeshChangedInterface::MeshChangedInterface().

◆ _mesh_ptr

MooseMesh* Output::_mesh_ptr
protectedinherited

A convenience pointer to the current mesh (reference or displaced depending on "use_displaced")

Definition at line 186 of file Output.h.

Referenced by OversampleOutput::cloneMesh(), OversampleOutput::initOversample(), Tecplot::output(), XDA::output(), Output::Output(), and OversampleOutput::updateOversample().

◆ _name

const std::string& MooseObject::_name
protectedinherited

◆ _new_row_tol

const Real TableOutput::_new_row_tol
protectedinherited

Tolerance used when deciding whether or not to add a new row to the table.

Definition at line 82 of file TableOutput.h.

Referenced by TableOutput::outputPostprocessors().

◆ _nonlinear_iter

PetscInt PetscOutput::_nonlinear_iter
protectedinherited

Current non-linear iteration returned from PETSc.

Definition at line 49 of file PetscOutput.h.

Referenced by output(), and PetscOutput::petscNonlinearOutput().

◆ _norm

Real PetscOutput::_norm
protectedinherited

Current norm returned from PETSc.

Definition at line 46 of file PetscOutput.h.

Referenced by output(), PetscOutput::petscLinearOutput(), and PetscOutput::petscNonlinearOutput().

◆ _num

unsigned int Output::_num
protectedinherited

The number of outputs written.

Definition at line 210 of file Output.h.

◆ _old_linear_norm

Real Console::_old_linear_norm
private

Storage for the old linear residual (needed for color output and only when used when printing to the screen)

Definition at line 218 of file Console.h.

Referenced by output().

◆ _old_nonlinear_norm

Real Console::_old_nonlinear_norm
private

Storage for the old non linear residual (needed for color output and only when used when printing to the screen)

Definition at line 221 of file Console.h.

Referenced by output().

◆ _outlier_multiplier

std::vector<Real> Console::_outlier_multiplier
protected

Multipliers for coloring variable residual norms (default [2, 0.8])

Definition at line 196 of file Console.h.

Referenced by writeVariableNorms().

◆ _outlier_variable_norms

bool Console::_outlier_variable_norms
protected

Flag for writing outlier variable norms.

Definition at line 193 of file Console.h.

Referenced by writeVariableNorms().

◆ _output_if_base_contains

std::vector<std::string> FileOutput::_output_if_base_contains
protectedinherited

Storage for 'output_if_base_contains'.

Definition at line 91 of file FileOutput.h.

Referenced by FileOutput::checkFilename().

◆ _output_step_timer

PerfID Output::_output_step_timer
protectedinherited

Timers.

Definition at line 252 of file Output.h.

Referenced by OversampleOutput::outputStep(), and Output::outputStep().

◆ _padding

unsigned int FileOutput::_padding
protectedinherited

◆ _pars

const InputParameters& MooseObject::_pars
protectedinherited

◆ _perf_graph

PerfGraph& PerfGraphInterface::_perf_graph
protectedinherited

The performance graph to add to.

Definition at line 66 of file PerfGraphInterface.h.

Referenced by PerfGraphData::getValue(), and PerfGraphInterface::registerTimedSection().

◆ _perf_header

bool Console::_perf_header
protected

State for the performance log header information.

Definition at line 187 of file Console.h.

◆ _perf_log

bool Console::_perf_log
protected

State for all performance logging.

Definition at line 175 of file Console.h.

Referenced by Console().

◆ _perf_log_interval

unsigned int Console::_perf_log_interval
protected

The interval at which the performance log is printed.

Definition at line 178 of file Console.h.

Referenced by output().

◆ _pg_params

const InputParameters* PerfGraphInterface::_pg_params
protectedinherited

Params.

Definition at line 63 of file PerfGraphInterface.h.

◆ _postprocessor_table

FormattedTable& TableOutput::_postprocessor_table
protectedinherited

Table containing postprocessor data.

Definition at line 67 of file TableOutput.h.

Referenced by TableOutput::clear(), TableOutput::outputPostprocessors(), outputPostprocessors(), and TableOutput::TableOutput().

◆ _precision

unsigned int Console::_precision
protected

Number of significant digits.

Definition at line 199 of file Console.h.

Referenced by writeTimestepInformation().

◆ _prefix

std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 69 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::registerTimedSection().

◆ _print_mesh_changed_info

bool Console::_print_mesh_changed_info
private

Flag for printing mesh information when the mesh changes.

Definition at line 224 of file Console.h.

Referenced by meshChanged().

◆ _problem_ptr

FEProblemBase* Output::_problem_ptr
protectedinherited

◆ _scalar_as_nodal

bool AdvancedOutput::_scalar_as_nodal
protectedinherited

◆ _scalar_table

FormattedTable& TableOutput::_scalar_table
protectedinherited

Table containing scalar aux variables.

Definition at line 76 of file TableOutput.h.

Referenced by TableOutput::clear(), TableOutput::outputScalarVariables(), and outputScalarVariables().

◆ _scientific_time

bool Console::_scientific_time
protected

Toggle for outputting time in time and dt in scientific notation.

Definition at line 160 of file Console.h.

Referenced by writeTimestepInformation().

◆ _sequence

bool Output::_sequence
protectedinherited

Flag for forcing call to outputSetup() with every call to output() (restartable)

Definition at line 189 of file Output.h.

◆ _solve_log

bool Console::_solve_log
protected

State for solve performance log.

Definition at line 181 of file Console.h.

Referenced by Console().

◆ _start_step

int Output::_start_step
protectedinherited

Start outputting at this time step.

Definition at line 225 of file Output.h.

Referenced by Output::onInterval().

◆ _start_time

Real Output::_start_time
protectedinherited

Start outputting time.

Definition at line 219 of file Output.h.

Referenced by Output::onInterval().

◆ _sync_only

bool Output::_sync_only
protectedinherited

Flag for only executing at sync times.

Definition at line 234 of file Output.h.

Referenced by Output::onInterval().

◆ _sync_times

std::set<Real> Output::_sync_times
protectedinherited

Sync times for this outputter.

Definition at line 216 of file Output.h.

Referenced by Output::onInterval().

◆ _system_info_flags

MultiMooseEnum Console::_system_info_flags
private

Flags for controlling the what simulations information is shown.

Definition at line 227 of file Console.h.

Referenced by Console(), outputSystemInformation(), and systemInfoFlags().

◆ _t_step

int& Output::_t_step
protectedinherited

◆ _t_tol

Real Output::_t_tol
protectedinherited

Time checking tolerance.

Definition at line 231 of file Output.h.

Referenced by PetscOutput::solveSetup().

◆ _tables_restartable

bool TableOutput::_tables_restartable
protectedinherited

Flag for allowing all table data to become restartable.

Definition at line 64 of file TableOutput.h.

◆ _time

Real& Output::_time
protectedinherited

◆ _time_column

const bool TableOutput::_time_column
protectedinherited

Enable/disable output of time column for Postprocessors.

Definition at line 88 of file TableOutput.h.

Referenced by TableOutput::TableOutput().

◆ _time_data

const bool TableOutput::_time_data
protectedinherited

Enable/disable VecptorPostprocessor time data file.

Definition at line 85 of file TableOutput.h.

Referenced by CSV::output(), and TableOutput::outputVectorPostprocessors().

◆ _time_old

Real& Output::_time_old
protectedinherited

The old time.

Definition at line 198 of file Output.h.

Referenced by PetscOutput::solveSetup(), and Output::timeOld().

◆ _transient

bool Output::_transient
protectedinherited

Transient flag (true = transient)

Definition at line 177 of file Output.h.

Referenced by Output::dt(), Output::dtOld(), Output::time(), Output::timeOld(), and writeTimestepInformation().

◆ _type

const std::string& MooseObject::_type
protectedinherited

The type of this object (the Class name)

Definition at line 174 of file MooseObject.h.

Referenced by FEProblemBase::init(), and MooseObject::type().

◆ _use_displaced

bool Output::_use_displaced
protectedinherited

Flag for using displaced mesh.

Definition at line 180 of file Output.h.

Referenced by Output::Output().

◆ _vector_postprocessor_tables

std::map<std::string, FormattedTable> TableOutput::_vector_postprocessor_tables
protectedinherited

Formatted tables for outputting vector postprocessor data. One per VectorPostprocessor.

Definition at line 70 of file TableOutput.h.

Referenced by TableOutput::clear(), CSV::output(), and TableOutput::outputVectorPostprocessors().

◆ _vector_postprocessor_time_tables

std::map<std::string, FormattedTable>& TableOutput::_vector_postprocessor_time_tables
protectedinherited

Table for vector postprocessor time data.

Definition at line 73 of file TableOutput.h.

Referenced by TableOutput::clear(), CSV::output(), and TableOutput::outputVectorPostprocessors().

◆ _verbose

bool Console::_verbose
protected

Flag for writing detailed time step information.

Definition at line 169 of file Console.h.

Referenced by initialSetup(), and writeTimestepInformation().

◆ _write_file

bool Console::_write_file
protected

Flag for controlling outputting console information to a file.

Definition at line 163 of file Console.h.

Referenced by outputInput(), write(), and writeStreamToFile().

◆ _write_screen

bool Console::_write_screen
protected

Flag for controlling outputting console information to screen.

Definition at line 166 of file Console.h.

Referenced by outputInput(), and write().


The documentation for this class was generated from the following files: