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

Base class for MOOSE-based applications. More...

#include <MooseApp.h>

Inheritance diagram for MooseApp:
[legend]

Public Member Functions

virtual ~MooseApp ()
 
TheWarehousetheWarehouse ()
 
const std::string & name () const
 Get the name of the object. More...
 
virtual void checkRegistryLabels ()
 
virtual std::string getPrintableName () const
 Get printable name of the application. More...
 
InputParametersparameters ()
 Get the parameters of the object. More...
 
const std::string & type () const
 Get the type of this object as a string. More...
 
PerfGraphperfGraph ()
 Get the PerfGraph for this app. More...
 
bool isParamValid (const std::string &name) const
 
virtual void run ()
 Run the application. More...
 
std::string getFrameworkVersion () const
 Returns the framework version. More...
 
virtual std::string getVersion () const
 Returns the current version of the framework or application (default: framework version). More...
 
std::string getPrintableVersion () const
 Non-virtual method for printing out the version string in a consistent format. More...
 
virtual void setupOptions ()
 Setup options based on InputParameters. More...
 
ActionWarehouseactionWarehouse ()
 
Parserparser ()
 
Syntaxsyntax ()
 
void setInputFileName (std::string input_file_name)
 Set the input file name. More...
 
std::string getInputFileName () const
 Returns the input file name that was set with setInputFileName. More...
 
void setOutputFileBase (std::string output_file_base)
 Override the selection of the output file base name. More...
 
std::string getOutputFileBase () const
 Override the selection of the output file base name. More...
 
void setOutputPosition (Point p)
 Tell the app to output in a specific position. More...
 
std::list< std::string > getCheckpointDirectories () const
 Get all checkpoint directories. More...
 
std::list< std::string > getCheckpointFiles () const
 Extract all possible checkpoint file names. More...
 
bool hasOutputPosition () const
 Whether or not an output position has been set. More...
 
Point getOutputPosition () const
 Get the output position. More...
 
void setStartTime (const Real time)
 Set the starting time for the simulation. More...
 
bool hasStartTime () const
 
Real getStartTime () const
 
void setGlobalTimeOffset (const Real offset)
 Each App has it's own local time. More...
 
Real getGlobalTimeOffset () const
 Each App has it's own local time. More...
 
std::string getFileName (bool stripLeadingPath=true) const
 Return the filename that was parsed. More...
 
void setCheckUnusedFlag (bool warn_is_error=false)
 Set a flag so that the parser will either warn or error when unused variables are seen after parsing is complete. More...
 
void setErrorOverridden ()
 Set a flag so that the parser will throw an error if overridden parameters are detected. More...
 
void disableCheckUnusedFlag ()
 Removes warnings and error checks for unrecognized variables in the input file. More...
 
ExecutionergetExecutioner () const
 Retrieve the Executioner for this App. More...
 
std::shared_ptr< Executioner > & executioner ()
 Retrieve the Executioner for this App. More...
 
void setExecutioner (std::shared_ptr< Executioner > &&executioner)
 Set the Executioner for this App. More...
 
bool & useNonlinear ()
 Set a Boolean indicating whether this app will use a Nonlinear or Eigen System. More...
 
bool & useEigenvalue ()
 Set a Boolean indicating whether this app will use an eigenvalue executioner. More...
 
FactorygetFactory ()
 Retrieve the Factory associated with this App. More...
 
processor_id_type processor_id ()
 
ActionFactorygetActionFactory ()
 Retrieve the ActionFactory associated with this App. More...
 
std::shared_ptr< CommandLinecommandLine () const
 Get the command line. More...
 
bool & setFileRestart ()
 This method is here so we can determine whether or not we need to use a separate reader to read the mesh BEFORE we create the mesh. More...
 
virtual void runInputFile ()
 Actually build everything in the input file. More...
 
virtual void executeExecutioner ()
 Execute the Executioner that was built. More...
 
bool getDistributedMeshOnCommandLine () const
 Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibility) on the command line and false otherwise. More...
 
bool getParallelMeshOnCommandLine () const
 Deprecated. More...
 
bool isRecovering () const
 Whether or not this is a "recover" calculation. More...
 
bool isRestarting () const
 Whether or not this is a "restart" calculation. More...
 
bool isSplitMesh () const
 Whether or not this is a split mesh operation. More...
 
bool isUseSplit () const
 Whether or not we are running with pre-split (distributed mesh) More...
 
bool hasRecoverFileBase ()
 Return true if the recovery file base is set. More...
 
std::string getRecoverFileBase ()
 The file_base for the recovery file. More...
 
void setRecoverFileBase (std::string recover_base)
 mutator for recover_base (set by RecoverBaseAction) More...
 
std::string getRecoverFileSuffix ()
 The suffix for the recovery file. More...
 
void setRecoverFileSuffix (std::string recover_suffix)
 mutator for recover_suffix More...
 
bool halfTransient ()
 Whether or not this simulation should only run half its transient (useful for testing recovery) More...
 
void setOutputFileNumbers (std::map< std::string, unsigned int > numbers)
 Store a map of outputter names and file numbers The MultiApp system requires this to get the file numbering to propagate down through the Multiapps. More...
 
std::map< std::string, unsigned int > & getOutputFileNumbers ()
 Store a map of outputter names and file numbers The MultiApp system requires this to get the file numbering to propogate down through the multiapps. More...
 
OutputWarehousegetOutputWarehouse ()
 Get the OutputWarehouse objects. More...
 
const SystemInfogetSystemInfo () const
 Get SystemInfo object. More...
 
std::string appNameToLibName (const std::string &app_name) const
 Converts an application name to a library name: Examples: AnimalApp -> libanimal-oprof.la (assuming METHOD=oprof) ThreeWordAnimalApp -> libthree_word_animal-dbg.la (assuming METHOD=dbg) More...
 
std::string libNameToAppName (const std::string &library_name) const
 Converts a library name to an application name: More...
 
std::set< std::string > getLoadedLibraryPaths () const
 Return the loaded library filenames in a std::vector. More...
 
InputParameterWarehousegetInputParameterWarehouse ()
 Get the InputParameterWarehouse for MooseObjects. More...
 
void registerRestartableData (std::string name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid)
 
const RestartableDatasgetRestartableData ()
 Return reference to the restatable data object. More...
 
std::set< std::string > & getRecoverableData ()
 Return a reference to the recoverable data object. More...
 
virtual std::shared_ptr< Backupbackup ()
 Create a Backup from the current App. More...
 
virtual void restore (std::shared_ptr< Backup > backup, bool for_restart=false)
 Restore a Backup. More...
 
virtual std::string header () const
 Returns a string to be printed at the beginning of a simulation. More...
 
unsigned int multiAppLevel () const
 The MultiApp Level. More...
 
unsigned int multiAppNumber () const
 The MultiApp number. More...
 
bool isUltimateMaster ()
 Whether or not this app is the ultimate master app. More...
 
void addMeshModifier (const std::string &modifier_name, const std::string &name, InputParameters parameters)
 Add a mesh modifier that will act on the meshes in the system. More...
 
const MeshModifiergetMeshModifier (const std::string &name) const
 Get a mesh modifier with its name. More...
 
std::vector< std::string > getMeshModifierNames () const
 Get names of all mesh modifiers Note: This function should be called after all mesh modifiers are added with the 'add_mesh_modifier' task. More...
 
void clearMeshModifiers ()
 Clear all mesh modifers. More...
 
void executeMeshModifiers ()
 Execute and clear the Mesh Modifiers data structure. More...
 
void addMeshGenerator (const std::string &generator_name, const std::string &name, InputParameters parameters)
 Add a mesh generator that will act on the meshes in the system. More...
 
const MeshGeneratorgetMeshGenerator (const std::string &name) const
 Get a mesh generator with its name. More...
 
std::vector< std::string > getMeshGeneratorNames () const
 Get names of all mesh generators Note: This function should be called after all mesh generators are added with the 'add_mesh_generator' task. More...
 
std::unique_ptr< MeshBase > & getMeshGeneratorOutput (const std::string &name)
 Get a refernce to a pointer that will be the output of the MeshGenerator named name. More...
 
void clearMeshGenerators ()
 Clear all mesh modifers. More...
 
void executeMeshGenerators ()
 Execute and clear the Mesh Generators data structure. More...
 
std::unique_ptr< MeshBase > getMeshGeneratorMesh ()
 Get the generated mesh generated by executeMeshGenerators();. More...
 
bool checkInput () const
 Returns whether the Application is running in check input mode. More...
 
bool getFPTrapFlag () const
 Returns whether FPE trapping is turned on (either because of debug or user requested) More...
 
void addExecFlag (const ExecFlagType &flag)
 WARNING: This is an internal method for MOOSE, if you need the add new ExecFlagTypes then use the registerExecFlag macro as done in Moose.C/h. More...
 
bool hasRelationshipManager (const std::string &name) const
 Returns a Boolean indicating whether a RelationshipManater exists with the same name. More...
 
bool addRelationshipManager (std::shared_ptr< RelationshipManager > relationship_manager)
 Transfers ownership of a RelationshipManager to the application for lifetime management. More...
 
void attachRelationshipManagers (Moose::RelationshipManagerType rm_type)
 
std::vector< std::pair< std::string, std::string > > getRelationshipManagerInfo () const
 Returns the Relationship managers info suitable for printing. More...
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the app level ExecFlagEnum, this contains all the available flags for the app. More...
 
void setBackupObject (std::shared_ptr< Backup > backup)
 Method for setting the backup object to be restored at a later time. More...
 
template<typename T >
const T & getParam (const std::string &name)
 Retrieve a parameter for the object. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 
void dynamicAllRegistration (const std::string &app_name, Factory *factory, ActionFactory *action_factory, Syntax *syntax, std::string library_path, const std::string &library_name)
 Thes methods are called to register applications or objects on demand. More...
 
void dynamicAppRegistration (const std::string &app_name, std::string library_path, const std::string &library_name)
 
void setRestart (const bool &value)
 Sets the restart/recover flags. More...
 
void setRecover (const bool &value)
 

Public Attributes

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

Protected Types

enum  UNUSED_CHECK { OFF, WARN_UNUSED, ERROR_UNUSED }
 Indicates whether warnings, errors, or no output is displayed when unused parameters are detected. More...
 

Protected Member Functions

bool hasCachedBackup ()
 Whether or not this MooseApp has cached a Backup to use for restart / recovery. More...
 
void restoreCachedBackup ()
 Restore from a cached backup. More...
 
void dynamicRegistration (const Parameters &params)
 Helper method for dynamic loading of objects. More...
 
void loadLibraryAndDependencies (const std::string &library_filename, const Parameters &params)
 Recursively loads libraries and dependencies in the proper order to fully register a MOOSE application that may have several dependencies. More...
 
 MooseApp (InputParameters parameters)
 Constructor is protected so that this object is constructed through the AppFactory object. More...
 
void registerRecoverableData (std::string name)
 NOTE: This is an internal function meant for MOOSE use only! More...
 
void errorCheck ()
 Runs post-initialization error checking that cannot be run correctly unless the simulation has been fully set up and initialized. More...
 

Protected Attributes

std::string _name
 The name of this object. More...
 
InputParameters _pars
 Parameters of this object. More...
 
const std::string _type
 The string representation of the type of this object as registered (see registerApp(AppName)) More...
 
const std::shared_ptr< Parallel::Communicator > _comm
 The MPI communicator this App is going to use. More...
 
PerfGraph _perf_graph
 The PerfGraph object for this applciation. More...
 
std::string _input_filename
 Input file name used. More...
 
std::string _output_file_base
 The output file basename. More...
 
bool _output_position_set
 Whether or not an output position has been set for this app. More...
 
Point _output_position
 The output position. More...
 
bool _start_time_set
 Whether or not an start time has been set. More...
 
Real _start_time
 The time at which to start the simulation. More...
 
Real _global_time_offset
 Offset of the local App time to the "global" problem time. More...
 
std::shared_ptr< CommandLine_command_line
 Command line object. More...
 
Syntax _syntax
 Syntax of the input file. More...
 
OutputWarehouse _output_warehouse
 OutputWarehouse object for this App. More...
 
InputParameterWarehouse_input_parameter_warehouse
 Input parameter storage structure (this is a raw pointer so the destruction time can be explicitly controlled) More...
 
ActionFactory _action_factory
 The Factory responsible for building Actions. More...
 
ActionWarehouse _action_warehouse
 Where built actions are stored. More...
 
Parser _parser
 Parser for parsing the input file. More...
 
std::shared_ptr< Executioner_executioner
 Pointer to the executioner of this run (typically build by actions) More...
 
bool _use_nonlinear
 Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions) More...
 
bool _use_eigen_value
 Boolean to indicate whether to use an eigenvalue executioner. More...
 
std::unique_ptr< SystemInfo_sys_info
 System Information. More...
 
enum MooseApp::UNUSED_CHECK _enable_unused_check
 
Factory _factory
 
bool _error_overridden
 Indicates whether warnings or errors are displayed when overridden parameters are detected. More...
 
bool _ready_to_exit
 
bool _initial_from_file
 This variable indicates when a request has been made to restart from an Exodus file. More...
 
bool _distributed_mesh_on_command_line
 This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh. More...
 
bool _recover
 Whether or not this is a recovery run. More...
 
bool _restart
 Whether or not this is a restart run. More...
 
bool _split_mesh
 Whether or not we are performing a split mesh operation (–split-mesh) More...
 
const bool _use_split
 Whether or not we are using a (pre-)split mesh (automatically DistributedMesh) More...
 
bool _trap_fpe
 Whether or not FPE trapping should be turned on. More...
 
std::string _recover_base
 The base name to recover from. If blank then we will find the newest recovery file. More...
 
std::string _recover_suffix
 The file suffix to recover from. If blank then we will use "cpr" for binary CheckpointIO. More...
 
bool _half_transient
 Whether or not this simulation should only run half its transient (useful for testing recovery) More...
 
std::map< std::string, unsigned int > _output_file_numbers
 Map of outputer name and file number (used by MultiApps to propagate file numbers down through the multiapps) More...
 
bool _check_input
 true if we want to just check the input file More...
 
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
 
std::map< std::pair< std::string, std::string >, void * > _lib_handles
 The library, registration method and the handle to the method. More...
 

Private Types

enum  RegistrationType { APPLICATION, REGALL }
 Enumeration for holding the valid types of dynamic registrations allowed. More...
 

Private Member Functions

void createMinimalApp ()
 Method for creating the minimum required actions for an application (no input file) More...
 

Private Attributes

RestartableDatas _restartable_data
 Where the restartable data is held (indexed on tid) More...
 
std::set< std::string > _recoverable_data
 Data names that will only be read from the restart file during RECOVERY. More...
 
std::unique_ptr< TheWarehouse_the_warehouse
 
unsigned int _multiapp_level
 Level of multiapp, the master is level 0. This used by the Console to indent output. More...
 
unsigned int _multiapp_number
 Numbering in all the sub-apps on the same level. More...
 
std::map< std::string, std::shared_ptr< MeshModifier > > _mesh_modifiers
 Holds the mesh modifiers until they have completed, then this structure is cleared. More...
 
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
 Holds the mesh generators until they have completed, then this structure is cleared. More...
 
std::map< std::string, std::list< std::unique_ptr< MeshBase > > > _mesh_generator_outputs
 Holds the output for each mesh generator - including duplicates needed downstream. More...
 
std::list< std::unique_ptr< MeshBase > * > _final_generated_meshes
 The final Mesh that is generated by the generators. More...
 
std::shared_ptr< Backup_cached_backup
 Cache for a Backup to use for restart / recovery. More...
 
ExecFlagEnum _execute_flags
 Execution flags for this App. More...
 
PerfID _setup_timer
 Timers. More...
 
PerfID _setup_options_timer
 
PerfID _run_input_file_timer
 
PerfID _execute_timer
 
PerfID _execute_executioner_timer
 
PerfID _restore_timer
 
PerfID _run_timer
 
PerfID _execute_mesh_modifiers_timer
 
PerfID _execute_mesh_generators_timer
 
PerfID _restore_cached_backup_timer
 
PerfID _create_minimal_app_timer
 

Friends

class FEProblemBase
 
class Restartable
 
class SubProblem
 

Detailed Description

Base class for MOOSE-based applications.

This generic class for application provides:

Each application should register its own objects and register its own special syntax

Definition at line 59 of file MooseApp.h.

Member Enumeration Documentation

◆ RegistrationType

Enumeration for holding the valid types of dynamic registrations allowed.

Enumerator
APPLICATION 
REGALL 

Definition at line 863 of file MooseApp.h.

864  {
865  APPLICATION,
866  REGALL
867  };

◆ UNUSED_CHECK

enum MooseApp::UNUSED_CHECK
protected

Indicates whether warnings, errors, or no output is displayed when unused parameters are detected.

Enumerator
OFF 
WARN_UNUSED 
ERROR_UNUSED 

Definition at line 775 of file MooseApp.h.

776  {
777  OFF,
778  WARN_UNUSED,
enum MooseApp::UNUSED_CHECK _enable_unused_check

Constructor & Destructor Documentation

◆ ~MooseApp()

MooseApp::~MooseApp ( )
virtual

Definition at line 408 of file MooseApp.C.

409 {
411  _executioner.reset();
412  _the_warehouse.reset();
413 
415 
416 #ifdef LIBMESH_HAVE_DLOPEN
417  // Close any open dynamic libraries
418  for (const auto & it : _lib_handles)
419  dlclose(it.second);
420 #endif
421 }
std::unique_ptr< TheWarehouse > _the_warehouse
Definition: MooseApp.h:869
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763
InputParameterWarehouse * _input_parameter_warehouse
Input parameter storage structure (this is a raw pointer so the destruction time can be explicitly co...
Definition: MooseApp.h:751
std::map< std::pair< std::string, std::string >, void * > _lib_handles
The library, registration method and the handle to the method.
Definition: MooseApp.h:827
void clear()
This method deletes all of the Actions in the warehouse.

◆ MooseApp()

MooseApp::MooseApp ( InputParameters  parameters)
protected

Constructor is protected so that this object is constructed through the AppFactory object.

Definition at line 255 of file MooseApp.C.

256  : ConsoleStreamInterface(*this),
257  ParallelObject(*parameters.get<std::shared_ptr<Parallel::Communicator>>(
258  "_comm")), // Can't call getParam() before pars is set
259  _name(parameters.get<std::string>("_app_name")),
260  _pars(parameters),
261  _type(getParam<std::string>("_type")),
262  _comm(getParam<std::shared_ptr<Parallel::Communicator>>("_comm")),
263  _perf_graph(type() + " (" + name() + ')'),
264  _output_position_set(false),
265  _start_time_set(false),
266  _start_time(0.0),
267  _global_time_offset(0.0),
268  _output_warehouse(*this),
270  _action_factory(*this),
272  _parser(*this, _action_warehouse),
273  _use_nonlinear(true),
274  _use_eigen_value(false),
276  _factory(*this),
277  _error_overridden(false),
278  _ready_to_exit(false),
279  _initial_from_file(false),
281  _recover(false),
282  _restart(false),
283  _split_mesh(false),
284  _use_split(parameters.get<bool>("use_split")),
285 #ifdef DEBUG
286  _trap_fpe(true),
287 #else
288  _trap_fpe(false),
289 #endif
290  _recover_suffix("cpr"),
291  _half_transient(false),
292  _check_input(getParam<bool>("check_input")),
293  _restartable_data(libMesh::n_threads()),
295  isParamValid("_multiapp_level") ? parameters.get<unsigned int>("_multiapp_level") : 0),
297  isParamValid("_multiapp_number") ? parameters.get<unsigned int>("_multiapp_number") : 0),
298  _setup_timer(_perf_graph.registerSection("MooseApp::setup", 2)),
299  _setup_options_timer(_perf_graph.registerSection("MooseApp::setupOptions", 5)),
300  _run_input_file_timer(_perf_graph.registerSection("MooseApp::runInputFile", 3)),
301  _execute_timer(_perf_graph.registerSection("MooseApp::execute", 2)),
302  _execute_executioner_timer(_perf_graph.registerSection("MooseApp::executeExecutioner", 3)),
303  _restore_timer(_perf_graph.registerSection("MooseApp::restore", 2)),
304  _run_timer(_perf_graph.registerSection("MooseApp::run", 3)),
305  _execute_mesh_modifiers_timer(_perf_graph.registerSection("MooseApp::executeMeshModifiers", 1)),
307  _perf_graph.registerSection("MooseApp::executeMeshGenerators", 1)),
308  _restore_cached_backup_timer(_perf_graph.registerSection("MooseApp::restoreCachedBackup", 2)),
309  _create_minimal_app_timer(_perf_graph.registerSection("MooseApp::createMinimalApp", 3))
310 {
313 
314  _the_warehouse = libmesh_make_unique<TheWarehouse>();
315  _the_warehouse->registerAttribute<AttribMatrixTags>("matrix_tags", 0);
316  _the_warehouse->registerAttribute<AttribVectorTags>("vector_tags", 0);
317  _the_warehouse->registerAttribute<AttribExecOns>("exec_ons", 0);
318  _the_warehouse->registerAttribute<AttribSubdomains>("subdomains", 0);
319  _the_warehouse->registerAttribute<AttribBoundaries>("boundaries", 0);
320  _the_warehouse->registerAttribute<AttribThread>("thread", 0);
321  _the_warehouse->registerAttribute<AttribPreIC>("pre_ic", 0);
322  _the_warehouse->registerAttribute<AttribPreAux>("pre_aux", 0);
323  _the_warehouse->registerAttribute<AttribName>("name", "dummy");
324  _the_warehouse->registerAttribute<AttribSystem>("system", "dummy");
325  _the_warehouse->registerAttribute<AttribVar>("variable", 0);
326  _the_warehouse->registerAttribute<AttribInterfaces>("interfaces", 0);
327 
328  if (isParamValid("_argc") && isParamValid("_argv"))
329  {
330  int argc = getParam<int>("_argc");
331  char ** argv = getParam<char **>("_argv");
332 
333  _sys_info = libmesh_make_unique<SystemInfo>(argc, argv);
334  }
335  if (isParamValid("_command_line"))
336  _command_line = getParam<std::shared_ptr<CommandLine>>("_command_line");
337  else
338  mooseError("Valid CommandLine object required");
339 
340  if (_check_input && isParamValid("recover"))
341  mooseError("Cannot run --check-input with --recover. Recover files might not exist");
342 
343  if (isParamValid("start_in_debugger"))
344  {
345  auto command = getParam<std::string>("start_in_debugger");
346 
347  Moose::out << "Starting in debugger using: " << command << std::endl;
348 
350 
351  std::stringstream command_stream;
352 
353  // This will start XTerm and print out some info first... then run the debugger
354  command_stream << "xterm -e \"echo 'Rank: " << processor_id() << " Hostname: " << hostname
355  << " PID: " << getpid() << "'; echo ''; ";
356 
357  // Figure out how to run the debugger
358  if (command.find("lldb") != std::string::npos || command.find("gdb") != std::string::npos)
359  command_stream << command << " -p " << getpid();
360  else
361  mooseError("Unknown debugger: ",
362  command,
363  "\nIf this is truly what you meant then contact moose-users to have a discussion "
364  "about adding your debugger.");
365 
366  // Finish up the command
367  command_stream << "\""
368  << " & ";
369 
370  std::string command_string = command_stream.str();
371  Moose::out << "Running: " << command_string << std::endl;
372 
373  std::system(command_string.c_str());
374 
375  // Sleep to allow time for the debugger to attach
376  std::this_thread::sleep_for(std::chrono::seconds(10));
377  }
378 
379  if (!parameters.isParamSetByAddParam("stop_for_debugger"))
380  {
381  Moose::out << "\nStopping for " << getParam<unsigned int>("stop_for_debugger")
382  << " seconds to allow attachment from a debugger.\n";
383 
384  Moose::out << "\nAll of the processes you can connect to:\n";
385  Moose::out << "rank - hostname - pid\n";
386 
388 
389  {
390  // The 'false' turns off the serialization warning
391  SerializerGuard sg(_communicator, false); // Guarantees that the processors print in order
392  Moose::err << processor_id() << " - " << hostname << " - " << getpid() << "\n";
393  }
394 
395  Moose::out << "\nWaiting...\n" << std::endl;
396 
397  // Sleep to allow time for the debugger to attach
398  std::this_thread::sleep_for(std::chrono::seconds(getParam<unsigned int>("stop_for_debugger")));
399  }
400 }
bool _use_eigen_value
Boolean to indicate whether to use an eigenvalue executioner.
Definition: MooseApp.h:769
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
PerfID _run_timer
Definition: MooseApp.h:902
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition: MooseApp.h:872
const std::string _type
The string representation of the type of this object as registered (see registerApp(AppName)) ...
Definition: MooseApp.h:712
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Definition: MooseApp.h:789
Storage container for all InputParamter objects.
RestartableDatas _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:857
Real _global_time_offset
Offset of the local App time to the "global" problem time.
Definition: MooseApp.h:739
bool _output_position_set
Whether or not an output position has been set for this app.
Definition: MooseApp.h:727
std::unique_ptr< TheWarehouse > _the_warehouse
Definition: MooseApp.h:869
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
InputParameters & parameters()
Get the parameters of the object.
Definition: MooseApp.h:86
bool _use_nonlinear
Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions) ...
Definition: MooseApp.h:766
PerfID _run_input_file_timer
Definition: MooseApp.h:898
PerfID _execute_mesh_generators_timer
Definition: MooseApp.h:904
PerfID _create_minimal_app_timer
Definition: MooseApp.h:906
Real _start_time
The time at which to start the simulation.
Definition: MooseApp.h:736
const bool _use_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseApp.h:804
PerfID _execute_timer
Definition: MooseApp.h:899
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:822
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:167
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:113
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:745
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition: MooseApp.h:807
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
std::unique_ptr< SystemInfo > _sys_info
System Information.
Definition: MooseApp.h:772
bool _half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:816
std::string hostname()
Get the hostname the current process is running on.
Definition: MooseUtils.C:375
Parser _parser
Parser for parsing the input file.
Definition: MooseApp.h:760
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:152
bool _start_time_set
Whether or not an start time has been set.
Definition: MooseApp.h:733
bool isParamSetByAddParam(const std::string &name) const
Returns whether or not the parameter was set due to addParam.
nl system()
PerfID _execute_mesh_modifiers_timer
Definition: MooseApp.h:903
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:742
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:798
InputParameterWarehouse * _input_parameter_warehouse
Input parameter storage structure (this is a raw pointer so the destruction time can be explicitly co...
Definition: MooseApp.h:751
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition: MooseApp.h:754
ConsoleStreamInterface(MooseApp &app)
A class for providing a helper stream object for writting message to all the Output objects...
PerfID _setup_options_timer
Definition: MooseApp.h:897
PerfID _restore_timer
Definition: MooseApp.h:901
enum MooseApp::UNUSED_CHECK _enable_unused_check
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:795
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected...
Definition: MooseApp.h:785
PerfID _execute_executioner_timer
Definition: MooseApp.h:900
PerfID _restore_cached_backup_timer
Definition: MooseApp.h:905
PerfGraph _perf_graph
The PerfGraph object for this applciation.
Definition: MooseApp.h:718
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:709
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:916
bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition: MooseApp.h:792
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:748
const std::shared_ptr< Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:715
processor_id_type processor_id()
Definition: MooseApp.h:282
void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Register objects that are in MOOSE.
Definition: Moose.C:52
Factory _factory
Definition: MooseApp.h:782
std::string _name
The name of this object.
Definition: MooseApp.h:706
const std::string & type() const
Get the type of this object as a string.
Definition: MooseApp.h:93
unsigned int _multiapp_number
Numbering in all the sub-apps on the same level.
Definition: MooseApp.h:875
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:42
bool _ready_to_exit
Definition: MooseApp.h:786
A scope guard that guarantees that whatever happens between when it gets created and when it is destr...
PerfID _setup_timer
Timers.
Definition: MooseApp.h:896
std::string _recover_suffix
The file suffix to recover from. If blank then we will use "cpr" for binary CheckpointIO.
Definition: MooseApp.h:813
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:801
static char addKnownLabel(const std::string &label)
addKnownLabel whitelists a label as valid for purposes of the checkLabels function.
Definition: Registry.C:124

Member Function Documentation

◆ actionWarehouse()

ActionWarehouse& MooseApp::actionWarehouse ( )
inline

◆ addExecFlag()

void MooseApp::addExecFlag ( const ExecFlagType flag)

WARNING: This is an internal method for MOOSE, if you need the add new ExecFlagTypes then use the registerExecFlag macro as done in Moose.C/h.

Parameters
flagThe flag to add as available to the app level ExecFlagEnum.

Definition at line 1641 of file MooseApp.C.

Referenced by Factory::regExecFlag().

1642 {
1643  if (flag.id() == MooseEnumItem::INVALID_ID)
1644  {
1645  // It is desired that users when creating ExecFlagTypes should not worry about needing
1646  // to assign a name and an ID. However, the ExecFlagTypes created by users are global
1647  // constants and the ID to be assigned can't be known at construction time of this global
1648  // constant, it is only known when it is added to this object (ExecFlagEnum). Therefore,
1649  // this const cast allows the ID to be set after construction. This was the lesser of two
1650  // evils: const_cast or friend class with mutable members.
1651  ExecFlagType & non_const_flag = const_cast<ExecFlagType &>(flag);
1652  auto it = _execute_flags.find(flag.name());
1653  if (it != _execute_flags.items().end())
1654  non_const_flag.setID(it->id());
1655  else
1656  non_const_flag.setID(_execute_flags.getNextValidID());
1657  }
1659 }
int getNextValidID() const
Compute the next valid ID.
void setID(const int &id)
Method to change the ID of the item, but only if it is an INVALID_ID.
Definition: MooseEnumItem.C:81
const std::string & name() const
Definition: MooseEnumItem.h:38
static const int INVALID_ID
Definition: MooseEnumItem.h:25
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
Add additional execute_on flags to the list of possible flags.
Definition: ExecFlagEnum.h:85
const std::set< ExecFlagType > & items() const
Reference the all the available items.
Definition: ExecFlagEnum.h:74
const int & id() const
Return the numeric, name, or raw name.
Definition: MooseEnumItem.h:37
ExecFlagEnum _execute_flags
Execution flags for this App.
Definition: MooseApp.h:893
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:22
std::set< MooseEnumItem >::const_iterator find(const MooseEnumItem &other) const
Locate an item.

◆ addMeshGenerator()

void MooseApp::addMeshGenerator ( const std::string &  generator_name,
const std::string &  name,
InputParameters  parameters 
)

Add a mesh generator that will act on the meshes in the system.

Definition at line 1418 of file MooseApp.C.

Referenced by AddMeshGeneratorAction::act().

1421 {
1422  std::shared_ptr<MeshGenerator> mesh_generator =
1423  _factory.create<MeshGenerator>(generator_name, name, parameters);
1424 
1425  _mesh_generators.insert(std::make_pair(MooseUtils::shortName(name), mesh_generator));
1426 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
InputParameters & parameters()
Get the parameters of the object.
Definition: MooseApp.h:86
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:363
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
Holds the mesh generators until they have completed, then this structure is cleared.
Definition: MooseApp.h:881
Factory _factory
Definition: MooseApp.h:782
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:31

◆ addMeshModifier()

void MooseApp::addMeshModifier ( const std::string &  modifier_name,
const std::string &  name,
InputParameters  parameters 
)

Add a mesh modifier that will act on the meshes in the system.

Definition at line 1333 of file MooseApp.C.

Referenced by AddMeshModifierAction::act().

1336 {
1337  std::shared_ptr<MeshModifier> mesh_modifier =
1338  _factory.create<MeshModifier>(modifier_name, name, parameters);
1339 
1340  _mesh_modifiers.insert(std::make_pair(MooseUtils::shortName(name), mesh_modifier));
1341 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
InputParameters & parameters()
Get the parameters of the object.
Definition: MooseApp.h:86
MeshModifiers are objects that can modify or add to an existing mesh.
Definition: MeshModifier.h:26
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:363
Factory _factory
Definition: MooseApp.h:782
std::map< std::string, std::shared_ptr< MeshModifier > > _mesh_modifiers
Holds the mesh modifiers until they have completed, then this structure is cleared.
Definition: MooseApp.h:878

◆ addRelationshipManager()

bool MooseApp::addRelationshipManager ( std::shared_ptr< RelationshipManager relationship_manager)

Transfers ownership of a RelationshipManager to the application for lifetime management.

The RelationshipManager will NOT be duplicately added if an equivalent RelationshipManager is already active. In that case, it's possible that the object will be destroyed if the reference count drops to zero.

Definition at line 1672 of file MooseApp.C.

Referenced by MooseADObjectAction::addRelationshipManagers(), and MooseObjectAction::addRelationshipManagers().

1673 {
1674  bool add = true;
1675  for (const auto & rm : _relationship_managers)
1676  if (*rm == *relationship_manager)
1677  {
1678  add = false;
1679  break;
1680  }
1681 
1682  if (add)
1683  _relationship_managers.emplace_back(relationship_manager);
1684 
1685  // Inform the caller whether the object was added or not
1686  return add;
1687 }
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
Definition: MooseApp.h:824

◆ appNameToLibName()

std::string MooseApp::appNameToLibName ( const std::string &  app_name) const

Converts an application name to a library name: Examples: AnimalApp -> libanimal-oprof.la (assuming METHOD=oprof) ThreeWordAnimalApp -> libthree_word_animal-dbg.la (assuming METHOD=dbg)

Definition at line 1055 of file MooseApp.C.

Referenced by dynamicAppRegistration(), and dynamicRegistration().

1056 {
1057  std::string library_name(app_name);
1058 
1059  // Strip off the App part (should always be the last 3 letters of the name)
1060  size_t pos = library_name.find("App");
1061  if (pos != library_name.length() - 3)
1062  mooseError("Invalid application name: ", library_name);
1063  library_name.erase(pos);
1064 
1065  // Now get rid of the camel case, prepend lib, and append the method and suffix
1066  return std::string("lib") + MooseUtils::camelCaseToUnderscore(library_name) + '-' +
1067  QUOTE(METHOD) + ".la";
1068 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::string camelCaseToUnderscore(const std::string &camel_case_name)
Function for converting a camel case name to a name containing underscores.
Definition: MooseUtils.C:319

◆ attachRelationshipManagers()

void MooseApp::attachRelationshipManagers ( Moose::RelationshipManagerType  rm_type)

Definition at line 1690 of file MooseApp.C.

Referenced by AddRelationshipManager::act().

1691 {
1692  for (auto & rm : _relationship_managers)
1693  rm->attachRelationshipManagers(rm_type);
1694 }
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
Definition: MooseApp.h:824

◆ backup()

std::shared_ptr< Backup > MooseApp::backup ( )
virtual

Create a Backup from the current App.

A Backup contains all the data necessary to be able to restore the state of an App.

This method should be overridden in external or MOOSE-wrapped applications.

Definition at line 889 of file MooseApp.C.

Referenced by restore(), and setBackupObject().

890 {
891  mooseAssert(_executioner, "Executioner is nullptr");
892  FEProblemBase & fe_problem = _executioner->feProblem();
893 
894  RestartableDataIO rdio(fe_problem);
895  return rdio.createBackup();
896 }
Class for doing restart.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763

◆ checkInput()

bool MooseApp::checkInput ( ) const
inline

Returns whether the Application is running in check input mode.

Definition at line 615 of file MooseApp.h.

615 { return _check_input; }
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:822

◆ checkRegistryLabels()

void MooseApp::checkRegistryLabels ( )
virtual

Definition at line 403 of file MooseApp.C.

Referenced by FEProblemBase::initialSetup(), and Factory::reportUnregisteredError().

404 {
406 }
static void checkLabels(const std::set< std::string > &known_labels={})
This runs error checking to make sure that all objects and actions in the registry have valid labels...
Definition: Registry.C:101

◆ clearMeshGenerators()

void MooseApp::clearMeshGenerators ( )

Clear all mesh modifers.

Definition at line 1527 of file MooseApp.C.

1528 {
1529  _mesh_generators.clear();
1530 }
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
Holds the mesh generators until they have completed, then this structure is cleared.
Definition: MooseApp.h:881

◆ clearMeshModifiers()

void MooseApp::clearMeshModifiers ( )

Clear all mesh modifers.

Definition at line 1412 of file MooseApp.C.

Referenced by SetupMeshCompleteAction::completeSetup().

1413 {
1414  _mesh_modifiers.clear();
1415 }
std::map< std::string, std::shared_ptr< MeshModifier > > _mesh_modifiers
Holds the mesh modifiers until they have completed, then this structure is cleared.
Definition: MooseApp.h:878

◆ commandLine()

std::shared_ptr<CommandLine> MooseApp::commandLine ( ) const
inline

Get the command line.

Returns
The reference to the command line object Setup options based on InputParameters.

Definition at line 294 of file MooseApp.h.

Referenced by FEProblemBase::addMultiApp(), MultiApp::createApp(), Parser::errorCheck(), Parser::hitCLIFilter(), Parser::parse(), and ExodusFormatter::printInputFile().

294 { return _command_line; }
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:742

◆ createMinimalApp()

void MooseApp::createMinimalApp ( )
private

Method for creating the minimum required actions for an application (no input file)

Mimics the following input file:

[Mesh] type = GeneratedMesh dim = 1 nx = 1 []

[Executioner] type = Transient num_steps = 1 dt = 1 []

[Problem] solve = false []

[Outputs] console = false []

Definition at line 1567 of file MooseApp.C.

Referenced by setupOptions().

1568 {
1569  TIME_SECTION(_create_minimal_app_timer);
1570 
1571  // SetupMeshAction
1572  {
1573  // Build the Action parameters
1574  InputParameters action_params = _action_factory.getValidParams("SetupMeshAction");
1575  action_params.set<std::string>("type") = "GeneratedMesh";
1576 
1577  // Create The Action
1578  std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
1579  _action_factory.create("SetupMeshAction", "Mesh", action_params));
1580 
1581  // Set the object parameters
1582  InputParameters & params = action->getObjectParams();
1583  params.set<MooseEnum>("dim") = "1";
1584  params.set<unsigned int>("nx") = 1;
1585 
1586  // Add Action to the warehouse
1588  }
1589 
1590  // Executioner
1591  {
1592  // Build the Action parameters
1593  InputParameters action_params = _action_factory.getValidParams("CreateExecutionerAction");
1594  action_params.set<std::string>("type") = "Transient";
1595 
1596  // Create the action
1597  std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
1598  _action_factory.create("CreateExecutionerAction", "Executioner", action_params));
1599 
1600  // Set the object parameters
1601  InputParameters & params = action->getObjectParams();
1602  params.set<unsigned int>("num_steps") = 1;
1603  params.set<Real>("dt") = 1;
1604 
1605  // Add Action to the warehouse
1607  }
1608 
1609  // Problem
1610  {
1611  // Build the Action parameters
1612  InputParameters action_params = _action_factory.getValidParams("CreateProblemDefaultAction");
1613  action_params.set<bool>("_solve") = false;
1614 
1615  // Create the action
1616  std::shared_ptr<Action> action = std::static_pointer_cast<Action>(
1617  _action_factory.create("CreateProblemDefaultAction", "Problem", action_params));
1618 
1619  // Add Action to the warehouse
1621  }
1622 
1623  // Outputs
1624  {
1625  // Build the Action parameters
1626  InputParameters action_params = _action_factory.getValidParams("CommonOutputAction");
1627  action_params.set<bool>("console") = false;
1628 
1629  // Create action
1630  std::shared_ptr<Action> action =
1631  _action_factory.create("CommonOutputAction", "Outputs", action_params);
1632 
1633  // Add Action to the warehouse
1635  }
1636 
1638 }
InputParameters getValidParams(const std::string &name)
Definition: ActionFactory.C:70
PerfID _create_minimal_app_timer
Definition: MooseApp.h:906
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addActionBlock(std::shared_ptr< Action > blk)
This method add an Action instance to the warehouse.
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
Base class for actions.
Definition: Action.h:36
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition: MooseApp.h:754
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32
void build()
Builds all auto-buildable tasks.
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters parameters)
Definition: ActionFactory.C:41

◆ disableCheckUnusedFlag()

void MooseApp::disableCheckUnusedFlag ( )

Removes warnings and error checks for unrecognized variables in the input file.

Definition at line 926 of file MooseApp.C.

927 {
929 }
enum MooseApp::UNUSED_CHECK _enable_unused_check

◆ dynamicAllRegistration()

void MooseApp::dynamicAllRegistration ( const std::string &  app_name,
Factory factory,
ActionFactory action_factory,
Syntax syntax,
std::string  library_path,
const std::string &  library_name 
)

Thes methods are called to register applications or objects on demand.

This method attempts to load a dynamic library and register it when it is needed. Throws an error if no suitable library is found that contains the app_name in question.

Definition at line 1128 of file MooseApp.C.

Referenced by DynamicObjectRegistrationAction::DynamicObjectRegistrationAction().

1134 {
1135  Parameters params;
1136  params.set<std::string>("app_name") = app_name;
1137  params.set<RegistrationType>("reg_type") = REGALL;
1138  params.set<std::string>("registration_method") = app_name + "__registerAll";
1139  params.set<std::string>("library_path") = library_path;
1140  params.set<std::string>("library_name") = library_name;
1141 
1142  params.set<Factory *>("factory") = factory;
1143  params.set<Syntax *>("syntax") = syntax;
1144  params.set<ActionFactory *>("action_factory") = action_factory;
1145 
1146  dynamicRegistration(params);
1147 }
Generic factory class for build all sorts of objects.
Definition: Factory.h:154
void dynamicRegistration(const Parameters &params)
Helper method for dynamic loading of objects.
Definition: MooseApp.C:1150
Syntax & syntax()
Definition: MooseApp.h:144
Specialized factory for generic Action System objects.
Definition: ActionFactory.h:65
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:863
Holding syntax for parsing input files.
Definition: Syntax.h:21

◆ dynamicAppRegistration()

void MooseApp::dynamicAppRegistration ( const std::string &  app_name,
std::string  library_path,
const std::string &  library_name 
)

Definition at line 1095 of file MooseApp.C.

Referenced by MultiApp::initialSetup().

1098 {
1099  Parameters params;
1100  params.set<std::string>("app_name") = app_name;
1101  params.set<RegistrationType>("reg_type") = APPLICATION;
1102  params.set<std::string>("registration_method") = app_name + "__registerApps";
1103  params.set<std::string>("library_path") = library_path;
1104  params.set<std::string>("library_name") = library_name;
1105 
1106  dynamicRegistration(params);
1107 
1108  // At this point the application should be registered so check it
1109  if (!AppFactory::instance().isRegistered(app_name))
1110  {
1111  std::ostringstream oss;
1112  std::set<std::string> paths = getLoadedLibraryPaths();
1113 
1114  oss << "Unable to locate library for \"" << app_name
1115  << "\".\nWe attempted to locate the library \"" << appNameToLibName(app_name)
1116  << "\" in the following paths:\n\t";
1117  std::copy(paths.begin(), paths.end(), infix_ostream_iterator<std::string>(oss, "\n\t"));
1118  oss << "\n\nMake sure you have compiled the library and either set the \"library_path\" "
1119  "variable "
1120  << "in your input file or exported \"MOOSE_LIBRARY_PATH\".\n"
1121  << "Compiled in debug mode to see the list of libraries checked for dynamic loading "
1122  "methods.";
1123  mooseError(oss.str());
1124  }
1125 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void dynamicRegistration(const Parameters &params)
Helper method for dynamic loading of objects.
Definition: MooseApp.C:1150
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:863
static AppFactory & instance()
Get the instance of the AppFactory.
Definition: AppFactory.C:17
std::string appNameToLibName(const std::string &app_name) const
Converts an application name to a library name: Examples: AnimalApp -> libanimal-oprof.la (assuming METHOD=oprof) ThreeWordAnimalApp -> libthree_word_animal-dbg.la (assuming METHOD=dbg)
Definition: MooseApp.C:1055
std::set< std::string > getLoadedLibraryPaths() const
Return the loaded library filenames in a std::vector.
Definition: MooseApp.C:1310

◆ dynamicRegistration()

void MooseApp::dynamicRegistration ( const Parameters &  params)
protected

Helper method for dynamic loading of objects.

Definition at line 1150 of file MooseApp.C.

Referenced by dynamicAllRegistration(), and dynamicAppRegistration().

1151 {
1152  std::string library_name;
1153  // was library name provided by the user?
1154  if (params.get<std::string>("library_name").empty())
1155  library_name = appNameToLibName(params.get<std::string>("app_name"));
1156  else
1157  library_name = params.get<std::string>("library_name");
1158 
1159  // Create a vector of paths that we can search inside for libraries
1160  std::vector<std::string> paths;
1161 
1162  std::string library_path = params.get<std::string>("library_path");
1163 
1164  if (library_path != "")
1165  MooseUtils::tokenize(library_path, paths, 1, ":");
1166 
1167  char * moose_lib_path_env = std::getenv("MOOSE_LIBRARY_PATH");
1168  if (moose_lib_path_env)
1169  {
1170  std::string moose_lib_path(moose_lib_path_env);
1171  std::vector<std::string> tmp_paths;
1172 
1173  MooseUtils::tokenize(moose_lib_path, tmp_paths, 1, ":");
1174 
1175  // merge the two vectors together (all possible search paths)
1176  paths.insert(paths.end(), tmp_paths.begin(), tmp_paths.end());
1177  }
1178 
1179  // Attempt to dynamically load the library
1180  for (const auto & path : paths)
1181  if (MooseUtils::checkFileReadable(path + '/' + library_name, false, false))
1182  loadLibraryAndDependencies(path + '/' + library_name, params);
1183  else
1184  mooseWarning("Unable to open library file \"",
1185  path + '/' + library_name,
1186  "\". Double check for spelling errors.");
1187 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:429
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:220
void loadLibraryAndDependencies(const std::string &library_filename, const Parameters &params)
Recursively loads libraries and dependencies in the proper order to fully register a MOOSE applicatio...
Definition: MooseApp.C:1190
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:146
std::string appNameToLibName(const std::string &app_name) const
Converts an application name to a library name: Examples: AnimalApp -> libanimal-oprof.la (assuming METHOD=oprof) ThreeWordAnimalApp -> libthree_word_animal-dbg.la (assuming METHOD=dbg)
Definition: MooseApp.C:1055

◆ errorCheck()

void MooseApp::errorCheck ( )
protected

Runs post-initialization error checking that cannot be run correctly unless the simulation has been fully set up and initialized.

Definition at line 815 of file MooseApp.C.

Referenced by executeExecutioner(), and run().

816 {
817  bool warn = _enable_unused_check == WARN_UNUSED;
818  bool err = _enable_unused_check == ERROR_UNUSED;
819 
820  _parser.errorCheck(*_comm, warn, err);
821 
822  auto apps = _executioner->feProblem().getMultiAppWarehouse().getObjects();
823  for (auto app : apps)
824  for (unsigned int i = 0; i < app->numLocalApps(); i++)
825  app->localApp(i)->errorCheck();
826 }
Parser _parser
Parser for parsing the input file.
Definition: MooseApp.h:760
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763
enum MooseApp::UNUSED_CHECK _enable_unused_check
const std::shared_ptr< Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:715
void errorCheck(const Parallel::Communicator &comm, bool warn_unused, bool err_unused)
Definition: Parser.C:598

◆ executeExecutioner()

void MooseApp::executeExecutioner ( )
virtual

Execute the Executioner that was built.

Definition at line 829 of file MooseApp.C.

Referenced by run().

830 {
831  TIME_SECTION(_execute_executioner_timer);
832 
833  // If ready to exit has been set, then just return
834  if (_ready_to_exit)
835  return;
836 
837  // run the simulation
838  if (_executioner)
839  {
840 #ifdef LIBMESH_HAVE_PETSC
842 #endif
843 
844  _executioner->init();
845  errorCheck();
846  _executioner->execute();
847  }
848  else
849  mooseError("No executioner was specified (go fix your input file)");
850 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:742
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763
PerfID _execute_executioner_timer
Definition: MooseApp.h:900
PetscErrorCode petscSetupOutput(CommandLine *cmd_line)
Definition: PetscSupport.C:264
bool _ready_to_exit
Definition: MooseApp.h:786
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
Definition: MooseApp.C:815

◆ executeMeshGenerators()

void MooseApp::executeMeshGenerators ( )

Execute and clear the Mesh Generators data structure.

Definition at line 1454 of file MooseApp.C.

Referenced by ExecuteMeshGenerators::act().

1455 {
1456  if (!_mesh_generators.empty())
1457  {
1458  TIME_SECTION(_execute_mesh_generators_timer);
1459 
1461 
1462  // Add all of the dependencies into the resolver and sort them
1463  for (const auto & it : _mesh_generators)
1464  {
1465  // Make sure an item with no dependencies comes out too!
1466  resolver.addItem(it.second);
1467 
1468  std::vector<std::string> & generators = it.second->getDependencies();
1469  for (const auto & depend_name : generators)
1470  {
1471  auto depend_it = _mesh_generators.find(depend_name);
1472 
1473  if (depend_it == _mesh_generators.end())
1474  mooseError("The MeshGenerator \"",
1475  depend_name,
1476  "\" was not created, did you make a "
1477  "spelling mistake or forget to include it "
1478  "in your input file?");
1479 
1480  resolver.insertDependency(it.second, depend_it->second);
1481  }
1482  }
1483 
1484  const auto & ordered_generators = resolver.getSortedValues();
1485 
1486  if (ordered_generators.size())
1487  {
1488  // Grab the outputs from the final generator so MeshGeneratorMesh can pick them up
1489  auto final_generator_name = ordered_generators.back()->name();
1490 
1491  _final_generated_meshes.emplace_back(&getMeshGeneratorOutput(final_generator_name));
1492 
1493  // Need to grab two if we're going to be making a displaced mesh
1495  _final_generated_meshes.emplace_back(&getMeshGeneratorOutput(final_generator_name));
1496 
1497  // Run the MeshGenerators in the proper order
1498  for (const auto & generator : ordered_generators)
1499  {
1500  auto name = generator->name();
1501 
1502  auto current_mesh = generator->generate();
1503 
1504  // Now we need to possibly give this mesh to downstream generators
1505  auto & outputs = _mesh_generator_outputs[name];
1506 
1507  if (outputs.size())
1508  {
1509  auto & first_output = *outputs.begin();
1510 
1511  first_output = std::move(current_mesh);
1512 
1513  const auto & copy_from = *first_output;
1514 
1515  auto output_it = ++outputs.begin();
1516 
1517  // For all of the rest we need to make a copy
1518  for (; output_it != outputs.end(); ++output_it)
1519  (*output_it) = copy_from.clone();
1520  }
1521  }
1522  }
1523  }
1524 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::unique_ptr< MeshBase > & getMeshGeneratorOutput(const std::string &name)
Get a refernce to a pointer that will be the output of the MeshGenerator named name.
Definition: MooseApp.C:1444
std::shared_ptr< MooseMesh > & displacedMesh()
PerfID _execute_mesh_generators_timer
Definition: MooseApp.h:904
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface...
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
Holds the mesh generators until they have completed, then this structure is cleared.
Definition: MooseApp.h:881
std::map< std::string, std::list< std::unique_ptr< MeshBase > > > _mesh_generator_outputs
Holds the output for each mesh generator - including duplicates needed downstream.
Definition: MooseApp.h:884
void addItem(const T &value)
Add an independent item to the set.
std::list< std::unique_ptr< MeshBase > * > _final_generated_meshes
The final Mesh that is generated by the generators.
Definition: MooseApp.h:887
void insertDependency(const T &key, const T &value)
Insert a dependency pair - the first value or the "key" depends on the second value or the "value"...

◆ executeMeshModifiers()

void MooseApp::executeMeshModifiers ( )

Execute and clear the Mesh Modifiers data structure.

Set preparation flag after modifiers are run. The final preparation will be handled by the SetupMeshComplete Action.

Definition at line 1359 of file MooseApp.C.

Referenced by SetupMeshCompleteAction::act().

1360 {
1361  if (!_mesh_modifiers.empty())
1362  {
1363  TIME_SECTION(_execute_mesh_modifiers_timer);
1364 
1366 
1367  // Add all of the dependencies into the resolver and sort them
1368  for (const auto & it : _mesh_modifiers)
1369  {
1370  // Make sure an item with no dependencies comes out too!
1371  resolver.addItem(it.second);
1372 
1373  std::vector<std::string> & modifiers = it.second->getDependencies();
1374  for (const auto & depend_name : modifiers)
1375  {
1376  auto depend_it = _mesh_modifiers.find(depend_name);
1377 
1378  if (depend_it == _mesh_modifiers.end())
1379  mooseError("The MeshModifier \"",
1380  depend_name,
1381  "\" was not created, did you make a "
1382  "spelling mistake or forget to include it "
1383  "in your input file?");
1384 
1385  resolver.insertDependency(it.second, depend_it->second);
1386  }
1387  }
1388 
1389  const auto & ordered_modifiers = resolver.getSortedValues();
1390 
1391  if (ordered_modifiers.size())
1392  {
1393  MooseMesh * mesh = _action_warehouse.mesh().get();
1394  MooseMesh * displaced_mesh = _action_warehouse.displacedMesh().get();
1395 
1396  // Run the MeshModifiers in the proper order
1397  for (const auto & modifier : ordered_modifiers)
1398  modifier->modifyMesh(mesh, displaced_mesh);
1399 
1404  mesh->prepared(false);
1405  if (displaced_mesh)
1406  displaced_mesh->prepared(false);
1407  }
1408  }
1409 }
bool prepared() const
Setter/getter for the _is_prepared flag.
Definition: MooseMesh.C:2286
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::shared_ptr< MooseMesh > & displacedMesh()
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
const std::vector< T > & getSortedValues()
This function also returns dependency resolved values but with a simpler single vector interface...
std::shared_ptr< MooseMesh > & mesh()
PerfID _execute_mesh_modifiers_timer
Definition: MooseApp.h:903
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:73
void addItem(const T &value)
Add an independent item to the set.
std::map< std::string, std::shared_ptr< MeshModifier > > _mesh_modifiers
Holds the mesh modifiers until they have completed, then this structure is cleared.
Definition: MooseApp.h:878
void insertDependency(const T &key, const T &value)
Insert a dependency pair - the first value or the "key" depends on the second value or the "value"...

◆ executioner()

std::shared_ptr<Executioner>& MooseApp::executioner ( )
inline

Retrieve the Executioner for this App.

Definition at line 254 of file MooseApp.h.

Referenced by setExecutioner().

255  {
256  mooseDeprecated("executioner() is deprecated. Use getExecutioner(), this interface will be "
257  "removed after 10/01/2018");
258 
259  return _executioner;
260  }
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ getActionFactory()

ActionFactory& MooseApp::getActionFactory ( )
inline

Retrieve the ActionFactory associated with this App.

Definition at line 287 of file MooseApp.h.

287 { return _action_factory; }
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition: MooseApp.h:754

◆ getCheckpointDirectories()

std::list< std::string > MooseApp::getCheckpointDirectories ( ) const

Get all checkpoint directories.

Returns
A Set of checkpoint directories

Definition at line 978 of file MooseApp.C.

Referenced by getCheckpointFiles().

979 {
980  // Storage for the directory names
981  std::list<std::string> checkpoint_dirs;
982 
983  // Extract the CommonOutputAction
984  const auto & common_actions = _action_warehouse.getActionListByName("common_output");
985  mooseAssert(common_actions.size() == 1, "Should be only one common_output Action");
986 
987  const Action * common = *common_actions.begin();
988 
989  // If file_base is set in CommonOutputAction, add this file to the list of potential checkpoint
990  // files
991  if (common->isParamValid("file_base"))
992  checkpoint_dirs.push_back(common->getParam<std::string>("file_base") + "_cp");
993  // Case for normal application or master in a Multiapp setting
994  else if (getOutputFileBase().empty())
995  checkpoint_dirs.push_back(FileOutput::getOutputFileBase(*this, "_out_cp"));
996  // Case for a sub app in a Multiapp setting
997  else
998  checkpoint_dirs.push_back(getOutputFileBase() + "_cp");
999 
1000  // Add the directories from any existing checkpoint objects
1001  const auto & actions = _action_warehouse.getActionListByName("add_output");
1002  for (const auto & action : actions)
1003  {
1004  // Get the parameters from the MooseObjectAction
1005  MooseObjectAction * moose_object_action = dynamic_cast<MooseObjectAction *>(action);
1006  if (!moose_object_action)
1007  continue;
1008 
1009  const InputParameters & params = moose_object_action->getObjectParams();
1010 
1011  // Loop through the actions and add the necessary directories to the list to check
1012  if (moose_object_action->getParam<std::string>("type") == "Checkpoint")
1013  {
1014  if (params.isParamValid("file_base"))
1015  checkpoint_dirs.push_back(common->getParam<std::string>("file_base") + "_cp");
1016  else
1017  {
1018  std::ostringstream oss;
1019  oss << "_" << action->name() << "_cp";
1020  checkpoint_dirs.push_back(FileOutput::getOutputFileBase(*this, oss.str()));
1021  }
1022  }
1023  }
1024 
1025  return checkpoint_dirs;
1026 }
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: Action.h:211
static std::string getOutputFileBase(const MooseApp &app, std::string suffix="_out")
Returns the default output file base.
Definition: FileOutput.C:111
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string getOutputFileBase() const
Override the selection of the output file base name.
Definition: MooseApp.C:784
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
const std::list< Action * > & getActionListByName(const std::string &task) const
Retrieve a constant list of Action pointers associated with the passed in task.
Base class for actions.
Definition: Action.h:36
InputParameters & getObjectParams()
Retreive the parameters of the object to be created by this action.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ getCheckpointFiles()

std::list< std::string > MooseApp::getCheckpointFiles ( ) const

Extract all possible checkpoint file names.

Returns
A Set of checkpoint filenames

Definition at line 1029 of file MooseApp.C.

Referenced by setRecoverFileBase().

1030 {
1031  auto checkpoint_dirs = getCheckpointDirectories();
1032  return MooseUtils::getFilesInDirs(checkpoint_dirs);
1033 }
std::list< std::string > getCheckpointDirectories() const
Get all checkpoint directories.
Definition: MooseApp.C:978
std::list< std::string > getFilesInDirs(const std::list< std::string > &directory_list)
Retrieves the names of all of the files contained within the list of directories passed into the rout...
Definition: MooseUtils.C:533

◆ getDistributedMeshOnCommandLine()

bool MooseApp::getDistributedMeshOnCommandLine ( ) const
inline

Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibility) on the command line and false otherwise.

Definition at line 317 of file MooseApp.h.

Referenced by MooseMesh::buildMeshBaseObject(), and getParallelMeshOnCommandLine().

bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition: MooseApp.h:792

◆ getExecuteOnEnum()

const ExecFlagEnum& MooseApp::getExecuteOnEnum ( ) const
inline

Return the app level ExecFlagEnum, this contains all the available flags for the app.

Definition at line 651 of file MooseApp.h.

Referenced by EigenExecutionerBase::normalizeSolution().

651 { return _execute_flags; }
ExecFlagEnum _execute_flags
Execution flags for this App.
Definition: MooseApp.h:893

◆ getExecutioner()

Executioner* MooseApp::getExecutioner ( ) const
inline

◆ getFactory()

Factory& MooseApp::getFactory ( )
inline

◆ getFileName()

std::string MooseApp::getFileName ( bool  stripLeadingPath = true) const

Return the filename that was parsed.

Definition at line 1043 of file MooseApp.C.

Referenced by MultiApp::createApp(), and FileOutput::getOutputFileBase().

1044 {
1045  return _parser.getFileName(stripLeadingPath);
1046 }
Parser _parser
Parser for parsing the input file.
Definition: MooseApp.h:760
std::string getFileName(bool stripLeadingPath=true) const
Return the filename that was parsed.
Definition: Parser.C:291

◆ getFPTrapFlag()

bool MooseApp::getFPTrapFlag ( ) const
inline

Returns whether FPE trapping is turned on (either because of debug or user requested)

Definition at line 618 of file MooseApp.h.

618 { return _trap_fpe; }
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition: MooseApp.h:807

◆ getFrameworkVersion()

std::string MooseApp::getFrameworkVersion ( ) const

Returns the framework version.

Definition at line 424 of file MooseApp.C.

425 {
426  return MOOSE_VERSION;
427 }

◆ getGlobalTimeOffset()

Real MooseApp::getGlobalTimeOffset ( ) const
inline

Each App has it's own local time.

The "global" time of the whole problem might be different. This offset is how far off the local App time is from the global time.

Definition at line 223 of file MooseApp.h.

Referenced by Tecplot::output(), Nemesis::output(), Exodus::outputEmptyTimestep(), Exodus::outputNodalVariables(), and TransientMultiApp::solveStep().

223 { return _global_time_offset; }
Real _global_time_offset
Offset of the local App time to the "global" problem time.
Definition: MooseApp.h:739

◆ getInputFileName()

std::string MooseApp::getInputFileName ( ) const
inline

Returns the input file name that was set with setInputFileName.

Definition at line 154 of file MooseApp.h.

Referenced by FileOutput::getOutputFileBase(), and Console::outputInput().

154 { return _input_filename; }
std::string _input_filename
Input file name used.
Definition: MooseApp.h:721

◆ getInputParameterWarehouse()

InputParameterWarehouse & MooseApp::getInputParameterWarehouse ( )

Get the InputParameterWarehouse for MooseObjects.

Definition at line 1321 of file MooseApp.C.

Referenced by FEProblemBase::addMaterialHelper(), Factory::create(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), and Factory::releaseSharedObjects().

1322 {
1324 }
InputParameterWarehouse * _input_parameter_warehouse
Input parameter storage structure (this is a raw pointer so the destruction time can be explicitly co...
Definition: MooseApp.h:751

◆ getLoadedLibraryPaths()

std::set< std::string > MooseApp::getLoadedLibraryPaths ( ) const

Return the loaded library filenames in a std::vector.

Definition at line 1310 of file MooseApp.C.

Referenced by dynamicAppRegistration(), and Factory::reportUnregisteredError().

1311 {
1312  // Return the paths but not the open file handles
1313  std::set<std::string> paths;
1314  for (const auto & it : _lib_handles)
1315  paths.insert(it.first.first);
1316 
1317  return paths;
1318 }
std::map< std::pair< std::string, std::string >, void * > _lib_handles
The library, registration method and the handle to the method.
Definition: MooseApp.h:827

◆ getMeshGenerator()

const MeshGenerator & MooseApp::getMeshGenerator ( const std::string &  name) const

Get a mesh generator with its name.

Definition at line 1429 of file MooseApp.C.

1430 {
1431  return *_mesh_generators.find(MooseUtils::shortName(name))->second.get();
1432 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:363
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
Holds the mesh generators until they have completed, then this structure is cleared.
Definition: MooseApp.h:881

◆ getMeshGeneratorMesh()

std::unique_ptr<MeshBase> MooseApp::getMeshGeneratorMesh ( )
inline

Get the generated mesh generated by executeMeshGenerators();.

Definition at line 595 of file MooseApp.h.

Referenced by MeshGeneratorMesh::buildMesh().

596  {
597  auto mesh_unique_ptr_ptr = _final_generated_meshes.front();
598 
599  // Because C++ is stupid
600  _final_generated_meshes.pop_front();
601 
602  return std::move(*mesh_unique_ptr_ptr);
603  }
std::list< std::unique_ptr< MeshBase > * > _final_generated_meshes
The final Mesh that is generated by the generators.
Definition: MooseApp.h:887

◆ getMeshGeneratorNames()

std::vector< std::string > MooseApp::getMeshGeneratorNames ( ) const

Get names of all mesh generators Note: This function should be called after all mesh generators are added with the 'add_mesh_generator' task.

The returned value will be undefined and depends on the ordering that mesh generators are added by MOOSE if the function is called during the 'add_mesh_generator' task.

Definition at line 1435 of file MooseApp.C.

1436 {
1437  std::vector<std::string> names;
1438  for (auto & pair : _mesh_generators)
1439  names.push_back(pair.first);
1440  return names;
1441 }
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
Holds the mesh generators until they have completed, then this structure is cleared.
Definition: MooseApp.h:881

◆ getMeshGeneratorOutput()

std::unique_ptr< MeshBase > & MooseApp::getMeshGeneratorOutput ( const std::string &  name)

Get a refernce to a pointer that will be the output of the MeshGenerator named name.

Definition at line 1444 of file MooseApp.C.

Referenced by executeMeshGenerators(), MeshGenerator::getMesh(), and MeshGenerator::getMeshByName().

1445 {
1446  auto & outputs = _mesh_generator_outputs[name];
1447 
1448  outputs.push_back(nullptr);
1449 
1450  return outputs.back();
1451 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::map< std::string, std::list< std::unique_ptr< MeshBase > > > _mesh_generator_outputs
Holds the output for each mesh generator - including duplicates needed downstream.
Definition: MooseApp.h:884

◆ getMeshModifier()

const MeshModifier & MooseApp::getMeshModifier ( const std::string &  name) const

Get a mesh modifier with its name.

Definition at line 1344 of file MooseApp.C.

1345 {
1346  return *_mesh_modifiers.find(MooseUtils::shortName(name))->second.get();
1347 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:363
std::map< std::string, std::shared_ptr< MeshModifier > > _mesh_modifiers
Holds the mesh modifiers until they have completed, then this structure is cleared.
Definition: MooseApp.h:878

◆ getMeshModifierNames()

std::vector< std::string > MooseApp::getMeshModifierNames ( ) const

Get names of all mesh modifiers Note: This function should be called after all mesh modifiers are added with the 'add_mesh_modifier' task.

The returned value will be undefined and depends on the ordering that mesh modifiers are added by MOOSE if the function is called during the 'add_mesh_modifier' task.

Definition at line 1350 of file MooseApp.C.

1351 {
1352  std::vector<std::string> names;
1353  for (auto & pair : _mesh_modifiers)
1354  names.push_back(pair.first);
1355  return names;
1356 }
std::map< std::string, std::shared_ptr< MeshModifier > > _mesh_modifiers
Holds the mesh modifiers until they have completed, then this structure is cleared.
Definition: MooseApp.h:878

◆ getOutputFileBase()

std::string MooseApp::getOutputFileBase ( ) const

Override the selection of the output file base name.

Definition at line 784 of file MooseApp.C.

Referenced by MultiApp::createApp(), getCheckpointDirectories(), and FileOutput::getOutputFileBase().

785 {
786  return _output_file_base;
787 }
std::string _output_file_base
The output file basename.
Definition: MooseApp.h:724

◆ getOutputFileNumbers()

std::map<std::string, unsigned int>& MooseApp::getOutputFileNumbers ( )
inline

Store a map of outputter names and file numbers The MultiApp system requires this to get the file numbering to propogate down through the multiapps.

See also
MultiApp TransientMultiApp

Definition at line 406 of file MooseApp.h.

Referenced by TransientMultiApp::setupApp().

406 { return _output_file_numbers; }
std::map< std::string, unsigned int > _output_file_numbers
Map of outputer name and file number (used by MultiApps to propagate file numbers down through the mu...
Definition: MooseApp.h:819

◆ getOutputPosition()

Point MooseApp::getOutputPosition ( ) const
inline

Get the output position.

Returns
The position offset for the output.

Definition at line 193 of file MooseApp.h.

Referenced by MultiApp::createApp(), Exodus::output(), and MultiApp::parentOutputPositionChanged().

193 { return _output_position; }
Point _output_position
The output position.
Definition: MooseApp.h:730

◆ getOutputWarehouse()

OutputWarehouse & MooseApp::getOutputWarehouse ( )

◆ getParallelMeshOnCommandLine()

bool MooseApp::getParallelMeshOnCommandLine ( ) const
inline

Deprecated.

Call getDistributedMeshOnCommandLine() instead.

Definition at line 322 of file MooseApp.h.

323  {
324  mooseDeprecated("getParallelMeshOnCommandLine() is deprecated, call "
325  "getDistributedMeshOnCommandLine() instead.");
327  }
bool getDistributedMeshOnCommandLine() const
Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibilit...
Definition: MooseApp.h:317
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ getParam() [1/2]

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

Retrieve a parameter for the object.

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

Definition at line 916 of file MooseApp.h.

Referenced by CommonOutputAction::act(), FEProblemBase::addOutput(), Console::Console(), MooseApp(), PerfGraphOutput::output(), and SetupMeshAction::setupMesh().

917 {
918  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
919 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:709

◆ getParam() [2/2]

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

Definition at line 923 of file MooseApp.h.

924 {
925  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
926 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:709

◆ getPrintableName()

virtual std::string MooseApp::getPrintableName ( ) const
inlinevirtual

Get printable name of the application.

Definition at line 80 of file MooseApp.h.

Referenced by getPrintableVersion().

80 { return "Application"; }

◆ getPrintableVersion()

std::string MooseApp::getPrintableVersion ( ) const

Non-virtual method for printing out the version string in a consistent format.

Definition at line 436 of file MooseApp.C.

Referenced by setupOptions().

437 {
438  return getPrintableName() + " Version: " + getVersion();
439 }
virtual std::string getPrintableName() const
Get printable name of the application.
Definition: MooseApp.h:80
virtual std::string getVersion() const
Returns the current version of the framework or application (default: framework version).
Definition: MooseApp.C:430

◆ getRecoverableData()

std::set<std::string>& MooseApp::getRecoverableData ( )
inline

Return a reference to the recoverable data object.

Returns
A const reference to the recoverable data

Definition at line 481 of file MooseApp.h.

Referenced by Resurrector::restartRestartableData(), and RestartableDataIO::restoreBackup().

481 { return _recoverable_data; }
std::set< std::string > _recoverable_data
Data names that will only be read from the restart file during RECOVERY.
Definition: MooseApp.h:860

◆ getRecoverFileBase()

std::string MooseApp::getRecoverFileBase ( )
inline

The file_base for the recovery file.

Definition at line 357 of file MooseApp.h.

Referenced by SetupRecoverFileBaseAction::act(), MooseMesh::init(), and FEProblemBase::initialSetup().

357 { return _recover_base; }
std::string _recover_base
The base name to recover from. If blank then we will find the newest recovery file.
Definition: MooseApp.h:810

◆ getRecoverFileSuffix()

std::string MooseApp::getRecoverFileSuffix ( )
inline

The suffix for the recovery file.

Definition at line 373 of file MooseApp.h.

Referenced by MooseMesh::init(), FEProblemBase::initialSetup(), and FEProblemBase::setRestartFile().

373 { return _recover_suffix; }
std::string _recover_suffix
The file suffix to recover from. If blank then we will use "cpr" for binary CheckpointIO.
Definition: MooseApp.h:813

◆ getRelationshipManagerInfo()

std::vector< std::pair< std::string, std::string > > MooseApp::getRelationshipManagerInfo ( ) const

Returns the Relationship managers info suitable for printing.

Definition at line 1697 of file MooseApp.C.

Referenced by ConsoleUtils::outputRelationshipManagerInformation().

1698 {
1699  std::vector<std::pair<std::string, std::string>> info_strings;
1700  info_strings.reserve(_relationship_managers.size());
1701 
1702  for (const auto & rm : _relationship_managers)
1703  {
1704  auto info = rm->getInfo();
1705  if (info.size())
1706  info_strings.emplace_back(std::make_pair(Moose::stringify(rm->getType()), info));
1707  }
1708 
1709  return info_strings;
1710 }
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:61
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
Definition: MooseApp.h:824

◆ getRestartableData()

const RestartableDatas& MooseApp::getRestartableData ( )
inline

Return reference to the restatable data object.

Returns
A const reference to the restatable data object

Definition at line 475 of file MooseApp.h.

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

475 { return _restartable_data; }
RestartableDatas _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:857

◆ getStartTime()

Real MooseApp::getStartTime ( ) const
inline
Returns
The start time

Definition at line 211 of file MooseApp.h.

Referenced by Transient::Transient().

211 { return _start_time; }
Real _start_time
The time at which to start the simulation.
Definition: MooseApp.h:736

◆ getSystemInfo()

const SystemInfo* MooseApp::getSystemInfo ( ) const
inline

Get SystemInfo object.

Returns
A pointer to the SystemInformation object

Definition at line 417 of file MooseApp.h.

Referenced by ConsoleUtils::outputFrameworkInformation(), and ExodusFormatter::printInputFile().

417 { return _sys_info.get(); }
std::unique_ptr< SystemInfo > _sys_info
System Information.
Definition: MooseApp.h:772

◆ getVersion()

std::string MooseApp::getVersion ( ) const
virtual

Returns the current version of the framework or application (default: framework version).

Definition at line 430 of file MooseApp.C.

Referenced by getPrintableVersion().

431 {
432  return MOOSE_VERSION;
433 }

◆ halfTransient()

bool MooseApp::halfTransient ( )
inline

Whether or not this simulation should only run half its transient (useful for testing recovery)

Definition at line 384 of file MooseApp.h.

Referenced by TimeStepper::constrainStep(), Transient::execute(), TimeSequenceStepperBase::setupSequence(), and Transient::Transient().

384 { return _half_transient; }
bool _half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:816

◆ hasCachedBackup()

bool MooseApp::hasCachedBackup ( )
inlineprotected

Whether or not this MooseApp has cached a Backup to use for restart / recovery.

Definition at line 666 of file MooseApp.h.

Referenced by FEProblemBase::initialSetup().

666 { return _cached_backup.get(); }
std::shared_ptr< Backup > _cached_backup
Cache for a Backup to use for restart / recovery.
Definition: MooseApp.h:890

◆ hasOutputPosition()

bool MooseApp::hasOutputPosition ( ) const
inline

Whether or not an output position has been set.

Returns
True if it has

Definition at line 187 of file MooseApp.h.

Referenced by Exodus::output().

187 { return _output_position_set; }
bool _output_position_set
Whether or not an output position has been set for this app.
Definition: MooseApp.h:727

◆ hasRecoverFileBase()

bool MooseApp::hasRecoverFileBase ( )

Return true if the recovery file base is set.

Definition at line 877 of file MooseApp.C.

878 {
879  return !_recover_base.empty();
880 }
std::string _recover_base
The base name to recover from. If blank then we will find the newest recovery file.
Definition: MooseApp.h:810

◆ hasRelationshipManager()

bool MooseApp::hasRelationshipManager ( const std::string &  name) const

Returns a Boolean indicating whether a RelationshipManater exists with the same name.

Definition at line 1662 of file MooseApp.C.

Referenced by MooseADObjectAction::addRelationshipManagers(), and MooseObjectAction::addRelationshipManagers().

1663 {
1664  return std::find_if(_relationship_managers.begin(),
1665  _relationship_managers.end(),
1666  [&name](const std::shared_ptr<RelationshipManager> & rm) {
1667  return rm->name() == name;
1668  }) != _relationship_managers.end();
1669 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::vector< std::shared_ptr< RelationshipManager > > _relationship_managers
Definition: MooseApp.h:824

◆ hasStartTime()

bool MooseApp::hasStartTime ( ) const
inline
Returns
Whether or not a start time has been programmatically set using setStartTime()

Definition at line 206 of file MooseApp.h.

Referenced by Transient::Transient().

206 { return _start_time_set; }
bool _start_time_set
Whether or not an start time has been set.
Definition: MooseApp.h:733

◆ header()

std::string MooseApp::header ( ) const
virtual

Returns a string to be printed at the beginning of a simulation.

Definition at line 1327 of file MooseApp.C.

Referenced by setupOptions().

1328 {
1329  return std::string("");
1330 }

◆ isParamValid()

bool MooseApp::isParamValid ( const std::string &  name) const
inline

Definition at line 113 of file MooseApp.h.

Referenced by MooseApp(), runInputFile(), and setupOptions().

113 { return _pars.isParamValid(name); }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:709
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isRecovering()

bool MooseApp::isRecovering ( ) const

◆ isRestarting()

bool MooseApp::isRestarting ( ) const

Whether or not this is a "restart" calculation.

Definition at line 859 of file MooseApp.C.

Referenced by MultiApp::createApp(), FileOutput::FileOutput(), Transient::init(), FEProblemBase::initialSetup(), InversePowerMethod::InversePowerMethod(), NonlinearEigen::NonlinearEigen(), Transient::preExecute(), restoreCachedBackup(), and TimeSequenceStepperBase::setupSequence().

860 {
861  return _restart;
862 }
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:798

◆ isSplitMesh()

bool MooseApp::isSplitMesh ( ) const

Whether or not this is a split mesh operation.

Definition at line 865 of file MooseApp.C.

Referenced by RelationshipManager::attachRelationshipManagers(), ElementSideNeighborLayers::attachRelationshipManagersInternal(), ElementPointNeighbors::attachRelationshipManagersInternal(), and MooseMesh::init().

866 {
867  return _split_mesh;
868 }
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:801

◆ isUltimateMaster()

bool MooseApp::isUltimateMaster ( )
inline

Whether or not this app is the ultimate master app.

(ie level == 0)

Definition at line 522 of file MooseApp.h.

Referenced by SetupRecoverFileBaseAction::act(), callMooseErrorRaw(), MooseMesh::init(), FEProblemBase::initialSetup(), and setupOptions().

522 { return !_multiapp_level; }
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition: MooseApp.h:872

◆ isUseSplit()

bool MooseApp::isUseSplit ( ) const

Whether or not we are running with pre-split (distributed mesh)

Definition at line 871 of file MooseApp.C.

Referenced by AdaptivityAction::act(), SetupMeshAction::act(), SetupMeshCompleteAction::act(), MooseMesh::buildMeshBaseObject(), and ConsoleUtils::outputMeshInformation().

872 {
873  return _use_split;
874 }
const bool _use_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseApp.h:804

◆ libNameToAppName()

std::string MooseApp::libNameToAppName ( const std::string &  library_name) const

Converts a library name to an application name:

Definition at line 1071 of file MooseApp.C.

1072 {
1073  std::string app_name(library_name);
1074 
1075  // Strip off the leading "lib" and trailing ".la"
1076  if (pcrecpp::RE("lib(.+?)(?:-\\w+)?\\.la").Replace("\\1", &app_name) == 0)
1077  mooseError("Invalid library name: ", app_name);
1078 
1079  return MooseUtils::underscoreToCamelCase(app_name, true);
1080 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::string underscoreToCamelCase(const std::string &underscore_name, bool leading_upper_case)
Function for converting an underscore name to a camel case name.
Definition: MooseUtils.C:331

◆ loadLibraryAndDependencies()

void MooseApp::loadLibraryAndDependencies ( const std::string &  library_filename,
const Parameters &  params 
)
protected

Recursively loads libraries and dependencies in the proper order to fully register a MOOSE application that may have several dependencies.

REQUIRES: dynamic linking loader support.

Definition at line 1190 of file MooseApp.C.

Referenced by dynamicRegistration().

1192 {
1193  std::string line;
1194  std::string dl_lib_filename;
1195 
1196  // This RE looks for absolute path libtool filenames (i.e. begins with a slash and ends with a
1197  // .la)
1198  pcrecpp::RE re_deps("(/\\S*\\.la)");
1199 
1200  std::ifstream handle(library_filename.c_str());
1201  if (handle.is_open())
1202  {
1203  while (std::getline(handle, line))
1204  {
1205  // Look for the system dependent dynamic library filename to open
1206  if (line.find("dlname=") != std::string::npos)
1207  // Magic numbers are computed from length of this string "dlname=' and line minus that
1208  // string plus quotes"
1209  dl_lib_filename = line.substr(8, line.size() - 9);
1210 
1211  if (line.find("dependency_libs=") != std::string::npos)
1212  {
1213  pcrecpp::StringPiece input(line);
1214  pcrecpp::StringPiece depend_library;
1215  while (re_deps.FindAndConsume(&input, &depend_library))
1216  // Recurse here to load dependent libraries in depth-first order
1217  loadLibraryAndDependencies(depend_library.as_string(), params);
1218 
1219  // There's only one line in the .la file containing the dependency libs so break after
1220  // finding it
1221  break;
1222  }
1223  }
1224  handle.close();
1225  }
1226 
1227  std::string registration_method_name = params.get<std::string>("registration_method");
1228  // Time to load the library, First see if we've already loaded this particular dynamic library
1229  if (_lib_handles.find(std::make_pair(library_filename, registration_method_name)) ==
1230  _lib_handles.end() && // make sure we haven't already loaded this library
1231  dl_lib_filename != "") // AND make sure we have a library name (we won't for static linkage)
1232  {
1233  std::pair<std::string, std::string> lib_name_parts =
1234  MooseUtils::splitFileName(library_filename);
1235 
1236  // Assemble the actual filename using the base path of the *.la file and the dl_lib_filename
1237  std::string dl_lib_full_path = lib_name_parts.first + '/' + dl_lib_filename;
1238 
1239 #ifdef LIBMESH_HAVE_DLOPEN
1240  void * handle = dlopen(dl_lib_full_path.c_str(), RTLD_LAZY);
1241 #else
1242  void * handle = NULL;
1243 #endif
1244 
1245  if (!handle)
1246  mooseError("Cannot open library: ", dl_lib_full_path.c_str(), "\n");
1247 
1248 // get the pointer to the method in the library. The dlsym()
1249 // function returns a null pointer if the symbol cannot be found,
1250 // we also explicitly set the pointer to NULL if dlsym is not
1251 // available.
1252 #ifdef LIBMESH_HAVE_DLOPEN
1253  void * registration_method = dlsym(handle, registration_method_name.c_str());
1254 #else
1255  void * registration_method = NULL;
1256 #endif
1257 
1258  if (!registration_method)
1259  {
1260 // We found a dynamic library that doesn't have a dynamic
1261 // registration method in it. This shouldn't be an error, so
1262 // we'll just move on.
1263 #ifdef DEBUG
1264  mooseWarning("Unable to find extern \"C\" method \"",
1265  registration_method_name,
1266  "\" in library: ",
1267  dl_lib_full_path,
1268  ".\n",
1269  "This doesn't necessarily indicate an error condition unless you believe that "
1270  "the method should exist in that library.\n");
1271 #endif
1272 
1273 #ifdef LIBMESH_HAVE_DLOPEN
1274  dlclose(handle);
1275 #endif
1276  }
1277  else // registration_method is valid!
1278  {
1279  // TODO: Look into cleaning this up
1280  switch (params.get<RegistrationType>("reg_type"))
1281  {
1282  case APPLICATION:
1283  {
1284  typedef void (*register_app_t)();
1285  register_app_t * reg_ptr = reinterpret_cast<register_app_t *>(&registration_method);
1286  (*reg_ptr)();
1287  break;
1288  }
1289  case REGALL:
1290  {
1291  typedef void (*register_app_t)(Factory *, ActionFactory *, Syntax *);
1292  register_app_t * reg_ptr = reinterpret_cast<register_app_t *>(&registration_method);
1293  (*reg_ptr)(params.get<Factory *>("factory"),
1294  params.get<ActionFactory *>("action_factory"),
1295  params.get<Syntax *>("syntax"));
1296  break;
1297  }
1298  default:
1299  mooseError("Unhandled RegistrationType");
1300  }
1301 
1302  // Store the handle so we can close it later
1303  _lib_handles.insert(
1304  std::make_pair(std::make_pair(library_filename, registration_method_name), handle));
1305  }
1306  }
1307 }
Generic factory class for build all sorts of objects.
Definition: Factory.h:154
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:220
void loadLibraryAndDependencies(const std::string &library_filename, const Parameters &params)
Recursively loads libraries and dependencies in the proper order to fully register a MOOSE applicatio...
Definition: MooseApp.C:1190
std::pair< std::string, std::string > splitFileName(std::string full_file)
Function for splitting path and filename.
Definition: MooseUtils.C:289
Specialized factory for generic Action System objects.
Definition: ActionFactory.h:65
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:863
std::map< std::pair< std::string, std::string >, void * > _lib_handles
The library, registration method and the handle to the method.
Definition: MooseApp.h:827
Holding syntax for parsing input files.
Definition: Syntax.h:21

◆ multiAppLevel()

unsigned int MooseApp::multiAppLevel ( ) const
inline

The MultiApp Level.

Returns
The current number of levels from the master app

Definition at line 511 of file MooseApp.h.

Referenced by FEProblemBase::checkNonlinearConvergence(), MultiApp::createApp(), Console::initialSetup(), OutputWarehouse::mooseConsole(), setupOptions(), and Console::write().

511 { return _multiapp_level; }
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition: MooseApp.h:872

◆ multiAppNumber()

unsigned int MooseApp::multiAppNumber ( ) const
inline

The MultiApp number.

Returns
The numbering in all the sub-apps on the same level

Definition at line 517 of file MooseApp.h.

517 { return _multiapp_number; }
unsigned int _multiapp_number
Numbering in all the sub-apps on the same level.
Definition: MooseApp.h:875

◆ name()

const std::string& MooseApp::name ( ) const
inline

Get the name of the object.

In the case of MooseApp, the name of the object is NOT the name of the application. It's the name of the created application which is usually "main". If you have subapps, then each individual subapp will have a unique name which typically comes from the input file (e.g. sub0, sub1, etc...).

Returns
The name of the object

Definition at line 73 of file MooseApp.h.

Referenced by addMeshGenerator(), addMeshModifier(), callMooseErrorRaw(), FEProblemBase::checkNonlinearConvergence(), MultiApp::createApp(), executeMeshGenerators(), getMeshGenerator(), getMeshGeneratorOutput(), getMeshModifier(), getParam(), hasRelationshipManager(), Console::initialSetup(), isParamValid(), OutputWarehouse::mooseConsole(), Parser::parse(), registerRecoverableData(), registerRestartableData(), runInputFile(), setupOptions(), and Console::write().

73 { return _name; }
std::string _name
The name of this object.
Definition: MooseApp.h:706

◆ parameters()

InputParameters& MooseApp::parameters ( )
inline

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 86 of file MooseApp.h.

Referenced by MeshOnlyAction::act(), SplitMeshAction::act(), SetupMeshAction::act(), addMeshGenerator(), addMeshModifier(), buildAction(), and MooseApp().

86 { return _pars; }
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:709

◆ parser()

Parser& MooseApp::parser ( )
inline

Definition at line 142 of file MooseApp.h.

Referenced by MeshOnlyAction::act().

142 { return _parser; }
Parser _parser
Parser for parsing the input file.
Definition: MooseApp.h:760

◆ perfGraph()

PerfGraph& MooseApp::perfGraph ( )
inline

Get the PerfGraph for this app.

Definition at line 98 of file MooseApp.h.

Referenced by PerfGraphOutput::output().

98 { return _perf_graph; }
PerfGraph _perf_graph
The PerfGraph object for this applciation.
Definition: MooseApp.h:718

◆ processor_id()

processor_id_type MooseApp::processor_id ( )
inline

Definition at line 282 of file MooseApp.h.

Referenced by SetupMeshAction::act(), FileOutput::FileOutput(), and MooseApp().

282 { return cast_int<processor_id_type>(_comm->rank()); }
const std::shared_ptr< Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:715

◆ registerRecoverableData()

void MooseApp::registerRecoverableData ( std::string  name)
protected

NOTE: This is an internal function meant for MOOSE use only!

Register a piece of recoverable data. This is data that will get written / read to / from a restart file.

However, this data will ONLY get read from the restart file during a RECOVERY operation!

Parameters
nameThe full (unique) name.

Definition at line 883 of file MooseApp.C.

Referenced by Restartable::registerRecoverableDataOnApp().

884 {
885  _recoverable_data.insert(name);
886 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
std::set< std::string > _recoverable_data
Data names that will only be read from the restart file during RECOVERY.
Definition: MooseApp.h:860

◆ registerRestartableData()

void MooseApp::registerRestartableData ( std::string  name,
std::unique_ptr< RestartableDataValue data,
THREAD_ID  tid 
)

Definition at line 1083 of file MooseApp.C.

Referenced by Restartable::registerRestartableDataOnApp().

1086 {
1087  auto & restartable_data = _restartable_data[tid];
1088  auto insert_pair = moose_try_emplace(restartable_data, name, std::move(data));
1089 
1090  if (!insert_pair.second)
1091  mooseError("Attempted to declare restartable twice with the same name: ", name);
1092 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
RestartableDatas _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:857
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::pair< typename M::iterator, bool > moose_try_emplace(M &m, const typename M::key_type &k, Args &&... args)
Function to mirror the behavior of the C++17 std::map::try_emplace() method (no hint).
Definition: Moose.h:65

◆ restore()

void MooseApp::restore ( std::shared_ptr< Backup backup,
bool  for_restart = false 
)
virtual

Restore a Backup.

This sets the App's state.

Parameters
backupThe Backup holding the data for the app
for_restartWhether this restoration is explicitly for the first restoration of restart data.

This method should be overridden in external or MOOSE-wrapped applications.

Definition at line 899 of file MooseApp.C.

Referenced by restoreCachedBackup().

900 {
901  TIME_SECTION(_restore_timer);
902 
903  mooseAssert(_executioner, "Executioner is nullptr");
904  FEProblemBase & fe_problem = _executioner->feProblem();
905 
906  RestartableDataIO rdio(fe_problem);
907  rdio.restoreBackup(backup, for_restart);
908 }
Class for doing restart.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual std::shared_ptr< Backup > backup()
Create a Backup from the current App.
Definition: MooseApp.C:889
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763
PerfID _restore_timer
Definition: MooseApp.h:901

◆ restoreCachedBackup()

void MooseApp::restoreCachedBackup ( )
protected

Restore from a cached backup.

Definition at line 1553 of file MooseApp.C.

Referenced by FEProblemBase::initialSetup().

1554 {
1555  if (!_cached_backup.get())
1556  mooseError("No cached Backup to restore!");
1557 
1558  TIME_SECTION(_restore_cached_backup_timer);
1559 
1561 
1562  // Release our hold on this Backup
1563  _cached_backup.reset();
1564 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::shared_ptr< Backup > _cached_backup
Cache for a Backup to use for restart / recovery.
Definition: MooseApp.h:890
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:859
PerfID _restore_cached_backup_timer
Definition: MooseApp.h:905
virtual void restore(std::shared_ptr< Backup > backup, bool for_restart=false)
Restore a Backup.
Definition: MooseApp.C:899

◆ run()

void MooseApp::run ( )
virtual

Run the application.

Definition at line 938 of file MooseApp.C.

939 {
940  TIME_SECTION(_run_timer);
941 
942  try
943  {
944  TIME_SECTION(_setup_timer);
945  setupOptions();
946  runInputFile();
947  }
948  catch (std::exception & err)
949  {
950  mooseError(err.what());
951  }
952 
953  if (!_check_input)
954  {
955  TIME_SECTION(_execute_timer);
957  }
958  else
959  {
960  errorCheck();
961  // Output to stderr, so it is easier for peacock to get the result
962  Moose::err << "Syntax OK" << std::endl;
963  }
964 }
PerfID _run_timer
Definition: MooseApp.h:902
virtual void setupOptions()
Setup options based on InputParameters.
Definition: MooseApp.C:442
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
PerfID _execute_timer
Definition: MooseApp.h:899
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:822
virtual void executeExecutioner()
Execute the Executioner that was built.
Definition: MooseApp.C:829
virtual void runInputFile()
Actually build everything in the input file.
Definition: MooseApp.C:790
PerfID _setup_timer
Timers.
Definition: MooseApp.h:896
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
Definition: MooseApp.C:815

◆ runInputFile()

void MooseApp::runInputFile ( )
virtual

Actually build everything in the input file.

Definition at line 790 of file MooseApp.C.

Referenced by run().

791 {
792  TIME_SECTION(_run_input_file_timer);
793 
794  // If ready to exit has been set, then just return
795  if (_ready_to_exit)
796  return;
797 
799 
800  if (isParamValid("mesh_only") || isParamValid("split_mesh"))
801  _ready_to_exit = true;
802  else if (getParam<bool>("list_constructed_objects"))
803  {
804  // TODO: ask multiapps for their constructed objects
805  _ready_to_exit = true;
806  std::vector<std::string> obj_list = _factory.getConstructedObjects();
807  Moose::out << "**START OBJECT DATA**\n";
808  for (const auto & name : obj_list)
809  Moose::out << name << "\n";
810  Moose::out << "**END OBJECT DATA**\n" << std::endl;
811  }
812 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
PerfID _run_input_file_timer
Definition: MooseApp.h:898
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:113
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
std::vector< std::string > getConstructedObjects() const
Get a list of all constructed Moose Object types.
Definition: Factory.C:277
Factory _factory
Definition: MooseApp.h:782
void executeAllActions()
This method loops over all actions in the warehouse and executes them.
bool _ready_to_exit
Definition: MooseApp.h:786

◆ setBackupObject()

void MooseApp::setBackupObject ( std::shared_ptr< Backup backup)

Method for setting the backup object to be restored at a later time.

This method is called during simulation restart or recover before the application is completely setup. The backup object set here, will be restored when needed by a call to restoreCachedBackup().

Parameters
backupThe Backup holding the data for the app.

Definition at line 1547 of file MooseApp.C.

1548 {
1550 }
std::shared_ptr< Backup > _cached_backup
Cache for a Backup to use for restart / recovery.
Definition: MooseApp.h:890
virtual std::shared_ptr< Backup > backup()
Create a Backup from the current App.
Definition: MooseApp.C:889

◆ setCheckUnusedFlag()

void MooseApp::setCheckUnusedFlag ( bool  warn_is_error = false)

Set a flag so that the parser will either warn or error when unused variables are seen after parsing is complete.

_enable_unused_check is initialized to WARN_UNUSED. If an application chooses to promote this value to ERROR_UNUSED programmatically prior to running the simulation, we certainly don't want to allow it to fall back. Therefore, we won't set it if it's already at the highest value (i.e. error). If however a developer turns it off, it can still be turned on.

Definition at line 911 of file MooseApp.C.

Referenced by setupOptions().

912 {
919  if (_enable_unused_check != ERROR_UNUSED || warn_is_error)
920  _enable_unused_check = warn_is_error ? ERROR_UNUSED : WARN_UNUSED;
921  else
922  mooseInfo("Ignoring request to turn off or warn about unused parameters.\n");
923 }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:253
enum MooseApp::UNUSED_CHECK _enable_unused_check

◆ setErrorOverridden()

void MooseApp::setErrorOverridden ( )

Set a flag so that the parser will throw an error if overridden parameters are detected.

Definition at line 932 of file MooseApp.C.

Referenced by setupOptions().

933 {
934  _error_overridden = true;
935 }
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected...
Definition: MooseApp.h:785

◆ setExecutioner()

void MooseApp::setExecutioner ( std::shared_ptr< Executioner > &&  executioner)
inline

Set the Executioner for this App.

Definition at line 265 of file MooseApp.h.

Referenced by CreateExecutionerAction::act().

std::shared_ptr< Executioner > & executioner()
Retrieve the Executioner for this App.
Definition: MooseApp.h:254
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763

◆ setFileRestart()

bool& MooseApp::setFileRestart ( )
inline

This method is here so we can determine whether or not we need to use a separate reader to read the mesh BEFORE we create the mesh.

Definition at line 300 of file MooseApp.h.

Referenced by CopyNodalVarsAction::act(), SetupMeshCompleteAction::act(), FileMesh::buildMesh(), and FEProblemBase::initialSetup().

300 { return _initial_from_file; }
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Definition: MooseApp.h:789

◆ setGlobalTimeOffset()

void MooseApp::setGlobalTimeOffset ( const Real  offset)
inline

Each App has it's own local time.

The "global" time of the whole problem might be different. This offset is how far off the local App time is from the global time.

Definition at line 217 of file MooseApp.h.

217 { _global_time_offset = offset; }
Real _global_time_offset
Offset of the local App time to the "global" problem time.
Definition: MooseApp.h:739

◆ setInputFileName()

void MooseApp::setInputFileName ( std::string  input_file_name)

Set the input file name.

Definition at line 778 of file MooseApp.C.

779 {
780  _input_filename = input_filename;
781 }
std::string _input_filename
Input file name used.
Definition: MooseApp.h:721

◆ setOutputFileBase()

void MooseApp::setOutputFileBase ( std::string  output_file_base)
inline

Override the selection of the output file base name.

Definition at line 159 of file MooseApp.h.

159 { _output_file_base = output_file_base; }
std::string _output_file_base
The output file basename.
Definition: MooseApp.h:724

◆ setOutputFileNumbers()

void MooseApp::setOutputFileNumbers ( std::map< std::string, unsigned int >  numbers)
inline

Store a map of outputter names and file numbers The MultiApp system requires this to get the file numbering to propagate down through the Multiapps.

Parameters
numbersMap of outputter names and file numbers
See also
MultiApp TransientMultiApp OutputWarehouse

Definition at line 394 of file MooseApp.h.

395  {
396  _output_file_numbers = numbers;
397  }
std::map< std::string, unsigned int > _output_file_numbers
Map of outputer name and file number (used by MultiApps to propagate file numbers down through the mu...
Definition: MooseApp.h:819

◆ setOutputPosition()

void MooseApp::setOutputPosition ( Point  p)

Tell the app to output in a specific position.

Definition at line 967 of file MooseApp.C.

968 {
969  _output_position_set = true;
970  _output_position = p;
972 
973  if (_executioner.get() != NULL)
974  _executioner->parentOutputPositionChanged();
975 }
bool _output_position_set
Whether or not an output position has been set for this app.
Definition: MooseApp.h:727
void meshChanged()
Calls the meshChanged method for every output object.
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:763
Point _output_position
The output position.
Definition: MooseApp.h:730
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:748

◆ setRecover()

void MooseApp::setRecover ( const bool &  value)

Definition at line 1541 of file MooseApp.C.

1542 {
1543  _recover = value;
1544 }
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:795

◆ setRecoverFileBase()

void MooseApp::setRecoverFileBase ( std::string  recover_base)
inline

mutator for recover_base (set by RecoverBaseAction)

Definition at line 362 of file MooseApp.h.

Referenced by SetupRecoverFileBaseAction::act().

363  {
364  if (recover_base.empty())
366  else
367  _recover_base = recover_base;
368  }
std::list< std::string > getCheckpointFiles() const
Extract all possible checkpoint file names.
Definition: MooseApp.C:1029
std::string getLatestAppCheckpointFileBase(const std::list< std::string > &checkpoint_files)
Definition: MooseUtils.C:552
std::string _recover_base
The base name to recover from. If blank then we will find the newest recovery file.
Definition: MooseApp.h:810

◆ setRecoverFileSuffix()

void MooseApp::setRecoverFileSuffix ( std::string  recover_suffix)
inline

mutator for recover_suffix

Definition at line 378 of file MooseApp.h.

378 { _recover_suffix = recover_suffix; }
std::string _recover_suffix
The file suffix to recover from. If blank then we will use "cpr" for binary CheckpointIO.
Definition: MooseApp.h:813

◆ setRestart()

void MooseApp::setRestart ( const bool &  value)

Sets the restart/recover flags.

Parameters
stateThe state to set the flag to

Definition at line 1533 of file MooseApp.C.

Referenced by FEProblemBase::setRestartFile().

1534 {
1535  _restart = value;
1536 
1537  std::shared_ptr<FEProblemBase> fe_problem = _action_warehouse.problemBase();
1538 }
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
std::shared_ptr< FEProblemBase > & problemBase()
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:798

◆ setStartTime()

void MooseApp::setStartTime ( const Real  time)

Set the starting time for the simulation.

This will override any choice made in the input file.

Parameters
timeThe start time for the simulation.

Definition at line 1036 of file MooseApp.C.

Referenced by EigenExecutionerBase::EigenExecutionerBase(), and Transient::Transient().

1037 {
1038  _start_time_set = true;
1039  _start_time = time;
1040 }
Real _start_time
The time at which to start the simulation.
Definition: MooseApp.h:736
bool _start_time_set
Whether or not an start time has been set.
Definition: MooseApp.h:733

◆ setupOptions()

void MooseApp::setupOptions ( )
virtual

Setup options based on InputParameters.

Definition at line 442 of file MooseApp.C.

Referenced by run().

443 {
444  TIME_SECTION(_setup_options_timer);
445 
446  // MOOSE was updated to have the ability to register execution flags in similar fashion as
447  // objects. However, this change requires all *App.C/h files to be updated with the new
448  // registerExecFlags method. To avoid breaking all applications the default MOOSE flags
449  // are added if nothing has been added to this point. In the future this could go away or
450  // perhaps be a warning.
451  if (_execute_flags.items().empty())
453 
454  // Print the header, this is as early as possible
455  std::string hdr(header() + "\n");
456  if (multiAppLevel() > 0)
458  Moose::out << hdr << std::flush;
459 
460  if (getParam<bool>("error_unused"))
461  setCheckUnusedFlag(true);
462  else if (getParam<bool>("warn_unused"))
463  setCheckUnusedFlag(false);
464 
465  if (getParam<bool>("error_override"))
467 
468  _distributed_mesh_on_command_line = getParam<bool>("distributed_mesh");
469 
470  _half_transient = getParam<bool>("half_transient");
471 
472  // The no_timing flag takes precedence over the timing flag.
473  if (getParam<bool>("no_timing"))
474  {
475  _pars.set<bool>("timing") = false;
476 
477  _perf_graph.setActive(false);
478  }
479 
480  if (isParamValid("trap_fpe") && isParamValid("no_trap_fpe"))
481  mooseError("Cannot use both \"--trap-fpe\" and \"--no-trap-fpe\" flags.");
482  if (isParamValid("trap_fpe"))
483  _trap_fpe = true;
484  else if (isParamValid("no_trap_fpe"))
485  _trap_fpe = false;
486 
487  // Turn all warnings in MOOSE to errors (almost see next logic block)
488  Moose::_warnings_are_errors = getParam<bool>("error");
489 
490  // Deprecated messages can be toggled to errors independently from everything else.
491  Moose::_deprecated_is_error = getParam<bool>("error_deprecated");
492 
493  if (isUltimateMaster()) // makes sure coloring isn't reset incorrectly in multi-app settings
494  {
495  // Toggle the color console off
496  Moose::setColorConsole(true, true); // set default color condition
497  if (getParam<bool>("no_color"))
498  Moose::setColorConsole(false);
499 
500  char * c_color = std::getenv("MOOSE_COLOR");
501  std::string color = "on";
502  if (c_color)
503  color = c_color;
504  if (getParam<std::string>("color") != "default-on")
505  color = getParam<std::string>("color");
506 
507  if (color == "auto")
509  else if (color == "on")
510  Moose::setColorConsole(true, true);
511  else if (color == "off")
512  Moose::setColorConsole(false);
513  else
514  mooseWarning("ignoring invalid --color arg (want 'auto', 'on', or 'off')");
515  }
516 
517  // this warning goes below --color processing to honor that setting for
518  // the warning. And below settings for warnings/error setup.
519  if (getParam<bool>("no_color"))
520  mooseDeprecated("The --no-color flag is deprecated. Use '--color off' instead.");
521 
522 // If there's no threading model active, but the user asked for
523 // --n-threads > 1 on the command line, throw a mooseError. This is
524 // intended to prevent situations where the user has potentially
525 // built MOOSE incorrectly (neither TBB nor pthreads found) and is
526 // asking for multiple threads, not knowing that there will never be
527 // any threads launched.
528 #if !LIBMESH_USING_THREADS
529  if (libMesh::command_line_value("--n-threads", 1) > 1)
530  mooseError("You specified --n-threads > 1, but there is no threading model active!");
531 #endif
532 
533  // Build a minimal running application, ignoring the input file.
534  if (getParam<bool>("minimal"))
536 
537  else if (getParam<bool>("display_version"))
538  {
539  Moose::perf_log.disable_logging();
540  Moose::out << getPrintableVersion() << std::endl;
541  _ready_to_exit = true;
542  return;
543  }
544  else if (getParam<bool>("help"))
545  {
546  Moose::perf_log.disable_logging();
547 
548  _command_line->printUsage();
549  _ready_to_exit = true;
550  }
551  else if (isParamValid("dump"))
552  {
553  Moose::perf_log.disable_logging();
554 
555  // Get command line argument following --dump on command line
556  std::string following_arg = getParam<std::string>("dump");
557 
558  // The argument following --dump is a parameter search string,
559  // which can be empty.
560  std::string param_search;
561  if (!following_arg.empty() && (following_arg.find('-') != 0))
562  param_search = following_arg;
563 
564  JsonSyntaxTree tree(param_search);
566  JsonInputFileFormatter formatter;
567  Moose::out << "### START DUMP DATA ###\n"
568  << formatter.toString(tree.getRoot()) << "\n### END DUMP DATA ###\n";
569  _ready_to_exit = true;
570  }
571  else if (isParamValid("registry"))
572  {
573  Moose::out << "Label\tType\tName\tClass\tFile\n";
574 
575  auto & objmap = Registry::allObjects();
576  for (auto & entry : objmap)
577  {
578  for (auto & obj : entry.second)
579  {
580  std::string name = obj._name;
581  if (name.empty())
582  name = obj._alias;
583  if (name.empty())
584  name = obj._classname;
585 
586  Moose::out << entry.first << "\tobject\t" << name << "\t" << obj._classname << "\t"
587  << obj._file << "\n";
588  }
589  }
590 
591  auto & actmap = Registry::allActions();
592  for (auto & entry : actmap)
593  {
594  for (auto & act : entry.second)
595  Moose::out << entry.first << "\taction\t" << act._name << "\t" << act._classname << "\t"
596  << act._file << "\n";
597  }
598 
599  _ready_to_exit = true;
600  }
601  else if (isParamValid("registry_hit"))
602  {
603  Moose::out << "### START REGISTRY DATA ###\n";
604 
605  hit::Section root("");
606  auto sec = new hit::Section("registry");
607  root.addChild(sec);
608  auto objsec = new hit::Section("objects");
609  sec->addChild(objsec);
610 
611  auto & objmap = Registry::allObjects();
612  for (auto & entry : objmap)
613  {
614  for (auto & obj : entry.second)
615  {
616  std::string name = obj._name;
617  if (name.empty())
618  name = obj._alias;
619  if (name.empty())
620  name = obj._classname;
621 
622  auto ent = new hit::Section("entry");
623  objsec->addChild(ent);
624  ent->addChild(new hit::Field("label", hit::Field::Kind::String, entry.first));
625  ent->addChild(new hit::Field("type", hit::Field::Kind::String, "object"));
626  ent->addChild(new hit::Field("name", hit::Field::Kind::String, name));
627  ent->addChild(new hit::Field("class", hit::Field::Kind::String, obj._classname));
628  ent->addChild(new hit::Field("file", hit::Field::Kind::String, obj._file));
629  }
630  }
631 
632  auto actsec = new hit::Section("actions");
633  sec->addChild(actsec);
634  auto & actmap = Registry::allActions();
635  for (auto & entry : actmap)
636  {
637  for (auto & act : entry.second)
638  {
639  auto ent = new hit::Section("entry");
640  actsec->addChild(ent);
641  ent->addChild(new hit::Field("label", hit::Field::Kind::String, entry.first));
642  ent->addChild(new hit::Field("type", hit::Field::Kind::String, "action"));
643  ent->addChild(new hit::Field("task", hit::Field::Kind::String, act._name));
644  ent->addChild(new hit::Field("class", hit::Field::Kind::String, act._classname));
645  ent->addChild(new hit::Field("file", hit::Field::Kind::String, act._file));
646  }
647  }
648 
649  Moose::out << root.render();
650 
651  Moose::out << "\n### END REGISTRY DATA ###\n";
652  _ready_to_exit = true;
653  }
654  else if (isParamValid("definition"))
655  {
656  Moose::perf_log.disable_logging();
657  JsonSyntaxTree tree("");
659  SONDefinitionFormatter formatter;
660  Moose::out << formatter.toString(tree.getRoot()) << "\n";
661  _ready_to_exit = true;
662  }
663  else if (isParamValid("yaml"))
664  {
665  Moose::perf_log.disable_logging();
666 
668 
669  // Get command line argument following --yaml on command line
670  std::string yaml_following_arg = getParam<std::string>("yaml");
671 
672  // If the argument following --yaml is non-existent or begins with
673  // a dash, call buildFullTree() with an empty string, otherwise
674  // pass the argument following --yaml.
675  if (yaml_following_arg.empty() || (yaml_following_arg.find('-') == 0))
677  else
678  _parser.buildFullTree(yaml_following_arg);
679 
680  _ready_to_exit = true;
681  }
682  else if (isParamValid("json"))
683  {
684  Moose::perf_log.disable_logging();
685 
686  // Get command line argument following --json on command line
687  std::string json_following_arg = getParam<std::string>("json");
688 
689  // The argument following --json is a parameter search string,
690  // which can be empty.
691  std::string search;
692  if (!json_following_arg.empty() && (json_following_arg.find('-') != 0))
693  search = json_following_arg;
694 
695  JsonSyntaxTree tree(search);
697 
698  Moose::out << "**START JSON DATA**\n" << tree.getRoot() << "\n**END JSON DATA**\n";
699  _ready_to_exit = true;
700  }
701  else if (getParam<bool>("syntax"))
702  {
703  Moose::perf_log.disable_logging();
704 
705  std::multimap<std::string, Syntax::ActionInfo> syntax = _syntax.getAssociatedActions();
706  Moose::out << "**START SYNTAX DATA**\n";
707  for (const auto & it : syntax)
708  Moose::out << it.first << "\n";
709  Moose::out << "**END SYNTAX DATA**\n" << std::endl;
710  _ready_to_exit = true;
711  }
712  else if (_input_filename != "" ||
713  isParamValid("input_file")) // They already specified an input filename
714  {
715  if (_input_filename == "")
716  _input_filename = getParam<std::string>("input_file");
717 
718  if (isParamValid("recover"))
719  {
720  // We need to set the flag manually here since the recover parameter is a string type (takes
721  // an optional filename)
722  _recover = true;
723 
724  // Get command line argument following --recover on command line
725  std::string recover_following_arg = getParam<std::string>("recover");
726 
727  // If the argument following --recover is non-existent or begins with
728  // a dash then we are going to eventually find the newest recovery file to use
729  if (!(recover_following_arg.empty() || (recover_following_arg.find('-') == 0)))
730  _recover_base = recover_following_arg;
731  }
732 
733  // Optionally get command line argument following --recoversuffix
734  // on command line. Currently this argument applies to both
735  // recovery and restart files.
736  if (isParamValid("recoversuffix"))
737  {
738  _recover_suffix = getParam<std::string>("recoversuffix");
739  }
740 
742 
743  if (isParamValid("mesh_only"))
744  {
745  _syntax.registerTaskName("mesh_only", true);
746  _syntax.addDependency("mesh_only", "setup_mesh_complete");
747  _action_warehouse.setFinalTask("mesh_only");
748  }
749  else if (isParamValid("split_mesh"))
750  {
751  _split_mesh = true;
752  _syntax.registerTaskName("split_mesh", true);
753  _syntax.addDependency("split_mesh", "setup_mesh_complete");
754  _action_warehouse.setFinalTask("split_mesh");
755  }
757  }
758  else if (getParam<bool>("apptype"))
759  {
760  Moose::perf_log.disable_logging();
761  Moose::out << "MooseApp Type: " << type() << std::endl;
762  _ready_to_exit = true;
763  }
764  else
765  {
766  Moose::perf_log.disable_logging();
767 
768  if (_check_input)
769  mooseError("You specified --check-input, but did not provide an input file. Add -i "
770  "<inputfile> to your command line.");
771 
772  _command_line->printUsage();
773  _ready_to_exit = true;
774  }
775 }
const std::string & name() const
Get the name of the object.
Definition: MooseApp.h:73
static const std::map< std::string, std::vector< RegistryEntry > > & allActions()
Returns a per-label keyed map of all Actions in the registry.
Definition: Registry.C:32
const std::multimap< std::string, ActionInfo > & getAssociatedActions() const
Return all Syntax to Action associations.
Definition: Syntax.C:310
if(nl->nonlinearSolver() ->matvec &&nl->nonlinearSolver() ->residual_and_jacobian_object)
void addDependency(const std::string &task, const std::string &pre_req)
Method to insert a new task in the list of existing tasks at the specified location.
Definition: Syntax.C:55
void setCheckUnusedFlag(bool warn_is_error=false)
Set a flag so that the parser will either warn or error when unused variables are seen after parsing ...
Definition: MooseApp.C:911
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool _warnings_are_errors
Variable to toggle any warning into an error (includes deprecated code warnings)
Definition: Moose.C:566
std::string toString(const moosecontrib::Json::Value &root)
Returns a string representation of the tree in input file format.
void registerTaskName(const std::string &task, bool should_auto_build=false)
Method to register a new task.
Definition: Syntax.C:20
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:220
void setFinalTask(const std::string &task)
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:479
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:511
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:822
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:113
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:745
Syntax & syntax()
Definition: MooseApp.h:144
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition: MooseApp.h:807
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:757
This class produces a dump of the InputFileParameters in the Standard Object Notation (SON) format fo...
Holds the syntax in a Json::Value tree.
bool _half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:816
std::string toString(const JsonVal &root)
returns a string representation of the tree in input file format
Parser _parser
Parser for parsing the input file.
Definition: MooseApp.h:760
void initSyntaxFormatter(SyntaxFormatterType type, bool dump_mode)
Creates a syntax formatter for printing.
Definition: Parser.C:648
const std::set< ExecFlagType > & items() const
Reference the all the available items.
Definition: ExecFlagEnum.h:74
void setErrorOverridden()
Set a flag so that the parser will throw an error if overridden parameters are detected.
Definition: MooseApp.C:932
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:742
void registerExecFlags(Factory &factory)
Definition: Moose.C:356
bool _deprecated_is_error
Variable to toggle only deprecated warnings as errors.
Definition: Moose.C:568
void setActive(bool active)
Turn on or off timing.
Definition: PerfGraph.h:108
PerfLog perf_log
Perflog to be used by applications.
PerfID _setup_options_timer
Definition: MooseApp.h:897
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:795
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
std::string _input_filename
Input file name used.
Definition: MooseApp.h:721
This class produces produces a dump of the InputFileParameters that appears like the normal input fil...
PerfGraph _perf_graph
The PerfGraph object for this applciation.
Definition: MooseApp.h:718
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:709
std::string _recover_base
The base name to recover from. If blank then we will find the newest recovery file.
Definition: MooseApp.h:810
bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition: MooseApp.h:792
ExecFlagEnum _execute_flags
Execution flags for this App.
Definition: MooseApp.h:893
void build()
Builds all auto-buildable tasks.
bool setColorConsole(bool use_color, bool force=false)
Turns color escape sequences on/off for info written to stdout.
Definition: Moose.C:560
virtual std::string header() const
Returns a string to be printed at the beginning of a simulation.
Definition: MooseApp.C:1327
Factory _factory
Definition: MooseApp.h:782
void buildJsonSyntaxTree(JsonSyntaxTree &tree) const
Use MOOSE Factories to construct a parameter tree for documentation or echoing input.
Definition: Parser.C:665
std::string _name
The name of this object.
Definition: MooseApp.h:706
const std::string & type() const
Get the type of this object as a string.
Definition: MooseApp.h:93
std::string getPrintableVersion() const
Non-virtual method for printing out the version string in a consistent format.
Definition: MooseApp.C:436
bool isUltimateMaster()
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:522
void createMinimalApp()
Method for creating the minimum required actions for an application (no input file) ...
Definition: MooseApp.C:1567
static const std::map< std::string, std::vector< RegistryEntry > > & allObjects()
Returns a per-label keyed map of all MooseObjects in the registry.
Definition: Registry.C:27
bool _ready_to_exit
Definition: MooseApp.h:786
std::string _recover_suffix
The file suffix to recover from. If blank then we will use "cpr" for binary CheckpointIO.
Definition: MooseApp.h:813
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:801
void parse(const std::string &input_filename)
Parse an input file consisting of hit syntax and setup objects in the MOOSE derived application...
Definition: Parser.C:498
void buildFullTree(const std::string &search_string)
Use MOOSE Factories to construct a full parse tree for documentation or echoing input.
Definition: Parser.C:781

◆ syntax()

Syntax& MooseApp::syntax ( )
inline

Definition at line 144 of file MooseApp.h.

Referenced by dynamicAllRegistration(), and setupOptions().

144 { return _syntax; }
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:745

◆ theWarehouse()

TheWarehouse& MooseApp::theWarehouse ( )
inline

Definition at line 64 of file MooseApp.h.

Referenced by FEProblemBase::theWarehouse().

64 { return *_the_warehouse; }
std::unique_ptr< TheWarehouse > _the_warehouse
Definition: MooseApp.h:869

◆ type()

const std::string& MooseApp::type ( ) const
inline

Get the type of this object as a string.

This is a string version of the class name (e.g. MooseTestApp).

Returns
The the type of the object

Definition at line 93 of file MooseApp.h.

Referenced by setupOptions().

93 { return _type; }
const std::string _type
The string representation of the type of this object as registered (see registerApp(AppName)) ...
Definition: MooseApp.h:712

◆ useEigenvalue()

bool& MooseApp::useEigenvalue ( )
inline

Set a Boolean indicating whether this app will use an eigenvalue executioner.

Definition at line 275 of file MooseApp.h.

Referenced by CreateProblemDefaultAction::act().

275 { return _use_eigen_value; }
bool _use_eigen_value
Boolean to indicate whether to use an eigenvalue executioner.
Definition: MooseApp.h:769

◆ useNonlinear()

bool& MooseApp::useNonlinear ( )
inline

Set a Boolean indicating whether this app will use a Nonlinear or Eigen System.

Definition at line 270 of file MooseApp.h.

Referenced by CreateProblemAction::act(), and CreateProblemDefaultAction::act().

270 { return _use_nonlinear; }
bool _use_nonlinear
Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions) ...
Definition: MooseApp.h:766

Friends And Related Function Documentation

◆ FEProblemBase

friend class FEProblemBase
friend

Definition at line 909 of file MooseApp.h.

◆ Restartable

friend class Restartable
friend

Definition at line 910 of file MooseApp.h.

◆ SubProblem

friend class SubProblem
friend

Definition at line 911 of file MooseApp.h.

Member Data Documentation

◆ _action_factory

ActionFactory MooseApp::_action_factory
protected

The Factory responsible for building Actions.

Definition at line 754 of file MooseApp.h.

Referenced by createMinimalApp(), getActionFactory(), and MooseApp().

◆ _action_warehouse

ActionWarehouse MooseApp::_action_warehouse
protected

◆ _cached_backup

std::shared_ptr<Backup> MooseApp::_cached_backup
private

Cache for a Backup to use for restart / recovery.

Definition at line 890 of file MooseApp.h.

Referenced by hasCachedBackup(), restoreCachedBackup(), and setBackupObject().

◆ _check_input

bool MooseApp::_check_input
protected

true if we want to just check the input file

Definition at line 822 of file MooseApp.h.

Referenced by checkInput(), MooseApp(), run(), and setupOptions().

◆ _comm

const std::shared_ptr<Parallel::Communicator> MooseApp::_comm
protected

The MPI communicator this App is going to use.

Definition at line 715 of file MooseApp.h.

Referenced by errorCheck(), and processor_id().

◆ _command_line

std::shared_ptr<CommandLine> MooseApp::_command_line
protected

Command line object.

Definition at line 742 of file MooseApp.h.

Referenced by commandLine(), executeExecutioner(), MooseApp(), and setupOptions().

◆ _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(), MultiApp::backup(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualTags(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppNearestNodeTransfer::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(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), PerfGraphOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), PicardSolve::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), AStableDirk4::solve(), LStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), PicardSolve::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _create_minimal_app_timer

PerfID MooseApp::_create_minimal_app_timer
private

Definition at line 906 of file MooseApp.h.

Referenced by createMinimalApp().

◆ _distributed_mesh_on_command_line

bool MooseApp::_distributed_mesh_on_command_line
protected

This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh.

Definition at line 792 of file MooseApp.h.

Referenced by getDistributedMeshOnCommandLine(), and setupOptions().

◆ _enable_unused_check

enum MooseApp::UNUSED_CHECK MooseApp::_enable_unused_check
protected

◆ _error_overridden

bool MooseApp::_error_overridden
protected

Indicates whether warnings or errors are displayed when overridden parameters are detected.

Definition at line 785 of file MooseApp.h.

Referenced by setErrorOverridden().

◆ _execute_executioner_timer

PerfID MooseApp::_execute_executioner_timer
private

Definition at line 900 of file MooseApp.h.

Referenced by executeExecutioner().

◆ _execute_flags

ExecFlagEnum MooseApp::_execute_flags
private

Execution flags for this App.

Definition at line 893 of file MooseApp.h.

Referenced by addExecFlag(), getExecuteOnEnum(), and setupOptions().

◆ _execute_mesh_generators_timer

PerfID MooseApp::_execute_mesh_generators_timer
private

Definition at line 904 of file MooseApp.h.

Referenced by executeMeshGenerators().

◆ _execute_mesh_modifiers_timer

PerfID MooseApp::_execute_mesh_modifiers_timer
private

Definition at line 903 of file MooseApp.h.

Referenced by executeMeshModifiers().

◆ _execute_timer

PerfID MooseApp::_execute_timer
private

Definition at line 899 of file MooseApp.h.

Referenced by run().

◆ _executioner

std::shared_ptr<Executioner> MooseApp::_executioner
protected

Pointer to the executioner of this run (typically build by actions)

Definition at line 763 of file MooseApp.h.

Referenced by backup(), errorCheck(), executeExecutioner(), executioner(), getExecutioner(), restore(), setExecutioner(), setOutputPosition(), and ~MooseApp().

◆ _factory

Factory MooseApp::_factory
protected

◆ _final_generated_meshes

std::list<std::unique_ptr<MeshBase> *> MooseApp::_final_generated_meshes
private

The final Mesh that is generated by the generators.

Definition at line 887 of file MooseApp.h.

Referenced by executeMeshGenerators(), and getMeshGeneratorMesh().

◆ _global_time_offset

Real MooseApp::_global_time_offset
protected

Offset of the local App time to the "global" problem time.

Definition at line 739 of file MooseApp.h.

Referenced by getGlobalTimeOffset(), and setGlobalTimeOffset().

◆ _half_transient

bool MooseApp::_half_transient
protected

Whether or not this simulation should only run half its transient (useful for testing recovery)

Definition at line 816 of file MooseApp.h.

Referenced by halfTransient(), and setupOptions().

◆ _initial_from_file

bool MooseApp::_initial_from_file
protected

This variable indicates when a request has been made to restart from an Exodus file.

Definition at line 789 of file MooseApp.h.

Referenced by setFileRestart().

◆ _input_filename

std::string MooseApp::_input_filename
protected

Input file name used.

Definition at line 721 of file MooseApp.h.

Referenced by getInputFileName(), setInputFileName(), and setupOptions().

◆ _input_parameter_warehouse

InputParameterWarehouse* MooseApp::_input_parameter_warehouse
protected

Input parameter storage structure (this is a raw pointer so the destruction time can be explicitly controlled)

Definition at line 751 of file MooseApp.h.

Referenced by getInputParameterWarehouse(), and ~MooseApp().

◆ _lib_handles

std::map<std::pair<std::string, std::string>, void *> MooseApp::_lib_handles
protected

The library, registration method and the handle to the method.

Definition at line 827 of file MooseApp.h.

Referenced by getLoadedLibraryPaths(), loadLibraryAndDependencies(), and ~MooseApp().

◆ _mesh_generator_outputs

std::map<std::string, std::list<std::unique_ptr<MeshBase> > > MooseApp::_mesh_generator_outputs
private

Holds the output for each mesh generator - including duplicates needed downstream.

Definition at line 884 of file MooseApp.h.

Referenced by executeMeshGenerators(), and getMeshGeneratorOutput().

◆ _mesh_generators

std::map<std::string, std::shared_ptr<MeshGenerator> > MooseApp::_mesh_generators
private

Holds the mesh generators until they have completed, then this structure is cleared.

Definition at line 881 of file MooseApp.h.

Referenced by addMeshGenerator(), clearMeshGenerators(), executeMeshGenerators(), getMeshGenerator(), and getMeshGeneratorNames().

◆ _mesh_modifiers

std::map<std::string, std::shared_ptr<MeshModifier> > MooseApp::_mesh_modifiers
private

Holds the mesh modifiers until they have completed, then this structure is cleared.

Definition at line 878 of file MooseApp.h.

Referenced by addMeshModifier(), clearMeshModifiers(), executeMeshModifiers(), getMeshModifier(), and getMeshModifierNames().

◆ _multiapp_level

unsigned int MooseApp::_multiapp_level
private

Level of multiapp, the master is level 0. This used by the Console to indent output.

Definition at line 872 of file MooseApp.h.

Referenced by isUltimateMaster(), and multiAppLevel().

◆ _multiapp_number

unsigned int MooseApp::_multiapp_number
private

Numbering in all the sub-apps on the same level.

Definition at line 875 of file MooseApp.h.

Referenced by multiAppNumber().

◆ _name

std::string MooseApp::_name
protected

The name of this object.

Definition at line 706 of file MooseApp.h.

Referenced by name(), and setupOptions().

◆ _output_file_base

std::string MooseApp::_output_file_base
protected

The output file basename.

Definition at line 724 of file MooseApp.h.

Referenced by getOutputFileBase(), and setOutputFileBase().

◆ _output_file_numbers

std::map<std::string, unsigned int> MooseApp::_output_file_numbers
protected

Map of outputer name and file number (used by MultiApps to propagate file numbers down through the multiapps)

Definition at line 819 of file MooseApp.h.

Referenced by getOutputFileNumbers(), and setOutputFileNumbers().

◆ _output_position

Point MooseApp::_output_position
protected

The output position.

Definition at line 730 of file MooseApp.h.

Referenced by getOutputPosition(), and setOutputPosition().

◆ _output_position_set

bool MooseApp::_output_position_set
protected

Whether or not an output position has been set for this app.

Definition at line 727 of file MooseApp.h.

Referenced by hasOutputPosition(), and setOutputPosition().

◆ _output_warehouse

OutputWarehouse MooseApp::_output_warehouse
protected

OutputWarehouse object for this App.

Definition at line 748 of file MooseApp.h.

Referenced by getOutputWarehouse(), and setOutputPosition().

◆ _pars

InputParameters MooseApp::_pars
protected

Parameters of this object.

Definition at line 709 of file MooseApp.h.

Referenced by getParam(), isParamValid(), parameters(), and setupOptions().

◆ _parser

Parser MooseApp::_parser
protected

Parser for parsing the input file.

Definition at line 760 of file MooseApp.h.

Referenced by errorCheck(), getFileName(), parser(), and setupOptions().

◆ _perf_graph

PerfGraph MooseApp::_perf_graph
protected

The PerfGraph object for this applciation.

Definition at line 718 of file MooseApp.h.

Referenced by perfGraph(), and setupOptions().

◆ _ready_to_exit

bool MooseApp::_ready_to_exit
protected

Definition at line 786 of file MooseApp.h.

Referenced by executeExecutioner(), runInputFile(), and setupOptions().

◆ _recover

bool MooseApp::_recover
protected

Whether or not this is a recovery run.

Definition at line 795 of file MooseApp.h.

Referenced by isRecovering(), setRecover(), and setupOptions().

◆ _recover_base

std::string MooseApp::_recover_base
protected

The base name to recover from. If blank then we will find the newest recovery file.

Definition at line 810 of file MooseApp.h.

Referenced by getRecoverFileBase(), hasRecoverFileBase(), setRecoverFileBase(), and setupOptions().

◆ _recover_suffix

std::string MooseApp::_recover_suffix
protected

The file suffix to recover from. If blank then we will use "cpr" for binary CheckpointIO.

Definition at line 813 of file MooseApp.h.

Referenced by getRecoverFileSuffix(), setRecoverFileSuffix(), and setupOptions().

◆ _recoverable_data

std::set<std::string> MooseApp::_recoverable_data
private

Data names that will only be read from the restart file during RECOVERY.

Definition at line 860 of file MooseApp.h.

Referenced by getRecoverableData(), and registerRecoverableData().

◆ _relationship_managers

std::vector<std::shared_ptr<RelationshipManager> > MooseApp::_relationship_managers
protected

◆ _restart

bool MooseApp::_restart
protected

Whether or not this is a restart run.

Definition at line 798 of file MooseApp.h.

Referenced by isRestarting(), and setRestart().

◆ _restartable_data

RestartableDatas MooseApp::_restartable_data
private

Where the restartable data is held (indexed on tid)

Definition at line 857 of file MooseApp.h.

Referenced by getRestartableData(), and registerRestartableData().

◆ _restore_cached_backup_timer

PerfID MooseApp::_restore_cached_backup_timer
private

Definition at line 905 of file MooseApp.h.

Referenced by restoreCachedBackup().

◆ _restore_timer

PerfID MooseApp::_restore_timer
private

Definition at line 901 of file MooseApp.h.

Referenced by restore().

◆ _run_input_file_timer

PerfID MooseApp::_run_input_file_timer
private

Definition at line 898 of file MooseApp.h.

Referenced by runInputFile().

◆ _run_timer

PerfID MooseApp::_run_timer
private

Definition at line 902 of file MooseApp.h.

Referenced by run().

◆ _setup_options_timer

PerfID MooseApp::_setup_options_timer
private

Definition at line 897 of file MooseApp.h.

Referenced by setupOptions().

◆ _setup_timer

PerfID MooseApp::_setup_timer
private

Timers.

Definition at line 896 of file MooseApp.h.

Referenced by run().

◆ _split_mesh

bool MooseApp::_split_mesh
protected

Whether or not we are performing a split mesh operation (–split-mesh)

Definition at line 801 of file MooseApp.h.

Referenced by isSplitMesh(), and setupOptions().

◆ _start_time

Real MooseApp::_start_time
protected

The time at which to start the simulation.

Definition at line 736 of file MooseApp.h.

Referenced by getStartTime(), and setStartTime().

◆ _start_time_set

bool MooseApp::_start_time_set
protected

Whether or not an start time has been set.

Definition at line 733 of file MooseApp.h.

Referenced by hasStartTime(), and setStartTime().

◆ _syntax

Syntax MooseApp::_syntax
protected

Syntax of the input file.

Definition at line 745 of file MooseApp.h.

Referenced by MooseApp(), setupOptions(), and syntax().

◆ _sys_info

std::unique_ptr<SystemInfo> MooseApp::_sys_info
protected

System Information.

Definition at line 772 of file MooseApp.h.

Referenced by getSystemInfo(), and MooseApp().

◆ _the_warehouse

std::unique_ptr<TheWarehouse> MooseApp::_the_warehouse
private

Definition at line 869 of file MooseApp.h.

Referenced by MooseApp(), theWarehouse(), and ~MooseApp().

◆ _trap_fpe

bool MooseApp::_trap_fpe
protected

Whether or not FPE trapping should be turned on.

Definition at line 807 of file MooseApp.h.

Referenced by getFPTrapFlag(), and setupOptions().

◆ _type

const std::string MooseApp::_type
protected

The string representation of the type of this object as registered (see registerApp(AppName))

Definition at line 712 of file MooseApp.h.

Referenced by MooseApp(), and type().

◆ _use_eigen_value

bool MooseApp::_use_eigen_value
protected

Boolean to indicate whether to use an eigenvalue executioner.

Definition at line 769 of file MooseApp.h.

Referenced by useEigenvalue().

◆ _use_nonlinear

bool MooseApp::_use_nonlinear
protected

Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions)

Definition at line 766 of file MooseApp.h.

Referenced by useNonlinear().

◆ _use_split

const bool MooseApp::_use_split
protected

Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)

Definition at line 804 of file MooseApp.h.

Referenced by isUseSplit().


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