Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static 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]

Classes

struct  DynamicLibraryInfo
 
struct  FixedPointConfig
 Stores configuration options relating to the fixed-point solving capability. More...
 
struct  InterfaceRegistryObjects
 
struct  InterfaceRegistryObjectsBase
 

Public Member Functions

torch::DeviceType getLibtorchDevice () const
 Get the device torch is supposed to be running on. More...
 
virtual ~MooseApp ()
 
TheWarehousetheWarehouse ()
 
virtual std::string getPrintableName () const
 Get printable name of the application. More...
 
virtual std::string appBinaryName () const
 
int exitCode () const
 Get the shell exit code for the application. More...
 
void setExitCode (const int exit_code)
 Sets the exit code that the application will exit with. More...
 
InputParametersparameters ()
 Get the parameters of the object. More...
 
const RankMaprankMap ()
 The RankMap is a useful object for determining how the processes are laid out on the physical nodes of the cluster. More...
 
PerfGraphperfGraph ()
 Get the PerfGraph for this app. More...
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object. More...
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) 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 ()
 Return a writable reference to the ActionWarehouse associated with this app. More...
 
const ActionWarehouseactionWarehouse () const
 Return a const reference to the ActionWarehouse associated with this app. More...
 
Moose::Builderbuilder ()
 Returns a writable reference to the builder. More...
 
Syntaxsyntax ()
 Returns a writable reference to the syntax object. More...
 
const std::vector< std::string > & getInputFileNames () const
 
const std::string & getLastInputFileName () const
 
void setOutputFileBase (const std::string &output_file_base)
 Override the selection of the output file base name. More...
 
std::string getOutputFileBase (bool for_non_moose_build_output=false) const
 Get the output file base name. More...
 
void setOutputPosition (const 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 (Real time)
 Set the starting time for the simulation. More...
 
bool hasStartTime () const
 
Real getStartTime () const
 
void setGlobalTimeOffset (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 primary (first) filename that was parsed Note: When stripLeadingPath is false, this function returns the same name as getInputFileName() method when the input file is not a link. 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...
 
ExecutorgetExecutor () const
 
NullExecutorgetNullExecutor () const
 
bool useExecutor () const
 
FEProblemBasefeProblem () const
 
void setExecutioner (std::shared_ptr< Executioner > &&executioner)
 Set the Executioner for this App. More...
 
void setExecutor (std::shared_ptr< Executor > &&executor)
 
void addExecutor (const std::string &type, const std::string &name, const InputParameters &params)
 
void addExecutorParams (const std::string &type, const std::string &name, const InputParameters &params)
 Adds the parameters for an Executor to the list of parameters. More...
 
Parserparser ()
 
void createExecutors ()
 After adding all of the Executor Params - this function will actually cause all of them to be built. More...
 
ExecutorgetExecutor (const std::string &name, bool fail_if_not_found=true)
 Get an Executor. More...
 
FixedPointConfigfixedPointConfig ()
 This info is stored here because we need a "globalish" place to put it in order to allow communication between a multiapp and solver-specific internals (i.e. More...
 
bool & useNonlinear ()
 Returns a writable Boolean indicating whether this app will use a Nonlinear or Eigen System. More...
 
bool & useEigenvalue ()
 Returns a writable Boolean indicating whether this app will use an eigenvalue executioner. More...
 
FactorygetFactory ()
 Retrieve a writable reference to the Factory associated with this App. More...
 
ActionFactorygetActionFactory ()
 Retrieve a writable reference to the ActionFactory associated with this App. More...
 
processor_id_type processor_id () const
 Returns the MPI processor ID of the current processor. More...
 
std::shared_ptr< CommandLinecommandLine () const
 Get the command line. More...
 
void setExodusFileRestart (bool flag)
 Set the flag to indicate whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh. More...
 
bool getExodusFileRestart () const
 Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh. More...
 
void setExReaderForRestart (std::shared_ptr< libMesh::ExodusII_IO > &&exreader)
 Set the Exodus reader to restart variables from an Exodus mesh file. More...
 
libMesh::ExodusII_IOgetExReaderForRestart () const
 Get the Exodus reader to restart variables from an Exodus mesh file. 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 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...
 
void setRestartRecoverFileBase (const std::string &file_base)
 mutator for recover_base (set by RecoverBaseAction) More...
 
bool testCheckpointHalfTransient () const
 Whether or not this simulation should only run half its transient (useful for testing recovery) More...
 
void setOutputFileNumbers (const 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...
 
const std::map< std::string, unsigned int > & getOutputFileNumbers () const
 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 OutputWarehousegetOutputWarehouse () const
 
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 paths of loaded libraries. More...
 
std::set< std::string > getLibrarySearchPaths (const std::string &library_path_from_param) const
 Return the paths searched by MOOSE when loading libraries. More...
 
InputParameterWarehousegetInputParameterWarehouse ()
 Get the InputParameterWarehouse for MooseObjects. More...
 
RestartableDataValueregisterRestartableData (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
 
RestartableDataValueregisterRestartableData (const std::string &name, std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
 
bool hasRestartableMetaData (const std::string &name, const RestartableDataMapName &metaname) const
 
RestartableDataValuegetRestartableMetaData (const std::string &name, const RestartableDataMapName &metaname, THREAD_ID tid)
 
void possiblyLoadRestartableMetaData (const RestartableDataMapName &name, const std::filesystem::path &folder_base)
 Loads the restartable meta data for name if it is available with the folder base folder_base. More...
 
void loadRestartableMetaData (const std::filesystem::path &folder_base)
 Loads all available restartable meta data if it is available with the folder base folder_base. More...
 
std::vector< std::filesystem::path > writeRestartableMetaData (const RestartableDataMapName &name, const std::filesystem::path &folder_base)
 Writes the restartable meta data for name with a folder base of folder_base. More...
 
std::vector< std::filesystem::path > writeRestartableMetaData (const std::filesystem::path &folder_base)
 Writes all available restartable meta data with a file base of file_base. More...
 
RestartableDataMapgetRestartableDataMap (const RestartableDataMapName &name)
 Return a reference to restartable data for the specific type flag. More...
 
bool hasRestartableDataMap (const RestartableDataMapName &name) const
 
void registerRestartableDataMapName (const RestartableDataMapName &name, std::string suffix="")
 Reserve a location for storing custom RestartableDataMap objects. More...
 
const std::string & getRestartableDataMapName (const RestartableDataMapName &name) const
 
const DataNamesgetRecoverableData () const
 Return a reference to the recoverable data object. More...
 
std::vector< std::filesystem::path > backup (const std::filesystem::path &folder_base)
 Backs up the application to the folder folder_base. More...
 
std::unique_ptr< Backupbackup ()
 Backs up the application memory in a Backup. More...
 
virtual void preBackup ()
 Insertion point for other apps that is called before backup() More...
 
void restore (const std::filesystem::path &folder_base, const bool for_restart)
 Restore an application from file. More...
 
void restore (std::unique_ptr< Backup > backup, const bool for_restart)
 Restore an application from the backup backup. More...
 
virtual void postRestore (const bool)
 Insertion point for other apps that is called after restore() More...
 
void restoreFromInitialBackup (const bool for_restart)
 Restores from a "initial" backup, that is, one set in _initial_backup. More...
 
std::unique_ptr< BackupfinalizeRestore ()
 Finalizes (closes) the restoration process done in restore(). 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 () const
 Whether or not this app is the ultimate master app. More...
 
const MooseMeshmasterMesh () const
 Returns a pointer to the master mesh. More...
 
const MooseMeshmasterDisplacedMesh () const
 Returns a pointer to the master displaced mesh. More...
 
MeshGeneratorSystemgetMeshGeneratorSystem ()
 Gets the system that manages the MeshGenerators. More...
 
ChainControlDataSystemgetChainControlDataSystem ()
 Gets the system that manages the ChainControls. More...
 
void addMeshGenerator (const std::string &type, const std::string &name, const InputParameters &params)
 Add a mesh generator that will act on the meshes in the system. More...
 
bool hasMeshGenerator (const MeshGeneratorName &name) const
 
const MeshGeneratorgetMeshGenerator (const std::string &name) const
 
std::unique_ptr< MeshBase > getMeshGeneratorMesh ()
 
std::vector< std::string > getMeshGeneratorNames () const
 
const MeshGeneratorappendMeshGenerator (const std::string &type, const std::string &name, InputParameters params)
 Append a mesh generator that will act on the final mesh generator in the system. More...
 
virtual bool constructingMeshGenerators () const
 Whether this app is constructing mesh generators. 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...
 
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...
 
std::filesystem::path restartFolderBase (const std::filesystem::path &folder_base) const
 The file suffix for restartable data. More...
 
const hit::Node * getCurrentActionHitNode () const
 
void attachRelationshipManagers (Moose::RelationshipManagerType rm_type, bool attach_geometric_rm_final=false)
 Attach the relationship managers of the given type Note: Geometric relationship managers that are supposed to be attached late will be attached when Algebraic are attached. More...
 
void attachRelationshipManagers (MeshBase &mesh, MooseMesh &moose_mesh)
 Attach geometric relationship managers to the given MeshBase object. More...
 
const std::vector< std::shared_ptr< RelationshipManager > > & getReleationshipManagers ()
 Retrieve the relationship managers. More...
 
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...
 
bool hasInitialBackup () const
 
bool defaultAutomaticScaling () const
 Whether to enable automatic scaling by default. More...
 
const std::shared_ptr< libMesh::Parallel::CommunicatorgetCommunicator () const
 
const std::set< std::shared_ptr< RelationshipManager > > & relationshipManagers () const
 Return the container of relationship managers. More...
 
void checkMetaDataIntegrity () const
 Function to check the integrity of the restartable meta data structure. More...
 
virtual bool errorOnJacobianNonzeroReallocation () const
 Whether this application should by default error on Jacobian nonzero reallocations. More...
 
template<class T >
void registerInterfaceObject (T &interface)
 Registers an interface object for accessing with getInterfaceObjects. More...
 
template<class T >
const std::vector< T * > & getInterfaceObjects () const
 Gets the registered interface objects for a given interface. More...
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with. More...
 
const std::string & type () const
 Get the type of this class. More...
 
virtual const std::string & name () const
 Get the name of the class. More...
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling. More...
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 Calls moose error with the message msg. More...
 
SolutionInvaliditysolutionInvalidity ()
 Get the SolutionInvalidity for this app. More...
 
const SolutionInvaliditysolutionInvalidity () const
 
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
 
bool hasRestartRecoverFileBase () const
 Return true if the recovery file base is set. More...
 
bool hasRecoverFileBase () const
 
std::string getRestartRecoverFileBase () const
 The file_base for the recovery file. More...
 
std::string getRecoverFileBase () 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, bool lib_load_deps)
 
const std::vector< RestartableDataMap > & getRestartableData () const
 Return reference to the restartable data object. More...
 
std::vector< RestartableDataMap > & getRestartableData ()
 
void setRestart (bool value)
 Sets the restart/recover flags. More...
 
void setRecover (bool value)
 
auto getRestartableDataMapBegin ()
 Iterator based access to the extra RestartableDataMap objects; see Checkpoint.C for use case. More...
 
auto getRestartableDataMapEnd ()
 

Static Public Member Functions

static InputParameters validParams ()
 
static const std::string & checkpointSuffix ()
 The file suffix for the checkpoint mesh. More...
 
static std::filesystem::path metaDataFolderBase (const std::filesystem::path &folder_base, const std::string &map_suffix)
 The file suffix for meta data (header and data) More...
 
static void addAppParam (InputParameters &params)
 
static void addInputParam (InputParameters &params)
 

Public Attributes

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

Static Public Attributes

static const RestartableDataMapName MESH_META_DATA = "MeshMetaData"
 
static const std::string MESH_META_DATA_SUFFIX = "mesh"
 

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

void dynamicRegistration (const libMesh::Parameters &params)
 Helper method for dynamic loading of objects. More...
 
void loadLibraryAndDependencies (const std::string &library_filename, const libMesh::Parameters &params, bool load_dependencies=true)
 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 registerRestartableNameWithFilter (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 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...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 Call to register a named section for timing. More...
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

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< libMesh::Parallel::Communicator_comm
 The MPI communicator this App is going to use. More...
 
std::string _output_file_base
 The output file basename. More...
 
bool _file_base_set_by_user
 Whether or not file base is set through input or setOutputFileBase by MultiApp. 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...
 
std::unique_ptr< InputParameterWarehouse_input_parameter_warehouse
 Input parameter storage structure; unique_ptr so we can control its destruction order. More...
 
ActionFactory _action_factory
 The Factory responsible for building Actions. More...
 
ActionWarehouse _action_warehouse
 Where built actions are stored. More...
 
OutputWarehouse _output_warehouse
 OutputWarehouse object for this App. More...
 
const std::shared_ptr< Parser_parser
 Parser for parsing the input file. More...
 
Moose::Builder _builder
 Builder for building app related parser tree. More...
 
std::vector< RestartableDataMap_restartable_data
 Where the restartable data is held (indexed on tid) More...
 
DataNames _recoverable_data_names
 Data names that will only be read from the restart file during RECOVERY. More...
 
PerfGraph_perf_graph
 The PerfGraph object for this application (recoverable) More...
 
SolutionInvalidity_solution_invalidity
 The SolutionInvalidity object for this application. More...
 
const RankMap _rank_map
 The RankMap is a useful object for determining how the processes are laid out on the physical hardware. More...
 
std::shared_ptr< Executioner_executioner
 Pointer to the executioner of this run (typically build by actions) More...
 
std::shared_ptr< Executor_executor
 Pointer to the Executor of this run. More...
 
std::map< std::string, std::shared_ptr< Executor > > _executors
 Pointers to all of the Executors for this run. More...
 
std::unordered_map< std::string, std::pair< std::string, std::unique_ptr< InputParameters > > > _executor_params
 Used in building the Executors Maps the name of the Executor block to the <type, params> More...
 
FixedPointConfig _fixed_point_config
 Multiapp-related fixed point algorithm configuration details primarily intended to be passed to and used by the executioner/executor system. More...
 
const bool _use_executor
 Indicates whether we are operating in the new/experimental executor mode instead of using the legacy executioner system. More...
 
std::shared_ptr< NullExecutor_null_executor
 Used to return an executor that does nothing. 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...
 
std::string _early_exit_param
 Indicates if simulation is ready to exit, and keeps track of which param caused it to exit. More...
 
bool _ready_to_exit
 
int _exit_code
 The exit code. More...
 
bool _initial_from_file
 This variable indicates when a request has been made to restart from an Exodus file. More...
 
std::shared_ptr< libMesh::ExodusII_IO_ex_reader
 The Exodus reader when _initial_from_file is set to true. 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 _restart_recover_base
 The base name to restart/recover from. If blank then we will find the newest checkpoint file. More...
 
bool _test_checkpoint_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::set< std::shared_ptr< RelationshipManager > > _relationship_managers
 The relationship managers that have been added. More...
 
std::map< Moose::RelationshipManagerType, std::set< const RelationshipManager * > > _attached_relationship_managers
 The relationship managers that have been attached (type -> RMs) More...
 
std::unordered_map< RelationshipManager *, std::shared_ptr< libMesh::GhostingFunctor > > _undisp_to_disp_rms
 A map from undisplaced relationship managers to their displaced clone (stored as the base GhostingFunctor). More...
 
std::unordered_map< std::string, DynamicLibraryInfo_lib_handles
 The library archive (name only), registration method and the handle to the method. More...
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph. More...
 
const std::string _prefix
 A prefix to use for all sections. More...
 
const Parallel::Communicator_communicator
 
MooseApp_app
 The MOOSE application this is associated with. More...
 
const std::string _name
 The name of this class. More...
 

Private Types

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

Private Member Functions

void recursivelyCreateExecutors (const std::string &current_executor_name, std::list< std::string > &possible_roots, std::list< std::string > &current_branch)
 Internal function used to recursively create the executor objects. More...
 
void removeRelationshipManager (std::shared_ptr< RelationshipManager > relationship_manager)
 Purge this relationship manager from meshes and DofMaps and finally from us. More...
 
torch::DeviceType determineLibtorchDeviceType (const MooseEnum &device) const
 Function to determine the device which should be used by libtorch on this application. More...
 
void createMinimalApp ()
 Method for creating the minimum required actions for an application (no input file) 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...
 
bool hasRMClone (const RelationshipManager &template_rm, const MeshBase &mesh) const
 
RelationshipManagergetRMClone (const RelationshipManager &template_rm, const MeshBase &mesh) const
 Return the relationship manager clone originally created from the provided template relationship manager and mesh. More...
 
RelationshipManagercreateRMFromTemplateAndInit (const RelationshipManager &template_rm, MooseMesh &moose_mesh, MeshBase &mesh, const libMesh::DofMap *dof_map=nullptr)
 Take an input relationship manager, clone it, and then initialize it with provided mesh and optional dof_map. More...
 
PerfGraphcreateRecoverablePerfGraph ()
 Creates a recoverable PerfGraph. More...
 
SolutionInvaliditycreateRecoverableSolutionInvalidity ()
 Creates a recoverable SolutionInvalidity. More...
 
bool showInputs () const
 Prints a message showing the installable inputs for a given application (if getInstallableInputs has been overridden for an application). More...
 
virtual std::string getInstallableInputs () const
 Method to retrieve the installable inputs from a given applications <app>Revision.h file. More...
 
bool copyInputs ()
 Handles the copy_inputs input parameter logic: Checks to see whether the passed argument is valid (a readable installed directory) and recursively copies those files into a read/writable location for the user. More...
 
bool runInputs ()
 Handles the run input parameter logic: Checks to see whether a directory exists in user space and launches the TestHarness to process the given directory. More...
 

Private Attributes

std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
 General storage for custom RestartableData that can be added to from outside applications. More...
 
std::unique_ptr< TheWarehouse_the_warehouse
 The combined warehouse for storing any MooseObject based object. More...
 
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...
 
const MooseMesh *const _master_mesh
 The mesh from master app. More...
 
const MooseMesh *const _master_displaced_mesh
 The displaced mesh from master app. More...
 
MeshGeneratorSystem _mesh_generator_system
 The system that manages the MeshGenerators. More...
 
ChainControlDataSystem _chain_control_system
 The system that manages the ChainControls. More...
 
RestartableDataReader _rd_reader
 
const ExecFlagEnum _execute_flags
 Execution flags for this App. More...
 
std::streambuf * _output_buffer_cache
 Cache output buffer so the language server can turn it off then back on. More...
 
const bool _automatic_automatic_scaling
 Whether to turn on automatic scaling by default. More...
 
bool _cpu_profiling = false
 CPU profiling. More...
 
bool _heap_profiling = false
 Memory profiling. More...
 
std::map< const RelationshipManager *, std::map< const MeshBase *, std::unique_ptr< RelationshipManager > > > _template_to_clones
 Map from a template relationship manager to a map in which the key-value pairs represent the MeshBase object and the clone of the template relationship manager, e.g. More...
 
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
 Registration for interface objects. More...
 
std::unique_ptr< Backup > *const _initial_backup
 The backup for use in initial setup; this will get set from the _initial_backup input parameter that typically gets set from a MultiApp that has a backup This is a pointer to a pointer because at the time of construction of the app, the backup will not be filled yet. More...
 
const torch::DeviceType _libtorch_device
 The libtorch device this app is using. More...
 

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 82 of file MooseApp.h.

Member Enumeration Documentation

◆ RegistrationType

Enumeration for holding the valid types of dynamic registrations allowed.

Enumerator
APPLICATION 
REGALL 

Definition at line 1445 of file MooseApp.h.

1446  {
1447  APPLICATION,
1448  REGALL
1449  };

◆ 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 1243 of file MooseApp.h.

1244  {
1245  OFF,
1246  WARN_UNUSED,
1247  ERROR_UNUSED
enum MooseApp::UNUSED_CHECK _enable_unused_check

Constructor & Destructor Documentation

◆ ~MooseApp()

virtual MooseApp::~MooseApp ( )
virtual

◆ MooseApp()

MooseApp::MooseApp ( InputParameters  parameters)
protected

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

Definition at line 404 of file MooseApp.C.

405  : ConsoleStreamInterface(*this),
406  PerfGraphInterface(*this, "MooseApp"),
407  ParallelObject(*parameters.get<std::shared_ptr<Parallel::Communicator>>(
408  "_comm")), // Can't call getParam() before pars is set
409  MooseBase(parameters.get<std::string>("_type"),
410  parameters.get<std::string>("_app_name"),
411  *this,
412  _pars),
413  _pars(parameters),
414  _comm(getParam<std::shared_ptr<Parallel::Communicator>>("_comm")),
415  _file_base_set_by_user(false),
416  _output_position_set(false),
417  _start_time_set(false),
418  _start_time(0.0),
419  _global_time_offset(0.0),
420  _input_parameter_warehouse(std::make_unique<InputParameterWarehouse>()),
421  _action_factory(*this),
423  _output_warehouse(*this),
424  _parser(parameters.get<std::shared_ptr<Parser>>("_parser")),
430  _use_executor(parameters.get<bool>("use_executor")),
431  _null_executor(NULL),
432  _use_nonlinear(true),
433  _use_eigen_value(false),
435  _factory(*this),
436  _error_overridden(false),
437  _early_exit_param(""),
438  _ready_to_exit(false),
439  _exit_code(0),
440  _initial_from_file(false),
442  _recover(false),
443  _restart(false),
444  _split_mesh(false),
445  _use_split(parameters.get<bool>("use_split")),
446 #ifdef DEBUG
447  _trap_fpe(true),
448 #else
449  _trap_fpe(false),
450 #endif
452  _check_input(getParam<bool>("check_input")),
454  isParamValid("_multiapp_level") ? parameters.get<unsigned int>("_multiapp_level") : 0),
456  isParamValid("_multiapp_number") ? parameters.get<unsigned int>("_multiapp_number") : 0),
457  _master_mesh(isParamValid("_master_mesh") ? parameters.get<const MooseMesh *>("_master_mesh")
458  : nullptr),
459  _master_displaced_mesh(isParamValid("_master_displaced_mesh")
460  ? parameters.get<const MooseMesh *>("_master_displaced_mesh")
461  : nullptr),
462  _mesh_generator_system(*this),
463  _chain_control_system(*this),
466  _output_buffer_cache(nullptr),
467  _automatic_automatic_scaling(getParam<bool>("automatic_automatic_scaling")),
468  _initial_backup(getParam<std::unique_ptr<Backup> *>("_initial_backup"))
469 #ifdef LIBTORCH_ENABLED
470  ,
471  _libtorch_device(determineLibtorchDeviceType(getParam<MooseEnum>("libtorch_device")))
472 #endif
473 {
474  // Set the TIMPI sync type via --timpi-sync
475  const auto & timpi_sync = parameters.get<std::string>("timpi_sync");
476  const_cast<Parallel::Communicator &>(comm()).sync_type(timpi_sync);
477 
478 #ifdef HAVE_GPERFTOOLS
479  if (isUltimateMaster())
480  {
481  bool has_cpu_profiling = false;
482  bool has_heap_profiling = false;
483  static std::string cpu_profile_file;
484  static std::string heap_profile_file;
485 
486  // For CPU profiling, users need to have environment 'MOOSE_PROFILE_BASE'
487  if (std::getenv("MOOSE_PROFILE_BASE"))
488  {
489  has_cpu_profiling = true;
490  cpu_profile_file =
491  std::getenv("MOOSE_PROFILE_BASE") + std::to_string(_comm->rank()) + ".prof";
492  // create directory if needed
493  auto name = MooseUtils::splitFileName(cpu_profile_file);
494  if (!name.first.empty())
495  {
496  if (processor_id() == 0)
497  MooseUtils::makedirs(name.first.c_str());
498  _comm->barrier();
499  }
500  }
501 
502  // For Heap profiling, users need to have 'MOOSE_HEAP_BASE'
503  if (std::getenv("MOOSE_HEAP_BASE"))
504  {
505  has_heap_profiling = true;
506  heap_profile_file = std::getenv("MOOSE_HEAP_BASE") + std::to_string(_comm->rank());
507  // create directory if needed
508  auto name = MooseUtils::splitFileName(heap_profile_file);
509  if (!name.first.empty())
510  {
511  if (processor_id() == 0)
512  MooseUtils::makedirs(name.first.c_str());
513  _comm->barrier();
514  }
515  }
516 
517  // turn on profiling only on selected ranks
518  if (isParamSetByUser("gperf_profiler_on"))
519  {
520  auto rankstr = getParam<std::string>("gperf_profiler_on");
521  std::vector<processor_id_type> ranks;
522  bool success = MooseUtils::tokenizeAndConvert(rankstr, ranks, ", ");
523  if (!success)
524  mooseError("Invalid argument for --gperf-profiler-on: '", rankstr, "'");
525  for (auto & rank : ranks)
526  {
527  if (rank >= _comm->size())
528  mooseError("Invalid argument for --gperf-profiler-on: ",
529  rank,
530  " is greater than or equal to ",
531  _comm->size());
532  if (rank == _comm->rank())
533  {
534  _cpu_profiling = has_cpu_profiling;
535  _heap_profiling = has_heap_profiling;
536  }
537  }
538  }
539  else
540  {
541  _cpu_profiling = has_cpu_profiling;
542  _heap_profiling = has_heap_profiling;
543  }
544 
545  if (_cpu_profiling)
546  if (!ProfilerStart(cpu_profile_file.c_str()))
547  mooseError("CPU profiler is not started properly");
548 
549  if (_heap_profiling)
550  {
551  HeapProfilerStart(heap_profile_file.c_str());
552  if (!IsHeapProfilerRunning())
553  mooseError("Heap profiler is not started properly");
554  }
555  }
556 #else
557  if (std::getenv("MOOSE_PROFILE_BASE") || std::getenv("MOOSE_HEAP_BASE"))
558  mooseError("gperftool is not available for CPU or heap profiling");
559 #endif
560 
561  // If this will be a language server then turn off output until that starts
562  if (isParamValid("language_server") && getParam<bool>("language_server"))
563  _output_buffer_cache = Moose::out.rdbuf(nullptr);
564 
567 
568  _the_warehouse = std::make_unique<TheWarehouse>();
569  _the_warehouse->registerAttribute<AttribMatrixTags>("matrix_tags", 0);
570  _the_warehouse->registerAttribute<AttribVectorTags>("vector_tags", 0);
571  _the_warehouse->registerAttribute<AttribExecOns>("exec_ons", 0);
572  _the_warehouse->registerAttribute<AttribSubdomains>("subdomains", 0);
573  _the_warehouse->registerAttribute<AttribBoundaries>("boundaries", 0);
574  _the_warehouse->registerAttribute<AttribThread>("thread", 0);
575  _the_warehouse->registerAttribute<AttribExecutionOrderGroup>("execution_order_group", 0);
576  _the_warehouse->registerAttribute<AttribPreIC>("pre_ic", 0);
577  _the_warehouse->registerAttribute<AttribPreAux>("pre_aux");
578  _the_warehouse->registerAttribute<AttribPostAux>("post_aux");
579  _the_warehouse->registerAttribute<AttribName>("name", "dummy");
580  _the_warehouse->registerAttribute<AttribSystem>("system", "dummy");
581  _the_warehouse->registerAttribute<AttribVar>("variable", -1);
582  _the_warehouse->registerAttribute<AttribInterfaces>("interfaces", 0);
583  _the_warehouse->registerAttribute<AttribSysNum>("sys_num", libMesh::invalid_uint);
584  _the_warehouse->registerAttribute<AttribResidualObject>("residual_object");
585  _the_warehouse->registerAttribute<AttribSorted>("sorted");
586  _the_warehouse->registerAttribute<AttribDisplaced>("displaced", -1);
587 
589 
590  if (isParamValid("_argc") && isParamValid("_argv"))
591  {
592  int argc = getParam<int>("_argc");
593  char ** argv = getParam<char **>("_argv");
594 
595  _sys_info = std::make_unique<SystemInfo>(argc, argv);
596  }
597  if (isParamValid("_command_line"))
598  _command_line = getParam<std::shared_ptr<CommandLine>>("_command_line");
599  else
600  mooseError("Valid CommandLine object required");
601 
602  if (_check_input && isParamSetByUser("recover"))
603  mooseError("Cannot run --check-input with --recover. Recover files might not exist");
604 
605  if (isParamSetByUser("start_in_debugger") && isUltimateMaster())
606  {
607  auto command = getParam<std::string>("start_in_debugger");
608 
609  Moose::out << "Starting in debugger using: " << command << std::endl;
610 
612 
613  std::stringstream command_stream;
614 
615  // This will start XTerm and print out some info first... then run the debugger
616  command_stream << "xterm -e \"echo 'Rank: " << processor_id() << " Hostname: " << hostname
617  << " PID: " << getpid() << "'; echo ''; ";
618 
619  // Figure out how to run the debugger
620  if (command.find("lldb") != std::string::npos || command.find("gdb") != std::string::npos)
621  command_stream << command << " -p " << getpid();
622  else
623  mooseError("Unknown debugger: ",
624  command,
625  "\nIf this is truly what you meant then contact moose-users to have a discussion "
626  "about adding your debugger.");
627 
628  // Finish up the command
629  command_stream << "\""
630  << " & ";
631 
632  std::string command_string = command_stream.str();
633  Moose::out << "Running: " << command_string << std::endl;
634 
635  int ret = std::system(command_string.c_str());
636  libmesh_ignore(ret);
637 
638  // Sleep to allow time for the debugger to attach
639  std::this_thread::sleep_for(std::chrono::seconds(10));
640  }
641 
642  if (isParamSetByUser("stop_for_debugger") && isUltimateMaster())
643  {
644  Moose::out << "\nStopping for " << getParam<unsigned int>("stop_for_debugger")
645  << " seconds to allow attachment from a debugger.\n";
646 
647  Moose::out << "\nAll of the processes you can connect to:\n";
648  Moose::out << "rank - hostname - pid\n";
649 
651 
652  {
653  // The 'false' turns off the serialization warning
654  SerializerGuard sg(_communicator, false); // Guarantees that the processors print in order
655  Moose::err << processor_id() << " - " << hostname << " - " << getpid() << "\n";
656  }
657 
658  Moose::out << "\nWaiting...\n" << std::endl;
659 
660  // Sleep to allow time for the debugger to attach
661  std::this_thread::sleep_for(std::chrono::seconds(getParam<unsigned int>("stop_for_debugger")));
662  }
663 
664  if (_master_mesh && _multiapp_level == 0)
665  mooseError("Mesh can be passed in only for sub-apps");
666 
668  mooseError("_master_mesh should have been set when _master_displaced_mesh is set");
669 
670  // Data specifically associated with the mesh (meta-data) that will read from the restart
671  // file early during the simulation setup so that they are available to Actions and other objects
672  // that need them during the setup process. Most of the restartable data isn't made available
673  // until all objects have been created and all Actions have been executed (i.e. initialSetup).
675 
676  if (parameters.have_parameter<bool>("use_legacy_dirichlet_bc"))
677  mooseDeprecated("The parameter 'use_legacy_dirichlet_bc' is no longer valid.\n\n",
678  "All Dirichlet boundary conditions are preset by default.\n\n",
679  "Remove said parameter in ",
680  name(),
681  " to remove this deprecation warning.");
682 
683  Moose::out << std::flush;
684 }
685 
687 {
688 #ifdef HAVE_GPERFTOOLS
689  // CPU profiling stop
690  if (_cpu_profiling)
691  ProfilerStop();
692  // Heap profiling stop
693  if (_heap_profiling)
694  HeapProfilerStop();
695 #endif
697  _executioner.reset();
698  _the_warehouse.reset();
699 
700  // Don't wait for implicit destruction of input parameter storage
702 
703  // This is dirty, but I don't know what else to do. Obviously, others
704  // have had similar problems if you look above. In specific, the
705  // dlclose below on macs is destructing some data that does not
706  // belong to it in garbage collection. So... don't even give
707  // dlclose an option
708  _restartable_data.clear();
709 
710 #ifdef LIBMESH_HAVE_DLOPEN
711  // Close any open dynamic libraries
712  for (const auto & lib_pair : _lib_handles)
713  dlclose(lib_pair.second.library_handle);
714 #endif
715 }
ParallelObject(const Parallel::Communicator &comm_in)
bool _use_eigen_value
Boolean to indicate whether to use an eigenvalue executioner.
Definition: MooseApp.h:1237
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition: MooseApp.h:1455
PerfGraph & _perf_graph
The PerfGraph object for this application (recoverable)
Definition: MooseApp.h:1200
const std::string _type
The string representation of the type of this object as registered (see registerApp(AppName)) ...
Definition: MooseApp.h:1139
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Definition: MooseApp.h:1261
unsigned int n_threads()
PerfGraph & createRecoverablePerfGraph()
Creates a recoverable PerfGraph.
Definition: MooseApp.C:2899
const unsigned int invalid_uint
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
Definition: MooseApp.h:1185
Real _global_time_offset
Offset of the local App time to the "global" problem time.
Definition: MooseApp.h:1163
torch::DeviceType determineLibtorchDeviceType(const MooseEnum &device) const
Function to determine the device which should be used by libtorch on this application.
Definition: MooseApp.C:2938
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition: MooseApp.h:1148
bool _output_position_set
Whether or not an output position has been set for this app.
Definition: MooseApp.h:1151
std::unique_ptr< TheWarehouse > _the_warehouse
The combined warehouse for storing any MooseObject based object.
Definition: MooseApp.h:1452
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
InputParameters & parameters()
Get the parameters of the object.
Definition: MooseApp.h:147
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
bool tokenizeAndConvert(const std::string &str, std::vector< T > &tokenized_vector, const std::string &delimiter=" \\\)
tokenizeAndConvert splits a string using delimiter and then converts to type T.
Definition: MooseUtils.h:839
bool _use_nonlinear
Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions) ...
Definition: MooseApp.h:1234
static const RestartableDataMapName MESH_META_DATA
Definition: MooseApp.h:109
Real _start_time
The time at which to start the simulation.
Definition: MooseApp.h:1160
This attribute describes sorting state.
Definition: TheWarehouse.h:112
const bool _use_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseApp.h:1279
std::pair< std::filesystem::path, std::filesystem::path > splitFileName(const T &full_file)
Function for splitting path and filename.
Definition: MooseUtils.h:256
virtual ~MooseApp()
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:1294
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:313
const Parallel::Communicator & comm() const
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:191
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:1169
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition: MooseApp.h:1282
const Parallel::Communicator & _communicator
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Definition: MooseApp.h:434
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
RestartableDataReader _rd_reader
Definition: MooseApp.h:1472
static ExecFlagRegistry & getExecFlagRegistry()
Return Singleton instance.
std::unique_ptr< SystemInfo > _sys_info
System Information.
Definition: MooseApp.h:1240
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
SolutionInvalidity & _solution_invalidity
The SolutionInvalidity object for this application.
Definition: MooseApp.h:1203
std::string hostname()
Get the hostname the current process is running on.
Definition: MooseUtils.C:630
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1191
const RankMap _rank_map
The RankMap is a useful object for determining how the processes are laid out on the physical hardwar...
Definition: MooseApp.h:1206
int _exit_code
The exit code.
Definition: MooseApp.h:1258
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:294
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
bool _start_time_set
Whether or not an start time has been set.
Definition: MooseApp.h:1157
void libmesh_ignore(const Args &...)
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
Definition: MooseApp.h:1231
Tracks the libmesh system number that a MooseObject is associated with.
Definition: Attributes.h:275
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:1166
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:1273
AttribBoundaries tracks all boundary IDs associated with an object.
Definition: Attributes.h:188
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition: MooseApp.h:1176
ConsoleStreamInterface(MooseApp &app)
A class for providing a helper stream object for writting message to all the Output objects...
enum MooseApp::UNUSED_CHECK _enable_unused_check
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:1270
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected...
Definition: MooseApp.h:1253
SolutionInvalidity & createRecoverableSolutionInvalidity()
Creates a recoverable SolutionInvalidity.
Definition: MooseApp.C:2917
bool _heap_profiling
Memory profiling.
Definition: MooseApp.h:1493
const MooseMesh *const _master_displaced_mesh
The displaced mesh from master app.
Definition: MooseApp.h:1464
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition: Attributes.h:344
std::unordered_map< std::string, DynamicLibraryInfo > _lib_handles
The library archive (name only), registration method and the handle to the method.
Definition: MooseApp.h:1318
MooseBase(const std::string &type, const std::string &name, MooseApp &app, const InputParameters &params)
Definition: MooseBase.C:18
Residual objects have this attribute.
Definition: Attributes.h:411
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
const ExecFlagEnum _execute_flags
Execution flags for this App.
Definition: MooseApp.h:1481
void registerRestartableDataMapName(const RestartableDataMapName &name, std::string suffix="")
Reserve a location for storing custom RestartableDataMap objects.
Definition: MooseApp.C:2880
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:1523
ChainControlDataSystem _chain_control_system
The system that manages the ChainControls.
Definition: MooseApp.h:1470
bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition: MooseApp.h:1267
Moose::Builder _builder
Builder for building app related parser tree.
Definition: MooseApp.h:1188
const torch::DeviceType _libtorch_device
The libtorch device this app is using.
Definition: MooseApp.h:1512
bool _test_checkpoint_half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:1288
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:1182
std::streambuf * _output_buffer_cache
Cache output buffer so the language server can turn it off then back on.
Definition: MooseApp.h:1484
bool _cpu_profiling
CPU profiling.
Definition: MooseApp.h:1490
void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Register objects that are in MOOSE.
Definition: Moose.C:57
static const std::string MESH_META_DATA_SUFFIX
Definition: MooseApp.h:110
const bool _automatic_automatic_scaling
Whether to turn on automatic scaling by default.
Definition: MooseApp.h:1487
Factory _factory
Definition: MooseApp.h:1250
std::unique_ptr< InputParameterWarehouse > _input_parameter_warehouse
Input parameter storage structure; unique_ptr so we can control its destruction order.
Definition: MooseApp.h:1173
Tracks whether the object is on the displaced mesh.
Definition: Attributes.h:481
void makedirs(const std::string &dir_name, bool throw_on_failure=false)
Recursively make directories.
Definition: MooseUtils.C:455
PerfGraphInterface(const MooseObject *moose_object)
For objects that are MooseObjects with a default prefix of type()
unsigned int _multiapp_number
Numbering in all the sub-apps on the same level.
Definition: MooseApp.h:1458
const std::shared_ptr< libMesh::Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:1142
bool _ready_to_exit
Definition: MooseApp.h:1256
const MooseMesh *const _master_mesh
The mesh from master app.
Definition: MooseApp.h:1461
void clear()
This method deletes all of the Actions in the warehouse.
A scope guard that guarantees that whatever happens between when it gets created and when it is destr...
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:1276
const bool _use_executor
Indicates whether we are operating in the new/experimental executor mode instead of using the legacy ...
Definition: MooseApp.h:1228
void enableLivePrint()
Enables Live Print.
Definition: PerfGraph.C:57
static char addKnownLabel(const std::string &label)
addKnownLabel whitelists a label as valid for purposes of the checkLabels function.
Definition: Registry.C:84
std::string _early_exit_param
Indicates if simulation is ready to exit, and keeps track of which param caused it to exit...
Definition: MooseApp.h:1255
std::unique_ptr< Backup > *const _initial_backup
The backup for use in initial setup; this will get set from the _initial_backup input parameter that ...
Definition: MooseApp.h:1508
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193

Member Function Documentation

◆ actionWarehouse() [1/2]

ActionWarehouse& MooseApp::actionWarehouse ( )
inline

◆ actionWarehouse() [2/2]

const ActionWarehouse& MooseApp::actionWarehouse ( ) const
inline

Return a const reference to the ActionWarehouse associated with this app.

Definition at line 227 of file MooseApp.h.

227 { return _action_warehouse; }
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179

◆ addAppParam()

void MooseApp::addAppParam ( InputParameters params)
static

Definition at line 90 of file MooseApp.C.

Referenced by AppFactory::createAppShared(), Moose::createMooseApp(), and validParams().

91 {
92  params.addCommandLineParam<std::string>(
93  "app_to_run", "--app <type>", "Specify the application type to run (case-sensitive)");
94 }
void addCommandLineParam(const std::string &name, const std::string &syntax, const std::string &doc_string)

◆ addExecutor()

void MooseApp::addExecutor ( const std::string &  type,
const std::string &  name,
const InputParameters params 
)

Definition at line 1402 of file MooseApp.C.

Referenced by recursivelyCreateExecutors().

1405 {
1406  std::shared_ptr<Executor> executor = _factory.create<Executor>(type, name, params);
1407 
1408  if (_executors.count(executor->name()) > 0)
1409  mooseError("an executor with name '", executor->name(), "' already exists");
1410  _executors[executor->name()] = executor;
1411 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
Definition: MooseApp.h:1215
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
virtual std::unique_ptr< Base > create()=0
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Factory _factory
Definition: MooseApp.h:1250
The Executor class directs the execution flow of simulations.
Definition: Executor.h:26

◆ addExecutorParams()

void MooseApp::addExecutorParams ( const std::string &  type,
const std::string &  name,
const InputParameters params 
)

Adds the parameters for an Executor to the list of parameters.

This is done so that the Executors can be created in exactly the correct order.

Definition at line 1414 of file MooseApp.C.

Referenced by ReadExecutorParamsAction::act().

1417 {
1418  _executor_params[name] = std::make_pair(type, std::make_unique<InputParameters>(params));
1419 }
std::unordered_map< std::string, std::pair< std::string, std::unique_ptr< InputParameters > > > _executor_params
Used in building the Executors Maps the name of the Executor block to the <type, params> ...
Definition: MooseApp.h:1220
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ addInputParam()

void MooseApp::addInputParam ( InputParameters params)
static

Definition at line 97 of file MooseApp.C.

Referenced by AppFactory::createAppShared(), Moose::createMooseApp(), and validParams().

98 {
99  params.addCommandLineParam<std::vector<std::string>>(
100  "input_file", "-i <input file(s)>", "Specify input file(s); multiple files are merged");
101 }
void addCommandLineParam(const std::string &name, const std::string &syntax, const std::string &doc_string)

◆ addMeshGenerator()

void MooseApp::addMeshGenerator ( const std::string &  type,
const std::string &  name,
const InputParameters params 
)
inline

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

Parameters
typeThe type of MeshGenerator
nameThe name of the MeshGenerator
paramsThe params used to construct the MeshGenerator

See MeshGeneratorSystem::addMeshGenerator()

Definition at line 868 of file MooseApp.h.

Referenced by AddMeshGeneratorAction::act(), and MeshGenerator::addMeshSubgenerator().

871  {
873  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
void addMeshGenerator(const std::string &type, const std::string &name, const InputParameters &params)
Add a mesh generator that will act on the meshes in the system.
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ 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 2430 of file MooseApp.C.

Referenced by AdaptivityAction::act(), SetAdaptivityOptionsAction::act(), AddPeriodicBCAction::act(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FVFluxKernel::adjustRMGhostLayers(), and FunctorSmootherTempl< T >::FunctorSmootherTempl().

2431 {
2432  // We prefer to always add geometric RMs. There is no hurt to add RMs for replicated mesh
2433  // since MeshBase::delete_remote_elements{} is a no-op (empty) for replicated mesh.
2434  // The motivation here is that MooseMesh::_use_distributed_mesh may not be properly set
2435  // at the time we are adding geometric relationship managers. We deleted the following
2436  // old logic to add all geometric RMs regardless of there is a distributed mesh or not.
2437  // Otherwise, all geometric RMs will be improperly ignored for a distributed mesh generator.
2438 
2439  // if (!_action_warehouse.mesh()->isDistributedMesh() && !_split_mesh &&
2440  // (relationship_manager->isType(Moose::RelationshipManagerType::GEOMETRIC) &&
2441  // !(relationship_manager->isType(Moose::RelationshipManagerType::ALGEBRAIC) ||
2442  // relationship_manager->isType(Moose::RelationshipManagerType::COUPLING))))
2443  // return false;
2444 
2445  bool add = true;
2446 
2447  std::set<std::shared_ptr<RelationshipManager>> rms_to_erase;
2448 
2449  for (const auto & existing_rm : _relationship_managers)
2450  {
2451  if (*existing_rm >= *new_rm)
2452  {
2453  add = false;
2454  donateForWhom(*new_rm, *existing_rm);
2455  break;
2456  }
2457  // The new rm did not provide less or the same amount/type of ghosting as the existing rm, but
2458  // what about the other way around?
2459  else if (*new_rm >= *existing_rm)
2460  rms_to_erase.emplace(existing_rm);
2461  }
2462 
2463  if (add)
2464  {
2465  _relationship_managers.emplace(new_rm);
2466  for (const auto & rm_to_erase : rms_to_erase)
2467  {
2468  donateForWhom(*rm_to_erase, *new_rm);
2469  removeRelationshipManager(rm_to_erase);
2470  }
2471  }
2472 
2473  // Inform the caller whether the object was added or not
2474  return add;
2475 }
void removeRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Purge this relationship manager from meshes and DofMaps and finally from us.
Definition: MooseApp.C:2532
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1297

◆ appBinaryName()

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

Definition at line 123 of file MooseApp.h.

Referenced by copyInputs(), run(), and runInputs().

124  {
126  name = name.substr(0, name.find_last_of("-"));
127  if (name.find_first_of("/") != std::string::npos)
128  name = name.substr(name.find_first_of("/") + 1, std::string::npos);
129  return name;
130  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::string getExecutableName()
This function returns the name of the running executable.

◆ appendMeshGenerator()

const MeshGenerator& MooseApp::appendMeshGenerator ( const std::string &  type,
const std::string &  name,
InputParameters  params 
)
inline

Append a mesh generator that will act on the final mesh generator in the system.

Parameters
typeThe type of MeshGenerator
nameThe name of the MeshGenerator
paramsThe params used to construct the MeshGenerator

See MeshGeneratorSystem::appendMeshGenerator()

Definition at line 919 of file MooseApp.h.

920  {
922  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const MeshGenerator & appendMeshGenerator(const std::string &type, const std::string &name, InputParameters params)
Append a mesh generator that will act on the current final mesh generator in the system.
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ 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 1860 of file MooseApp.C.

Referenced by dynamicAllRegistration(), and dynamicAppRegistration().

1861 {
1862  std::string library_name(app_name);
1863 
1864  // Strip off the App part (should always be the last 3 letters of the name)
1865  size_t pos = library_name.find("App");
1866  if (pos != library_name.length() - 3)
1867  mooseError("Invalid application name: ", library_name);
1868  library_name.erase(pos);
1869 
1870  // Now get rid of the camel case, prepend lib, and append the method and suffix
1871  return std::string("lib") + MooseUtils::camelCaseToUnderscore(library_name) + '-' +
1872  QUOTE(METHOD) + ".la";
1873 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string camelCaseToUnderscore(const std::string &camel_case_name)
Function for converting a camel case name to a name containing underscores.
Definition: MooseUtils.C:574

◆ attachRelationshipManagers() [1/2]

void MooseApp::attachRelationshipManagers ( Moose::RelationshipManagerType  rm_type,
bool  attach_geometric_rm_final = false 
)

Attach the relationship managers of the given type Note: Geometric relationship managers that are supposed to be attached late will be attached when Algebraic are attached.

Definition at line 2640 of file MooseApp.C.

Referenced by AddRelationshipManager::act(), CouplingFunctorCheckAction::act(), and MooseMesh::buildTypedMesh().

2642 {
2643  for (auto & rm : _relationship_managers)
2644  {
2645  if (!rm->isType(rm_type))
2646  continue;
2647 
2648  // RM is already attached (this also handles the geometric early case)
2649  if (_attached_relationship_managers[rm_type].count(rm.get()))
2650  continue;
2651 
2653  {
2654  // The problem is not built yet - so the ActionWarehouse currently owns the mesh
2655  MooseMesh * const mesh = _action_warehouse.mesh().get();
2656 
2657  // "attach_geometric_rm_final = true" inidicate that it is the last chance to attach
2658  // geometric RMs. Therefore, we need to attach them.
2659  if (!rm->attachGeometricEarly() && !attach_geometric_rm_final)
2660  // Will attach them later (during algebraic). But also, we need to tell the mesh that we
2661  // shouldn't be deleting remote elements yet
2662  mesh->allowRemoteElementRemoval(false);
2663  else
2664  {
2665  MeshBase & undisp_mesh_base = mesh->getMesh();
2666  const DofMap * const undisp_sys_dof_map =
2667  _executioner ? &feProblem().getSolverSystem(0).dofMap() : nullptr;
2668  undisp_mesh_base.add_ghosting_functor(
2669  createRMFromTemplateAndInit(*rm, *mesh, undisp_mesh_base, undisp_sys_dof_map));
2670 
2671  // In the final stage, if there is a displaced mesh, we need to
2672  // clone ghosting functors for displacedMesh
2673  if (auto & disp_moose_mesh = _action_warehouse.displacedMesh();
2674  attach_geometric_rm_final && disp_moose_mesh)
2675  {
2676  MeshBase & disp_mesh_base = _action_warehouse.displacedMesh()->getMesh();
2677  const DofMap * disp_sys_dof_map = nullptr;
2678  if (_executioner && feProblem().getDisplacedProblem())
2679  disp_sys_dof_map = &feProblem().getDisplacedProblem()->solverSys(0).dofMap();
2680  disp_mesh_base.add_ghosting_functor(
2681  createRMFromTemplateAndInit(*rm, *disp_moose_mesh, disp_mesh_base, disp_sys_dof_map));
2682  }
2683  else if (_action_warehouse.displacedMesh())
2684  mooseError("The displaced mesh should not yet exist at the time that we are attaching "
2685  "early geometric relationship managers.");
2686 
2687  // Mark this RM as attached
2688  mooseAssert(!_attached_relationship_managers[rm_type].count(rm.get()), "Already attached");
2689  _attached_relationship_managers[rm_type].insert(rm.get());
2690  }
2691  }
2692  else // rm_type is algebraic or coupling
2693  {
2694  if (!_executioner && !_executor)
2695  mooseError("We must have an executioner by now or else we do not have to data to add "
2696  "algebraic or coupling functors to in MooseApp::attachRelationshipManagers");
2697 
2698  // Now we've built the problem, so we can use it
2699  auto & problem = feProblem();
2700  auto & undisp_moose_mesh = problem.mesh();
2701  auto & undisp_sys = feProblem().getSolverSystem(0);
2702  auto & undisp_sys_dof_map = undisp_sys.dofMap();
2703  auto & undisp_mesh = undisp_moose_mesh.getMesh();
2704 
2705  if (rm->useDisplacedMesh() && problem.getDisplacedProblem())
2706  {
2708  // We actually need to add this to the FEProblemBase NonlinearSystemBase's DofMap
2709  // because the DisplacedProblem "nonlinear" DisplacedSystem doesn't have any matrices
2710  // for which to do coupling. It's actually horrifying to me that we are adding a
2711  // coupling functor, that is going to determine its couplings based on a displaced
2712  // MeshBase object, to a System associated with the undisplaced MeshBase object (there
2713  // is only ever one EquationSystems object per MeshBase object and visa versa). So here
2714  // I'm left with the choice of whether to pass in a MeshBase object that is *not* the
2715  // MeshBase object that will actually determine the couplings or to pass in the MeshBase
2716  // object that is inconsistent with the System DofMap that we are adding the coupling
2717  // functor for! Let's err on the side of *libMesh* consistency and pass properly paired
2718  // MeshBase-DofMap
2719  problem.addCouplingGhostingFunctor(
2720  createRMFromTemplateAndInit(*rm, undisp_moose_mesh, undisp_mesh, &undisp_sys_dof_map),
2721  /*to_mesh = */ false);
2722 
2723  else if (rm_type == Moose::RelationshipManagerType::ALGEBRAIC)
2724  {
2725  auto & displaced_problem = *problem.getDisplacedProblem();
2726  auto & disp_moose_mesh = displaced_problem.mesh();
2727  auto & disp_mesh = disp_moose_mesh.getMesh();
2728  const DofMap * const disp_nl_dof_map = &displaced_problem.solverSys(0).dofMap();
2729  displaced_problem.addAlgebraicGhostingFunctor(
2730  createRMFromTemplateAndInit(*rm, disp_moose_mesh, disp_mesh, disp_nl_dof_map),
2731  /*to_mesh = */ false);
2732  }
2733  }
2734  else // undisplaced
2735  {
2737  problem.addCouplingGhostingFunctor(
2738  createRMFromTemplateAndInit(*rm, undisp_moose_mesh, undisp_mesh, &undisp_sys_dof_map),
2739  /*to_mesh = */ false);
2740 
2741  else if (rm_type == Moose::RelationshipManagerType::ALGEBRAIC)
2742  problem.addAlgebraicGhostingFunctor(
2743  createRMFromTemplateAndInit(*rm, undisp_moose_mesh, undisp_mesh, &undisp_sys_dof_map),
2744  /*to_mesh = */ false);
2745  }
2746 
2747  // Mark this RM as attached
2748  mooseAssert(!_attached_relationship_managers[rm_type].count(rm.get()), "Already attached");
2749  _attached_relationship_managers[rm_type].insert(rm.get());
2750  }
2751  }
2752 }
std::map< Moose::RelationshipManagerType, std::set< const RelationshipManager * > > _attached_relationship_managers
The relationship managers that have been attached (type -> RMs)
Definition: MooseApp.h:1301
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::shared_ptr< MooseMesh > & displacedMesh()
MeshBase & mesh
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
FEProblemBase & feProblem() const
Definition: MooseApp.C:1396
RelationshipManager & createRMFromTemplateAndInit(const RelationshipManager &template_rm, MooseMesh &moose_mesh, MeshBase &mesh, const libMesh::DofMap *dof_map=nullptr)
Take an input relationship manager, clone it, and then initialize it with provided mesh and optional ...
Definition: MooseApp.C:2574
std::shared_ptr< MooseMesh > & mesh()
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:1136
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1297
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212
void add_ghosting_functor(GhostingFunctor &ghosting_functor)

◆ attachRelationshipManagers() [2/2]

void MooseApp::attachRelationshipManagers ( MeshBase &  mesh,
MooseMesh moose_mesh 
)

Attach geometric relationship managers to the given MeshBase object.

This API is designed to work with MeshGenerators which are executed at the very beginning of a simulation. No attempt will be made to add relationship managers to a displaced mesh, because it doesn't exist yet.

◆ backup() [1/2]

std::vector< std::filesystem::path > MooseApp::backup ( const std::filesystem::path &  folder_base)

Backs up the application to the folder folder_base.

Returns
The files that are written in the backup

Definition at line 1284 of file MooseApp.C.

Referenced by Checkpoint::output().

1285 {
1286  TIME_SECTION("backup", 2, "Backing Up Application to File");
1287 
1288  preBackup();
1289 
1291  return writer.write(folder_base);
1292 }
Writer for restartable data, to be read by the RestartableDataReader.
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1191
virtual void preBackup()
Insertion point for other apps that is called before backup()
Definition: MooseApp.h:756

◆ backup() [2/2]

std::unique_ptr< Backup > MooseApp::backup ( )

Backs up the application memory in a Backup.

Returns
The backup

Definition at line 1295 of file MooseApp.C.

Referenced by finalizeRestore(), and restore().

1296 {
1297  TIME_SECTION("backup", 2, "Backing Up Application");
1298 
1300 
1301  preBackup();
1302 
1303  auto backup = std::make_unique<Backup>();
1304  writer.write(*backup->header, *backup->data);
1305 
1306  return backup;
1307 }
Writer for restartable data, to be read by the RestartableDataReader.
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1191
virtual void preBackup()
Insertion point for other apps that is called before backup()
Definition: MooseApp.h:756
std::unique_ptr< Backup > backup()
Backs up the application memory in a Backup.
Definition: MooseApp.C:1295

◆ builder()

Moose::Builder& MooseApp::builder ( )
inline

Returns a writable reference to the builder.

Definition at line 232 of file MooseApp.h.

Referenced by MeshOnlyAction::act(), and SetupMeshAction::act().

232 { return _builder; }
Moose::Builder _builder
Builder for building app related parser tree.
Definition: MooseApp.h:1188

◆ callMooseError()

void MooseBase::callMooseError ( std::string  msg,
const bool  with_prefix 
) const
inherited

Calls moose error with the message msg.

Will prefix the message with the subapp name if one exists.

If with_prefix, then add the prefix from errorPrefix() to the error.

Definition at line 33 of file MooseBase.C.

Referenced by InputParameters::callMooseErrorHelper(), MooseBaseErrorInterface::mooseDocumentedError(), MooseBaseErrorInterface::mooseError(), MooseBaseErrorInterface::mooseErrorNonPrefixed(), and MooseBaseParameterInterface::paramError().

34 {
36  const std::string prefix = _app.isUltimateMaster() ? "" : _app.name();
37  if (with_prefix)
38  msg = errorPrefix("error") + msg;
39  moose::internal::mooseErrorRaw(msg, prefix);
40 }
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::string errorPrefix(const std::string &error_type) const
Definition: MooseBase.C:43
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
void mooseErrorRaw(std::string msg, const std::string prefix="")
Definition: MooseError.C:53
void mooseConsole()
Send current output buffer to Console output objects.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1848

◆ checkInput()

bool MooseApp::checkInput ( ) const
inline

Returns whether the Application is running in check input mode.

Definition at line 942 of file MooseApp.h.

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

◆ checkMetaDataIntegrity()

void MooseApp::checkMetaDataIntegrity ( ) const

Function to check the integrity of the restartable meta data structure.

Definition at line 2831 of file MooseApp.C.

Referenced by SetupRecoverFileBaseAction::act().

2832 {
2833  for (auto map_iter = _restartable_meta_data.begin(); map_iter != _restartable_meta_data.end();
2834  ++map_iter)
2835  {
2836  const RestartableDataMapName & name = map_iter->first;
2837  const RestartableDataMap & meta_data = map_iter->second.first;
2838 
2839  std::vector<std::string> not_declared;
2840 
2841  for (const auto & data : meta_data)
2842  if (!data.declared())
2843  not_declared.push_back(data.name());
2844 
2845  if (!not_declared.empty())
2846  {
2847  std::ostringstream oss;
2848  std::copy(
2849  not_declared.begin(), not_declared.end(), infix_ostream_iterator<std::string>(oss, ", "));
2850 
2851  mooseError("The following '",
2852  name,
2853  "' meta-data properties were retrieved but never declared: ",
2854  oss.str());
2855  }
2856  }
2857 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
Storage for restartable data that is ordered based on insertion order.
std::string RestartableDataMapName
Definition: MooseTypes.h:210

◆ checkpointSuffix()

const std::string & MooseApp::checkpointSuffix ( )
static

The file suffix for the checkpoint mesh.

Definition at line 2478 of file MooseApp.C.

Referenced by SetupRecoverFileBaseAction::act(), MooseMesh::init(), and Checkpoint::output().

2479 {
2480  static const std::string suffix = "-mesh.cpa.gz";
2481  return suffix;
2482 }

◆ 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 441 of file MooseApp.h.

Referenced by FEProblemBase::addMultiApp(), Moose::Builder::build(), MultiApp::createApp(), Moose::Builder::errorCheck(), ConsoleUtils::outputFrameworkInformation(), MooseServer::parseDocumentForDiagnostics(), and ExodusFormatter::printInputFile().

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

◆ constructingMeshGenerators()

bool MooseApp::constructingMeshGenerators ( ) const
virtual

Whether this app is constructing mesh generators.

This is virtual to allow MooseUnitApp to override it so that we can construct MeshGenerators in unit tests

Definition at line 2930 of file MooseApp.C.

Referenced by MeshGenerator::addChildMeshGenerator(), MeshGeneratorSystem::addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addParentMeshGenerator(), MeshGenerator::checkGetMesh(), MeshGeneratorSystem::createMeshGenerator(), MeshGeneratorSystem::createMeshGeneratorOrder(), MeshGenerator::declareMeshProperty(), MeshGenerator::declareNullMeshName(), and MeshGeneratorSystem::getMeshGeneratorOutput().

2931 {
2932  return _action_warehouse.getCurrentTaskName() == "create_added_mesh_generators" ||
2934 }
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
const std::string & getCurrentTaskName() const
bool appendingMeshGenerators() const
Whether or not mesh generators are currently being appended (append_mesh_generator task) ...

◆ copyInputs()

bool MooseApp::copyInputs ( )
private

Handles the copy_inputs input parameter logic: Checks to see whether the passed argument is valid (a readable installed directory) and recursively copies those files into a read/writable location for the user.

Returns
a Boolean value used to indicate whether the application should exit early

Definition at line 1663 of file MooseApp.C.

Referenced by run().

1664 {
1665  if (isParamSetByUser("copy_inputs"))
1666  {
1667  if (comm().size() > 1)
1668  mooseError("The --copy-inputs option should not be ran in parallel");
1669 
1670  // Get command line argument following --copy-inputs on command line
1671  auto dir_to_copy = getParam<std::string>("copy_inputs");
1672 
1673  if (dir_to_copy.empty())
1674  mooseError("Error retrieving directory to copy");
1675  if (dir_to_copy.back() != '/')
1676  dir_to_copy += '/';
1677 
1678  // This binary name is the actual binary. That is, if we called a symlink it'll
1679  // be the name of what the symlink points to
1680  auto binname = appBinaryName();
1681  if (binname == "")
1682  mooseError("could not locate installed tests to run (unresolved binary/app name)");
1683 
1684  auto src_dir = MooseUtils::installedInputsDir(
1685  binname,
1686  dir_to_copy,
1687  "Rerun binary with " + _pars.getCommandLineMetadata("show_inputs").switches[0] +
1688  " to get a list of installable directories.");
1689 
1690  // Use the command line here because if we have a symlink to another binary,
1691  // we want to dump into a directory that is named after the symlink not the true binary
1692  auto dst_dir = _command_line->getExecutableNameBase() + "/" + dir_to_copy;
1693  auto cmdname = _command_line->getExecutableName();
1694  if (cmdname.find_first_of("/") != std::string::npos)
1695  cmdname = cmdname.substr(cmdname.find_first_of("/") + 1, std::string::npos);
1696 
1697  if (MooseUtils::pathExists(dst_dir))
1698  mooseError(
1699  "The directory \"./",
1700  dst_dir,
1701  "\" already exists.\nTo update/recopy the contents of this directory, rename (\"mv ",
1702  dst_dir,
1703  " new_dir_name\") or remove (\"rm -r ",
1704  dst_dir,
1705  "\") the existing directory.\nThen re-run \"",
1706  cmdname,
1707  " --copy-inputs ",
1708  dir_to_copy,
1709  "\".");
1710 
1711  std::string cmd = "mkdir -p " + dst_dir + "; rsync -av " + src_dir + " " + dst_dir;
1712 
1713  TIME_SECTION("copy_inputs", 2, "Copying Inputs");
1714 
1715  mooseAssert(comm().size() == 1, "Should be run in serial");
1716  const auto return_value = system(cmd.c_str());
1717  if (!WIFEXITED(return_value))
1718  mooseError("Process exited unexpectedly");
1719  setExitCode(WEXITSTATUS(return_value));
1720  if (exitCode() == 0)
1721  Moose::out << "Directory successfully copied into ./" << dst_dir << '\n';
1722  return true;
1723  }
1724  return false;
1725 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string installedInputsDir(const std::string &app_name, const std::string &dir_name, const std::string &extra_error_msg="")
Returns the directory of any installed inputs or the empty string if none are found.
Definition: MooseUtils.C:99
virtual std::string appBinaryName() const
Definition: MooseApp.h:123
const Parallel::Communicator & comm() const
int exitCode() const
Get the shell exit code for the application.
Definition: MooseApp.h:136
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:1166
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
const InputParameters::CommandLineMetadata & getCommandLineMetadata(const std::string &name) const
std::vector< std::string > switches
The switches for the parameter (i.e., [-t, –timing])
bool pathExists(const std::string &path)
Definition: MooseUtils.C:253
void setExitCode(const int exit_code)
Sets the exit code that the application will exit with.
Definition: MooseApp.h:141
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193

◆ createExecutors()

void MooseApp::createExecutors ( )

After adding all of the Executor Params - this function will actually cause all of them to be built.

Definition at line 1481 of file MooseApp.C.

Referenced by AddExecutorAction::act().

1482 {
1483  // Do we have any?
1484  if (_executor_params.empty())
1485  return;
1486 
1487  // Holds the names of Executors that may be the root executor
1488  std::list<std::string> possibly_root;
1489 
1490  // What is already built
1491  std::map<std::string, bool> already_built;
1492 
1493  // The Executors that are currently candidates for being roots
1494  std::list<std::string> possible_roots;
1495 
1496  // The current line of dependencies - used for finding cycles
1497  std::list<std::string> current_branch;
1498 
1499  // Build the NullExecutor
1500  {
1501  auto params = _factory.getValidParams("NullExecutor");
1502  _null_executor = _factory.create<NullExecutor>("NullExecutor", "_null_executor", params);
1503  }
1504 
1505  for (const auto & params_entry : _executor_params)
1506  {
1507  const auto & name = params_entry.first;
1508 
1509  // Did we already make this one?
1510  if (_executors.find(name) != _executors.end())
1511  continue;
1512 
1513  possible_roots.emplace_back(name);
1514 
1515  recursivelyCreateExecutors(name, possible_roots, current_branch);
1516  }
1517 
1518  // If there is more than one possible root - error
1519  if (possible_roots.size() > 1)
1520  {
1521  auto root_string_it = possible_roots.begin();
1522 
1523  std::stringstream roots_string;
1524 
1525  roots_string << *root_string_it++;
1526 
1527  for (; root_string_it != possible_roots.end(); ++root_string_it)
1528  roots_string << ", " << *root_string_it;
1529 
1530  mooseError("Multiple Executor roots found: ", roots_string.str());
1531  }
1532 
1533  // Set the root executor
1534  _executor = _executors[possible_roots.front()];
1535 }
std::unordered_map< std::string, std::pair< std::string, std::unique_ptr< InputParameters > > > _executor_params
Used in building the Executors Maps the name of the Executor block to the <type, params> ...
Definition: MooseApp.h:1220
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void recursivelyCreateExecutors(const std::string &current_executor_name, std::list< std::string > &possible_roots, std::list< std::string > &current_branch)
Internal function used to recursively create the executor objects.
Definition: MooseApp.C:1429
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
Definition: MooseApp.h:1215
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
Definition: MooseApp.h:1231
virtual std::unique_ptr< Base > create()=0
Factory _factory
Definition: MooseApp.h:1250
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212

◆ 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 2330 of file MooseApp.C.

Referenced by setupOptions().

2331 {
2332  TIME_SECTION("createMinimalApp", 3, "Creating Minimal App");
2333 
2334  // SetupMeshAction
2335  {
2336  // Build the Action parameters
2337  InputParameters action_params = _action_factory.getValidParams("SetupMeshAction");
2338  action_params.set<std::string>("type") = "GeneratedMesh";
2339 
2340  // Create The Action
2341  std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
2342  _action_factory.create("SetupMeshAction", "Mesh", action_params));
2343 
2344  // Set the object parameters
2345  InputParameters & params = action->getObjectParams();
2346  params.set<MooseEnum>("dim") = "1";
2347  params.set<unsigned int>("nx") = 1;
2348 
2349  // Add Action to the warehouse
2351  }
2352 
2353  // Executioner
2354  {
2355  // Build the Action parameters
2356  InputParameters action_params = _action_factory.getValidParams("CreateExecutionerAction");
2357  action_params.set<std::string>("type") = "Transient";
2358 
2359  // Create the action
2360  std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
2361  _action_factory.create("CreateExecutionerAction", "Executioner", action_params));
2362 
2363  // Set the object parameters
2364  InputParameters & params = action->getObjectParams();
2365  params.set<unsigned int>("num_steps") = 1;
2366  params.set<Real>("dt") = 1;
2367 
2368  // Add Action to the warehouse
2370  }
2371 
2372  // Problem
2373  {
2374  // Build the Action parameters
2375  InputParameters action_params = _action_factory.getValidParams("CreateProblemDefaultAction");
2376  action_params.set<bool>("_solve") = false;
2377 
2378  // Create the action
2379  std::shared_ptr<Action> action = std::static_pointer_cast<Action>(
2380  _action_factory.create("CreateProblemDefaultAction", "Problem", action_params));
2381 
2382  // Add Action to the warehouse
2384  }
2385 
2386  // Outputs
2387  {
2388  // Build the Action parameters
2389  InputParameters action_params = _action_factory.getValidParams("CommonOutputAction");
2390  action_params.set<bool>("console") = false;
2391 
2392  // Create action
2393  std::shared_ptr<Action> action =
2394  _action_factory.create("CommonOutputAction", "Outputs", action_params);
2395 
2396  // Add Action to the warehouse
2398  }
2399 
2401 }
InputParameters getValidParams(const std::string &name)
Definition: ActionFactory.C:92
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:1179
Base class for actions.
Definition: Action.h:33
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters &parameters)
Definition: ActionFactory.C:39
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition: MooseApp.h:1176
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void build()
Builds all auto-buildable tasks.

◆ createRecoverablePerfGraph()

PerfGraph & MooseApp::createRecoverablePerfGraph ( )
private

Creates a recoverable PerfGraph.

This is a separate method so that it can be used in the constructor (multiple calls are required to declare it).

Definition at line 2899 of file MooseApp.C.

2900 {
2902 
2903  auto perf_graph =
2904  std::make_unique<RestartableData<PerfGraph>>("perf_graph",
2905  this,
2906  type() + " (" + name() + ')',
2907  *this,
2908  getParam<bool>("perf_graph_live_all"),
2909  !getParam<bool>("disable_perf_graph_live"));
2910 
2911  return dynamic_cast<RestartableData<PerfGraph> &>(
2912  registerRestartableData(std::move(perf_graph), 0, false))
2913  .set();
2914 }
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition: MooseApp.C:1269
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition: MooseApp.C:1888
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
Concrete definition of a parameter value for a specified type.

◆ createRecoverableSolutionInvalidity()

SolutionInvalidity & MooseApp::createRecoverableSolutionInvalidity ( )
private

Creates a recoverable SolutionInvalidity.

This is a separate method so that it can be used in the constructor (multiple calls are required to declare it).

Definition at line 2917 of file MooseApp.C.

2918 {
2920 
2921  auto solution_invalidity =
2922  std::make_unique<RestartableData<SolutionInvalidity>>("solution_invalidity", nullptr, *this);
2923 
2924  return dynamic_cast<RestartableData<SolutionInvalidity> &>(
2925  registerRestartableData(std::move(solution_invalidity), 0, false))
2926  .set();
2927 }
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition: MooseApp.C:1269
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition: MooseApp.C:1888
Concrete definition of a parameter value for a specified type.

◆ createRMFromTemplateAndInit()

RelationshipManager & MooseApp::createRMFromTemplateAndInit ( const RelationshipManager template_rm,
MooseMesh moose_mesh,
MeshBase mesh,
const libMesh::DofMap dof_map = nullptr 
)
private

Take an input relationship manager, clone it, and then initialize it with provided mesh and optional dof_map.

Parameters
template_rmThe relationship manager template from which we will clone
moose_meshThe moose mesh to use for initialization
meshThe mesh to use for initialization
dof_mapAn optional parameter that, if provided, will be used to help init the cloned relationship manager
Returns
a reference to the cloned and initialized relationship manager

Definition at line 2574 of file MooseApp.C.

Referenced by attachRelationshipManagers().

2578 {
2579  auto & mesh_to_clone = _template_to_clones[&template_rm];
2580  auto it = mesh_to_clone.find(&mesh);
2581  if (it != mesh_to_clone.end())
2582  {
2583  // We've already created a clone for this mesh
2584  auto & clone_rm = *it->second;
2585  if (!clone_rm.dofMap() && dof_map)
2586  // We didn't have a DofMap before, but now we do, so we should re-init
2587  clone_rm.init(moose_mesh, mesh, dof_map);
2588  else if (clone_rm.dofMap() && dof_map && (clone_rm.dofMap() != dof_map))
2589  mooseError("Attempting to create and initialize an existing clone with a different DofMap. "
2590  "This should not happen.");
2591 
2592  return clone_rm;
2593  }
2594 
2595  // It's possible that this method is going to get called for multiple different MeshBase
2596  // objects. If that happens, then we *cannot* risk having a MeshBase object with a ghosting
2597  // functor that is init'd with another MeshBase object. So the safe thing to do is to make a
2598  // different RM for every MeshBase object that gets called here. Then the
2599  // RelationshipManagers stored here in MooseApp are serving as a template only
2600  auto pr = mesh_to_clone.emplace(
2601  std::make_pair(&const_cast<const MeshBase &>(mesh),
2602  dynamic_pointer_cast<RelationshipManager>(template_rm.clone())));
2603  mooseAssert(pr.second, "An insertion should have happened");
2604  auto & clone_rm = *pr.first->second;
2605  clone_rm.init(moose_mesh, mesh, dof_map);
2606  return clone_rm;
2607 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::map< const RelationshipManager *, std::map< const MeshBase *, std::unique_ptr< RelationshipManager > > > _template_to_clones
Map from a template relationship manager to a map in which the key-value pairs represent the MeshBase...
Definition: MooseApp.h:1499
virtual std::unique_ptr< GhostingFunctor > clone() const

◆ defaultAutomaticScaling()

bool MooseApp::defaultAutomaticScaling ( ) const
inline

Whether to enable automatic scaling by default.

Definition at line 1045 of file MooseApp.h.

1045 { return _automatic_automatic_scaling; }
const bool _automatic_automatic_scaling
Whether to turn on automatic scaling by default.
Definition: MooseApp.h:1487

◆ determineLibtorchDeviceType()

torch::DeviceType MooseApp::determineLibtorchDeviceType ( const MooseEnum device) const
private

Function to determine the device which should be used by libtorch on this application.

We use this function to decide what is available on different builds.

Parameters
deviceEnum to describe if a cpu or a gpu should be used.

Definition at line 2938 of file MooseApp.C.

2939 {
2940  if (device_enum == "cuda")
2941  {
2942 #ifdef __linux__
2943  if (!torch::cuda::is_available())
2944  mooseError("--libtorch-device=cuda: CUDA is not available");
2945  return torch::kCUDA;
2946 #else
2947  mooseError("--libtorch-device=cuda: CUDA is not supported on your platform");
2948 #endif
2949  }
2950  else if (device_enum == "mps")
2951  {
2952 #ifdef __APPLE__
2953  if (!torch::mps::is_available())
2954  mooseError("--libtorch-device=mps: MPS is not available");
2955  return torch::kMPS;
2956 #else
2957  mooseError("--libtorch-device=mps: MPS is not supported on your platform");
2958 #endif
2959  }
2960 
2961  mooseAssert(device_enum == "cpu", "Should be cpu");
2962  return torch::kCPU;
2963 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ disableCheckUnusedFlag()

void MooseApp::disableCheckUnusedFlag ( )

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

Definition at line 1390 of file MooseApp.C.

1391 {
1393 }
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 2077 of file MooseApp.C.

Referenced by DynamicObjectRegistrationAction::DynamicObjectRegistrationAction().

2083 {
2084 #ifdef LIBMESH_HAVE_DLOPEN
2085  Parameters params;
2086  params.set<std::string>("app_name") = app_name;
2087  params.set<RegistrationType>("reg_type") = REGALL;
2088  params.set<std::string>("registration_method") = app_name + "__registerAll";
2089  params.set<std::string>("library_path") = library_path;
2090  params.set<std::string>("library_name") =
2091  library_name.empty() ? appNameToLibName(app_name) : library_name;
2092 
2093  params.set<Factory *>("factory") = factory;
2094  params.set<Syntax *>("syntax") = syntax;
2095  params.set<ActionFactory *>("action_factory") = action_factory;
2096  params.set<bool>("library_load_dependencies") = false;
2097 
2098  dynamicRegistration(params);
2099 #else
2100  libmesh_ignore(app_name, factory, action_factory, syntax, library_path, library_name);
2101  mooseError("Dynamic Loading is either not supported or was not detected by libMesh configure.");
2102 #endif
2103 }
void dynamicRegistration(const libMesh::Parameters &params)
Helper method for dynamic loading of objects.
Definition: MooseApp.C:2106
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
Syntax & syntax()
Returns a writable reference to the syntax object.
Definition: MooseApp.h:237
void libmesh_ignore(const Args &...)
Specialized factory for generic Action System objects.
Definition: ActionFactory.h:50
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:1445
T & set(const std::string &)
Holding syntax for parsing input files.
Definition: Syntax.h:21
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:1860

◆ dynamicAppRegistration()

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

Definition at line 2020 of file MooseApp.C.

Referenced by MultiApp::createApps().

2024 {
2025 #ifdef LIBMESH_HAVE_DLOPEN
2026  Parameters params;
2027  params.set<std::string>("app_name") = app_name;
2028  params.set<RegistrationType>("reg_type") = APPLICATION;
2029  params.set<std::string>("registration_method") = app_name + "__registerApps";
2030  params.set<std::string>("library_path") = library_path;
2031 
2032  const auto effective_library_name =
2033  library_name.empty() ? appNameToLibName(app_name) : library_name;
2034  params.set<std::string>("library_name") = effective_library_name;
2035  params.set<bool>("library_load_dependencies") = lib_load_deps;
2036 
2037  const auto paths = getLibrarySearchPaths(library_path);
2038  std::ostringstream oss;
2039 
2040  auto successfully_loaded = false;
2041  if (paths.empty())
2042  oss << '"' << app_name << "\" is not a registered application name.\n"
2043  << "No search paths were set. We made no attempts to locate the corresponding library "
2044  "file.\n";
2045  else
2046  {
2047  dynamicRegistration(params);
2048 
2049  // At this point the application should be registered so check it
2050  if (!AppFactory::instance().isRegistered(app_name))
2051  {
2052  oss << '"' << app_name << "\" is not a registered application name.\n"
2053  << "Unable to locate library archive for \"" << app_name
2054  << "\".\nWe attempted to locate the library archive \"" << effective_library_name
2055  << "\" in the following paths:\n\t";
2056  std::copy(paths.begin(), paths.end(), infix_ostream_iterator<std::string>(oss, "\n\t"));
2057  }
2058  else
2059  successfully_loaded = true;
2060  }
2061 
2062  if (!successfully_loaded)
2063  {
2064  oss << "\nMake sure you have compiled the library and either set the \"library_path\" "
2065  "variable in your input file or exported \"MOOSE_LIBRARY_PATH\".\n";
2066 
2067  mooseError(oss.str());
2068  }
2069 
2070 #else
2071  libmesh_ignore(app_name, library_path, library_name, lib_load_deps);
2072  mooseError("Dynamic Loading is either not supported or was not detected by libMesh configure.");
2073 #endif
2074 }
void dynamicRegistration(const libMesh::Parameters &params)
Helper method for dynamic loading of objects.
Definition: MooseApp.C:2106
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void libmesh_ignore(const Args &...)
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:1445
std::set< std::string > getLibrarySearchPaths(const std::string &library_path_from_param) const
Return the paths searched by MOOSE when loading libraries.
Definition: MooseApp.C:2280
static AppFactory & instance()
Get the instance of the AppFactory.
Definition: AppFactory.C:18
T & set(const std::string &)
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:1860

◆ dynamicRegistration()

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

Helper method for dynamic loading of objects.

Definition at line 2106 of file MooseApp.C.

Referenced by dynamicAllRegistration(), and dynamicAppRegistration().

2107 {
2108  const auto paths = getLibrarySearchPaths(params.get<std::string>("library_path"));
2109  const auto library_name = params.get<std::string>("library_name");
2110 
2111  // Attempt to dynamically load the library
2112  for (const auto & path : paths)
2113  if (MooseUtils::checkFileReadable(path + '/' + library_name, false, false))
2115  path + '/' + library_name, params, params.get<bool>("library_load_dependencies"));
2116 }
const T & get(std::string_view) const
void loadLibraryAndDependencies(const std::string &library_filename, const libMesh::Parameters &params, bool load_dependencies=true)
Recursively loads libraries and dependencies in the proper order to fully register a MOOSE applicatio...
Definition: MooseApp.C:2119
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:260
std::set< std::string > getLibrarySearchPaths(const std::string &library_path_from_param) const
Return the paths searched by MOOSE when loading libraries.
Definition: MooseApp.C:2280

◆ 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 1171 of file MooseApp.C.

Referenced by executeExecutioner(), and run().

1172 {
1173  bool warn = _enable_unused_check == WARN_UNUSED;
1175 
1176  _builder.errorCheck(*_comm, warn, err);
1177 
1178  // Return early for mesh only mode, since we want error checking to run even though
1179  // an executor is not created for this case
1180  if (isParamSetByUser("mesh_only"))
1181  return;
1182 
1183  if (!_executor.get() && !_executioner.get())
1184  {
1185  if (!_early_exit_param.empty())
1186  {
1187  mooseAssert(_check_input,
1188  "Something went wrong, we should only get here if _check_input is true.");
1189  mooseError(
1190  "Incompatible command line arguments provided. --check-input cannot be called with ",
1192  ".");
1193  }
1194  // We should never get here
1195  mooseError("The Executor is being called without being initialized. This is likely "
1196  "caused by "
1197  "incompatible command line arguments");
1198  }
1199 
1200  auto apps = feProblem().getMultiAppWarehouse().getObjects();
1201  for (auto app : apps)
1202  for (unsigned int i = 0; i < app->numLocalApps(); i++)
1203  app->localApp(i)->errorCheck();
1204 }
OStreamProxy err
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:1294
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse()
FEProblemBase & feProblem() const
Definition: MooseApp.C:1396
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread...
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209
enum MooseApp::UNUSED_CHECK _enable_unused_check
void errorCheck(const libMesh::Parallel::Communicator &comm, bool warn_unused, bool err_unused)
Definition: Builder.C:419
Moose::Builder _builder
Builder for building app related parser tree.
Definition: MooseApp.h:1188
const std::shared_ptr< libMesh::Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:1142
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212
std::string _early_exit_param
Indicates if simulation is ready to exit, and keeps track of which param caused it to exit...
Definition: MooseApp.h:1255
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193

◆ errorOnJacobianNonzeroReallocation()

virtual bool MooseApp::errorOnJacobianNonzeroReallocation ( ) const
inlinevirtual

Whether this application should by default error on Jacobian nonzero reallocations.

The application level setting can always be overridden by setting the error_on_jacobian_nonzero_reallocation parameter in the Problem block of the input file

Definition at line 1079 of file MooseApp.h.

1079 { return false; }

◆ errorPrefix()

std::string MooseBase::errorPrefix ( const std::string &  error_type) const
inherited
Returns
A prefix to be used in errors that contains the input file location associated with this object (if any) and the name and type of the object.

Definition at line 43 of file MooseBase.C.

Referenced by MooseBase::callMooseError(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), and MooseBaseParameterInterface::paramErrorMsg().

44 {
45  std::stringstream oss;
46  if (const auto node = _params.getHitNode())
47  if (!node->isRoot())
48  oss << node->fileLocation() << ":\n";
49  oss << "The following " << error_type << " occurred in the ";
50  if (const auto base_ptr = _params.getBase())
51  oss << *base_ptr;
52  else
53  oss << "object";
54  oss << " '" << name() << "' of type " << type() << ".\n\n";
55  return oss.str();
56 }
const hit::Node * getHitNode(const std::string &param) const
std::optional< std::string > getBase() const
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const InputParameters & _params
The object&#39;s parameteres.
Definition: MooseBase.h:94
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ executeExecutioner()

void MooseApp::executeExecutioner ( )
virtual

Execute the Executioner that was built.

Definition at line 1207 of file MooseApp.C.

Referenced by run().

1208 {
1209  TIME_SECTION("executeExecutioner", 3);
1210 
1211  // If ready to exit has been set, then just return
1212  if (_ready_to_exit)
1213  return;
1214 
1215  // run the simulation
1216  if (_use_executor && _executor)
1217  {
1218  LibmeshPetscCall(Moose::PetscSupport::petscSetupOutput(_command_line.get()));
1219  _executor->init();
1220  errorCheck();
1221  auto result = _executor->exec();
1222  if (!result.convergedAll())
1223  mooseError(result.str());
1224  }
1225  else if (_executioner)
1226  {
1227  LibmeshPetscCall(Moose::PetscSupport::petscSetupOutput(_command_line.get()));
1228  _executioner->init();
1229  errorCheck();
1230  _executioner->execute();
1231  }
1232  else
1233  mooseError("No executioner was specified (go fix your input file)");
1234 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:1166
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209
PetscErrorCode petscSetupOutput(CommandLine *cmd_line)
Definition: PetscSupport.C:293
bool _ready_to_exit
Definition: MooseApp.h:1256
const bool _use_executor
Indicates whether we are operating in the new/experimental executor mode instead of using the legacy ...
Definition: MooseApp.h:1228
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
Definition: MooseApp.C:1171

◆ exitCode()

int MooseApp::exitCode ( ) const
inline

Get the shell exit code for the application.

Returns
The shell exit code

Definition at line 136 of file MooseApp.h.

Referenced by copyInputs().

136 { return _exit_code; }
int _exit_code
The exit code.
Definition: MooseApp.h:1258

◆ feProblem()

FEProblemBase & MooseApp::feProblem ( ) const

Definition at line 1396 of file MooseApp.C.

Referenced by attachRelationshipManagers(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), errorCheck(), AutomaticMortarGeneration::initOutput(), removeRelationshipManager(), and setOutputFileBase().

1397 {
1398  return _executor.get() ? _executor->feProblem() : _executioner->feProblem();
1399 }
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212

◆ finalizeRestore()

std::unique_ptr< Backup > MooseApp::finalizeRestore ( )

Finalizes (closes) the restoration process done in restore().

Returns
The underlying Backup that was used to do the restoration (if any, will be null when backed up from file); can be ignored to destruct it

This releases access to the stream in which the restore was loaded from and makes it no longer possible to restore additional data.

Definition at line 1352 of file MooseApp.C.

Referenced by FEProblemBase::initialSetup().

1353 {
1354  if (!_rd_reader.isRestoring())
1355  mooseError("MooseApp::finalizeRestore(): Not currently restoring");
1356 
1357  // This gives us access to the underlying streams so that we can return it if needed
1358  auto input_streams = _rd_reader.clear();
1359 
1360  std::unique_ptr<Backup> backup;
1361 
1362  // Give them back a backup if this restore started from a Backup, in which case
1363  // the two streams in the Backup are formed into StringInputStreams
1364  if (auto header_string_input = dynamic_cast<StringInputStream *>(input_streams.header.get()))
1365  {
1366  auto data_string_input = dynamic_cast<StringInputStream *>(input_streams.data.get());
1367  mooseAssert(data_string_input, "Should also be a string input");
1368 
1369  auto header_sstream = header_string_input->release();
1370  mooseAssert(header_sstream, "Header not available");
1371 
1372  auto data_sstream = data_string_input->release();
1373  mooseAssert(data_sstream, "Data not available");
1374 
1375  backup = std::make_unique<Backup>();
1376  backup->header = std::move(header_sstream);
1377  backup->data = std::move(data_sstream);
1378  }
1379 
1380  return backup;
1381 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
RestartableDataReader _rd_reader
Definition: MooseApp.h:1472
std::unique_ptr< Backup > backup()
Backs up the application memory in a Backup.
Definition: MooseApp.C:1295
Helper class that hands out input streams to a stringstream.
InputStreams clear()
Clears the contents of the reader (header stream, data stream, header)

◆ fixedPointConfig()

FixedPointConfig& MooseApp::fixedPointConfig ( )
inline

This info is stored here because we need a "globalish" place to put it in order to allow communication between a multiapp and solver-specific internals (i.e.

relating to fixed-point inner loops like picard, etc.) for handling subapp-specific modifications necessary for those solve processes.

Definition at line 409 of file MooseApp.h.

Referenced by FixedPointSolve::FixedPointSolve().

409 { return _fixed_point_config; }
FixedPointConfig _fixed_point_config
Multiapp-related fixed point algorithm configuration details primarily intended to be passed to and u...
Definition: MooseApp.h:1224

◆ getActionFactory()

ActionFactory& MooseApp::getActionFactory ( )
inline

Retrieve a writable reference to the ActionFactory associated with this App.

Definition at line 429 of file MooseApp.h.

Referenced by Action::Action(), and DumpObjectsProblem::DumpObjectsProblem().

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

◆ getChainControlDataSystem()

ChainControlDataSystem& MooseApp::getChainControlDataSystem ( )
inline

Gets the system that manages the ChainControls.

Definition at line 857 of file MooseApp.h.

Referenced by ChainControlSetupAction::act(), FEProblemBase::advanceState(), ChainControl::getChainControlDataSystem(), and ChainControlDataPostprocessor::initialSetup().

857 { return _chain_control_system; }
ChainControlDataSystem _chain_control_system
The system that manages the ChainControls.
Definition: MooseApp.h:1470

◆ getCheckpointDirectories()

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

Get all checkpoint directories.

Returns
A Set of checkpoint directories

Definition at line 1796 of file MooseApp.C.

Referenced by getCheckpointFiles().

1797 {
1798  // Storage for the directory names
1799  std::list<std::string> checkpoint_dirs;
1800 
1801  // Add the directories added with Outputs/checkpoint=true input syntax
1802  checkpoint_dirs.push_back(getOutputFileBase() + "_cp");
1803 
1804  // Add the directories from any existing checkpoint output objects
1805  const auto & actions = _action_warehouse.getActionListByName("add_output");
1806  for (const auto & action : actions)
1807  {
1808  // Get the parameters from the MooseObjectAction
1809  MooseObjectAction * moose_object_action = dynamic_cast<MooseObjectAction *>(action);
1810  if (!moose_object_action)
1811  continue;
1812 
1813  const InputParameters & params = moose_object_action->getObjectParams();
1814  if (moose_object_action->getParam<std::string>("type") == "Checkpoint")
1815  {
1816  // Unless file_base was explicitly set by user, we cannot rely on it, as it will be changed
1817  // later
1818  const std::string cp_dir =
1819  _file_base_set_by_user ? params.get<std::string>("file_base")
1820  : (getOutputFileBase(true) + "_" + moose_object_action->name());
1821  checkpoint_dirs.push_back(cp_dir + "_cp");
1822  }
1823  }
1824  return checkpoint_dirs;
1825 }
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition: MooseApp.h:1148
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
std::string getOutputFileBase(bool for_non_moose_build_output=false) const
Get the output file base name.
Definition: MooseApp.C:1112
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
const std::list< Action * > & getActionListByName(const std::string &task) const
Retrieve a constant list of Action pointers associated with the passed in task.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
InputParameters & getObjectParams()
Retrieve the parameters of the object to be created by this action.
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.

◆ getCheckpointFiles()

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

Extract all possible checkpoint file names.

Returns
A Set of checkpoint filenames

Definition at line 1828 of file MooseApp.C.

Referenced by setRestartRecoverFileBase().

1829 {
1830  auto checkpoint_dirs = getCheckpointDirectories();
1831  return MooseUtils::getFilesInDirs(checkpoint_dirs, false);
1832 }
std::list< std::string > getCheckpointDirectories() const
Get all checkpoint directories.
Definition: MooseApp.C:1796
std::list< std::string > getFilesInDirs(const std::list< std::string > &directory_list, const bool files_only=true)
Retrieves the names of all of the files contained within the list of directories passed into the rout...
Definition: MooseUtils.C:814

◆ getCommunicator()

const std::shared_ptr<libMesh::Parallel::Communicator> MooseApp::getCommunicator ( ) const
inline

Definition at line 1048 of file MooseApp.h.

Referenced by MooseServer::parseDocumentForDiagnostics().

1048 { return _comm; }
const std::shared_ptr< libMesh::Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:1142

◆ getCurrentActionHitNode()

const hit::Node * MooseApp::getCurrentActionHitNode ( ) const
Returns
The hit node that is responsible for creating the current action that is running, if any

Can be used to link objects that are created by an action to the action that created them in input

Definition at line 2501 of file MooseApp.C.

Referenced by ActionFactory::create(), and Factory::initialize().

2502 {
2503  if (const auto action = _action_warehouse.getCurrentAction())
2504  return action->parameters().getHitNode();
2505  return nullptr;
2506 }
const Action * getCurrentAction() const
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179

◆ 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 483 of file MooseApp.h.

Referenced by MooseMesh::determineUseDistributedMesh().

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

◆ getExecuteOnEnum()

const ExecFlagEnum& MooseApp::getExecuteOnEnum ( ) const
inline

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

Definition at line 1030 of file MooseApp.h.

Referenced by FEProblemBase::initialSetup(), and EigenExecutionerBase::normalizeSolution().

1030 { return _execute_flags; }
const ExecFlagEnum _execute_flags
Execution flags for this App.
Definition: MooseApp.h:1481

◆ getExecutioner()

Executioner * MooseApp::getExecutioner ( ) const

◆ getExecutor() [1/2]

Executor* MooseApp::getExecutor ( ) const
inline

Definition at line 347 of file MooseApp.h.

Referenced by CheckIntegrityAction::act(), ExecutorInterface::getExecutor(), FEProblemBase::getExecutor(), and ExecutorInterface::getExecutorByName().

347 { return _executor.get(); }
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212

◆ getExecutor() [2/2]

Executor & MooseApp::getExecutor ( const std::string &  name,
bool  fail_if_not_found = true 
)

Get an Executor.

Parameters
nameThe name of the Executor
fail_if_not_foundWhether or not to fail if the executor doesn't exist. If this is false then this function will return a NullExecutor

Definition at line 1538 of file MooseApp.C.

1539 {
1540  auto it = _executors.find(name);
1541 
1542  if (it != _executors.end())
1543  return *it->second;
1544 
1545  if (fail_if_not_found)
1546  mooseError("Executor not found: ", name);
1547 
1548  return *_null_executor;
1549 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
if(subdm)
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
Definition: MooseApp.h:1215
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
Definition: MooseApp.h:1231

◆ getExodusFileRestart()

bool MooseApp::getExodusFileRestart ( ) const
inline

Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh.

Definition at line 453 of file MooseApp.h.

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

453 { 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:1261

◆ getExReaderForRestart()

libMesh::ExodusII_IO* MooseApp::getExReaderForRestart ( ) const
inline

Get the Exodus reader to restart variables from an Exodus mesh file.

Definition at line 466 of file MooseApp.h.

Referenced by FEProblemBase::checkICRestartError(), and FEProblemBase::initialSetup().

466 { return _ex_reader.get(); }
std::shared_ptr< libMesh::ExodusII_IO > _ex_reader
The Exodus reader when _initial_from_file is set to true.
Definition: MooseApp.h:1264

◆ getFactory()

Factory& MooseApp::getFactory ( )
inline

Retrieve a writable reference to the Factory associated with this App.

Definition at line 424 of file MooseApp.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), BatchMeshGeneratorAction::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), FVFluxKernel::adjustRMGhostLayers(), AStableDirk4::AStableDirk4(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), SingleRankPartitioner::clone(), RandomPartitioner::clone(), BlockWeightedPartitioner::clone(), GhostEverything::clone(), GhostHigherDLowerDPointNeighbors::clone(), GhostLowerDElems::clone(), LibmeshPartitioner::clone(), PetscExternalPartitioner::clone(), HierarchicalGridPartitioner::clone(), GridPartitioner::clone(), ElementSideNeighborLayers::clone(), ElementPointNeighborLayers::clone(), GhostBoundary::clone(), RedistributeProperties::clone(), ProxyRelationshipManager::clone(), OversampleOutput::cloneMesh(), MeshGeneratorSystem::createMeshGenerator(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), MooseObject::MooseObject(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), OverlayMeshGenerator::OverlayMeshGenerator(), TiledMesh::safeClone(), FileMesh::safeClone(), ImageMesh::safeClone(), GeneratedMesh::safeClone(), RinglebMesh::safeClone(), SpiralAnnularMesh::safeClone(), ConcentricCircleMesh::safeClone(), AnnularMesh::safeClone(), MeshGeneratorMesh::safeClone(), StitchedMesh::safeClone(), PatternedMesh::safeClone(), TransientBase::setupTimeIntegrator(), and SideSetExtruderGenerator::SideSetExtruderGenerator().

424 { return _factory; }
Factory _factory
Definition: MooseApp.h:1250

◆ getFileName()

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

Return the primary (first) filename that was parsed Note: When stripLeadingPath is false, this function returns the same name as getInputFileName() method when the input file is not a link.

Definition at line 1842 of file MooseApp.C.

Referenced by ProgressOutput::output().

1843 {
1844  return _builder.getPrimaryFileName(stripLeadingPath);
1845 }
std::string getPrimaryFileName(bool stripLeadingPath=true) const
Return the primary (first) filename that was parsed.
Definition: Builder.C:199
Moose::Builder _builder
Builder for building app related parser tree.
Definition: MooseApp.h:1188

◆ getFPTrapFlag()

bool MooseApp::getFPTrapFlag ( ) const
inline

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

Definition at line 945 of file MooseApp.h.

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

◆ getFrameworkVersion()

std::string MooseApp::getFrameworkVersion ( ) const

Returns the framework version.

Definition at line 718 of file MooseApp.C.

719 {
720  return MOOSE_VERSION;
721 }

◆ 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 324 of file MooseApp.h.

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

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

◆ getInputFileNames()

const std::vector< std::string > & MooseApp::getInputFileNames ( ) const
Returns
the input file names set in the Parser

Definition at line 1098 of file MooseApp.C.

Referenced by ConsoleUtils::outputFrameworkInformation(), Console::outputInput(), and setupOptions().

1099 {
1100  mooseAssert(_parser, "Parser is not set");
1101  return _parser->getInputFileNames();
1102 }
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
Definition: MooseApp.h:1185

◆ getInputParameterWarehouse()

InputParameterWarehouse & MooseApp::getInputParameterWarehouse ( )

◆ getInstallableInputs()

std::string MooseApp::getInstallableInputs ( ) const
privatevirtual

Method to retrieve the installable inputs from a given applications <app>Revision.h file.

Definition at line 1657 of file MooseApp.C.

Referenced by showInputs().

1658 {
1659  return "tests";
1660 }

◆ getInterfaceObjects()

template<class T >
const std::vector< T * > & MooseApp::getInterfaceObjects ( ) const

Gets the registered interface objects for a given interface.

For this to work, the interface must register itself using registerInterfaceObject.

Definition at line 1584 of file MooseApp.h.

Referenced by DeclareLateReportersAction::act(), ResolveOptionalMaterialPropertiesAction::act(), Coupleable::checkWritableVar(), PetscOutputInterface::petscLinearOutput(), PetscOutputInterface::petscNonlinearOutput(), and PetscOutput::solveSetup().

1585 {
1586  static_assert(!std::is_base_of<MooseObject, T>::value, "T is not an interface");
1587 
1588  const auto it = _interface_registry.find(typeid(T));
1589  if (it != _interface_registry.end())
1590  return static_cast<InterfaceRegistryObjects<T> *>(it->second.get())->_objects;
1591  const static std::vector<T *> empty;
1592  return empty;
1593 }
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
Registration for interface objects.
Definition: MooseApp.h:1502

◆ getLastInputFileName()

const std::string & MooseApp::getLastInputFileName ( ) const
Returns
The last input filename set (if any)

Definition at line 1105 of file MooseApp.C.

Referenced by setupOptions().

1106 {
1107  mooseAssert(_parser, "Parser is not set");
1108  return _parser->getLastInputFileName();
1109 }
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
Definition: MooseApp.h:1185

◆ getLibrarySearchPaths()

std::set< std::string > MooseApp::getLibrarySearchPaths ( const std::string &  library_path_from_param) const

Return the paths searched by MOOSE when loading libraries.

Definition at line 2280 of file MooseApp.C.

Referenced by dynamicAppRegistration(), and dynamicRegistration().

2281 {
2282  std::set<std::string> paths;
2283 
2284  if (!library_path.empty())
2285  {
2286  std::vector<std::string> tmp_paths;
2287  MooseUtils::tokenize(library_path, tmp_paths, 1, ":");
2288 
2289  paths.insert(tmp_paths.begin(), tmp_paths.end());
2290  }
2291 
2292  char * moose_lib_path_env = std::getenv("MOOSE_LIBRARY_PATH");
2293  if (moose_lib_path_env)
2294  {
2295  std::string moose_lib_path(moose_lib_path_env);
2296  std::vector<std::string> tmp_paths;
2297  MooseUtils::tokenize(moose_lib_path, tmp_paths, 1, ":");
2298 
2299  paths.insert(tmp_paths.begin(), tmp_paths.end());
2300  }
2301 
2302  return paths;
2303 }
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:812

◆ getLibtorchDevice()

torch::DeviceType MooseApp::getLibtorchDevice ( ) const
inline

Get the device torch is supposed to be running on.

Definition at line 90 of file MooseApp.h.

90 { return _libtorch_device; }
const torch::DeviceType _libtorch_device
The libtorch device this app is using.
Definition: MooseApp.h:1512

◆ getLoadedLibraryPaths()

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

Return the paths of loaded libraries.

Definition at line 2269 of file MooseApp.C.

Referenced by Factory::reportUnregisteredError().

2270 {
2271  // Return the paths but not the open file handles
2272  std::set<std::string> paths;
2273  for (const auto & it : _lib_handles)
2274  paths.insert(it.first);
2275 
2276  return paths;
2277 }
std::unordered_map< std::string, DynamicLibraryInfo > _lib_handles
The library archive (name only), registration method and the handle to the method.
Definition: MooseApp.h:1318

◆ getMeshGenerator()

const MeshGenerator& MooseApp::getMeshGenerator ( const std::string &  name) const
inline
Returns
The MeshGenerator with the name name.

Definition at line 886 of file MooseApp.h.

Referenced by MeshGenerator::generateInternal().

887  {
889  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
const MeshGenerator & getMeshGenerator(const std::string &name) const

◆ getMeshGeneratorMesh()

std::unique_ptr<MeshBase> MooseApp::getMeshGeneratorMesh ( )
inline
Returns
The final mesh generated by the mesh generator system

Definition at line 894 of file MooseApp.h.

895  {
897  }
std::unique_ptr< libMesh::MeshBase > getSavedMesh(const std::string &name)
Get the saved mesh by name.
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
static std::string mainMeshGeneratorName()
The name reserved for the "main" mesh generator which is the one used for the numerical solver downst...

◆ getMeshGeneratorNames()

std::vector<std::string> MooseApp::getMeshGeneratorNames ( ) const
inline
Returns
The names of all mesh generators

See MeshGeneratorSystem::getMeshGeneratorNames()

Definition at line 904 of file MooseApp.h.

Referenced by SetupMeshAction::act().

905  {
907  }
std::vector< std::string > getMeshGeneratorNames() const
Get names of all mesh generators Note: This function should be called after all mesh generators are a...
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467

◆ getMeshGeneratorSystem()

MeshGeneratorSystem& MooseApp::getMeshGeneratorSystem ( )
inline

◆ getMooseApp()

MooseApp& MooseBase::getMooseApp ( ) const
inlineinherited

◆ getNullExecutor()

NullExecutor* MooseApp::getNullExecutor ( ) const
inline

Definition at line 348 of file MooseApp.h.

Referenced by ExecutorInterface::getExecutor().

348 { return _null_executor.get(); }
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
Definition: MooseApp.h:1231

◆ getOutputFileBase()

std::string MooseApp::getOutputFileBase ( bool  for_non_moose_build_output = false) const

Get the output file base name.

Parameters
for_non_moose_build_outputTrue for getting the file base for outputs generated with Outputs/[outputname] input syntax.
Returns
The file base name used by output objects Note: for_non_moose_build_output does not affect the returned value when this is a subapp. for_non_moose_build_output also does not affect the returned value when Outputs/file_base parameter is available. When for_non_moose_build_output does affect the returned value, i.e. master without Outputs/file_base, the suffix _out is removed.

Definition at line 1112 of file MooseApp.C.

Referenced by getCheckpointDirectories(), OutputWarehouse::resetFileBase(), and MultiApp::setAppOutputFileBase().

1113 {
1114  if (_file_base_set_by_user || for_non_moose_build_output || _multiapp_level)
1115  return _output_file_base;
1116  else
1117  return _output_file_base + "_out";
1118 }
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition: MooseApp.h:1455
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition: MooseApp.h:1148
std::string _output_file_base
The output file basename.
Definition: MooseApp.h:1145

◆ getOutputFileNumbers()

const std::map<std::string, unsigned int>& MooseApp::getOutputFileNumbers ( ) const
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 563 of file MooseApp.h.

Referenced by TransientMultiApp::setupApp().

564  {
565  return _output_file_numbers;
566  }
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:1291

◆ getOutputPosition()

Point MooseApp::getOutputPosition ( ) const
inline

Get the output position.

Returns
The position offset for the output.

Definition at line 294 of file MooseApp.h.

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

294 { return _output_position; }
Point _output_position
The output position.
Definition: MooseApp.h:1154

◆ getOutputWarehouse() [1/2]

OutputWarehouse & MooseApp::getOutputWarehouse ( )

◆ getOutputWarehouse() [2/2]

const OutputWarehouse & MooseApp::getOutputWarehouse ( ) const

Definition at line 1854 of file MooseApp.C.

1855 {
1856  return _output_warehouse;
1857 }
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:1182

◆ 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 1523 of file MooseApp.h.

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

1524 {
1525  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
1526 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ getParam() [2/2]

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

Definition at line 1530 of file MooseApp.h.

1531 {
1532  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0), this);
1533 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ getPrintableName()

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

Get printable name of the application.

Definition at line 121 of file MooseApp.h.

Referenced by getPrintableVersion().

121 { return "Application"; }

◆ getPrintableVersion()

std::string MooseApp::getPrintableVersion ( ) const

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

Definition at line 730 of file MooseApp.C.

Referenced by setupOptions().

731 {
732  return getPrintableName() + " Version: " + getVersion();
733 }
virtual std::string getPrintableName() const
Get printable name of the application.
Definition: MooseApp.h:121
virtual std::string getVersion() const
Returns the current version of the framework or application (default: framework version).
Definition: MooseApp.C:724

◆ getRecoverableData()

const DataNames& MooseApp::getRecoverableData ( ) const
inline

Return a reference to the recoverable data object.

Returns
A const reference to the recoverable data

Definition at line 738 of file MooseApp.h.

Referenced by restore().

738 { return _recoverable_data_names; }
DataNames _recoverable_data_names
Data names that will only be read from the restart file during RECOVERY.
Definition: MooseApp.h:1197

◆ getRecoverFileBase()

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

Definition at line 518 of file MooseApp.h.

519  {
520  mooseDeprecated("MooseApp::getRecoverFileBase is deprecated, use "
521  "MooseApp::getRestartRecoverFileBase() instead.");
522  return _restart_recover_base;
523  }
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
Definition: MooseApp.h:1285
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353

◆ getRelationshipManagerInfo()

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

Returns the Relationship managers info suitable for printing.

Definition at line 2755 of file MooseApp.C.

Referenced by ConsoleUtils::outputRelationshipManagerInformation().

2756 {
2757  std::vector<std::pair<std::string, std::string>> info_strings;
2758  info_strings.reserve(_relationship_managers.size());
2759 
2760  for (const auto & rm : _relationship_managers)
2761  {
2762  std::stringstream oss;
2763  oss << rm->getInfo();
2764 
2765  auto & for_whom = rm->forWhom();
2766 
2767  if (!for_whom.empty())
2768  {
2769  oss << " for ";
2770 
2771  std::copy(for_whom.begin(), for_whom.end(), infix_ostream_iterator<std::string>(oss, ", "));
2772  }
2773 
2774  info_strings.emplace_back(std::make_pair(Moose::stringify(rm->getType()), oss.str()));
2775  }
2776 
2777  // List the libMesh GhostingFunctors - Not that in libMesh all of the algebraic and coupling
2778  // Ghosting Functors are also attached to the mesh. This should catch them all.
2779  const auto & mesh = _action_warehouse.getMesh();
2780  if (mesh)
2781  {
2782  // Let us use an ordered map to avoid stochastic console behaviors.
2783  // I believe we won't have many RMs, and there is no performance issue.
2784  // Deterministic behaviors are good for setting up regression tests
2785  std::map<std::string, unsigned int> counts;
2786 
2787  for (auto & gf : as_range(mesh->getMesh().ghosting_functors_begin(),
2788  mesh->getMesh().ghosting_functors_end()))
2789  {
2790  const auto * gf_ptr = dynamic_cast<const RelationshipManager *>(gf);
2791  if (!gf_ptr)
2792  // Count how many occurences of the same Ghosting Functor types we are encountering
2793  counts[demangle(typeid(*gf).name())]++;
2794  }
2795 
2796  for (const auto & pair : counts)
2797  info_strings.emplace_back(std::make_pair(
2798  "Default", pair.first + (pair.second > 1 ? " x " + std::to_string(pair.second) : "")));
2799  }
2800 
2801  // List the libMesh GhostingFunctors - Not that in libMesh all of the algebraic and coupling
2802  // Ghosting Functors are also attached to the mesh. This should catch them all.
2803  const auto & d_mesh = _action_warehouse.getDisplacedMesh();
2804  if (d_mesh)
2805  {
2806  // Let us use an ordered map to avoid stochastic console behaviors.
2807  // I believe we won't have many RMs, and there is no performance issue.
2808  // Deterministic behaviors are good for setting up regression tests
2809  std::map<std::string, unsigned int> counts;
2810 
2811  for (auto & gf : as_range(d_mesh->getMesh().ghosting_functors_begin(),
2812  d_mesh->getMesh().ghosting_functors_end()))
2813  {
2814  const auto * gf_ptr = dynamic_cast<const RelationshipManager *>(gf);
2815  if (!gf_ptr)
2816  // Count how many occurences of the same Ghosting Functor types we are encountering
2817  counts[demangle(typeid(*gf).name())]++;
2818  }
2819 
2820  for (const auto & pair : counts)
2821  info_strings.emplace_back(
2822  std::make_pair("Default",
2823  pair.first + (pair.second > 1 ? " x " + std::to_string(pair.second) : "") +
2824  " for DisplacedMesh"));
2825  }
2826 
2827  return info_strings;
2828 }
const std::shared_ptr< MooseMesh > & getMesh() const
MeshBase & mesh
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:62
std::string demangle(const char *name)
std::set< GhostingFunctor *>::const_iterator ghosting_functors_begin() const
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
const std::shared_ptr< MooseMesh > & getDisplacedMesh() const
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1297
std::set< GhostingFunctor *>::const_iterator ghosting_functors_end() const

◆ getReleationshipManagers()

const std::vector<std::shared_ptr<RelationshipManager> >& MooseApp::getReleationshipManagers ( )

Retrieve the relationship managers.

◆ getRenamedParam()

template<typename T >
const T & MooseApp::getRenamedParam ( const std::string &  old_name,
const std::string &  new_name 
) const

Retrieve a renamed parameter for the object.

This helper makes sure we check both names before erroring, and that only one parameter is passed to avoid silent errors

Parameters
old_namethe old name for the parameter
new_namethe new name for the parameter

Definition at line 1537 of file MooseApp.h.

1538 {
1539  // this enables having a default on the new parameter but bypassing it with the old one
1540  // Most important: accept new parameter
1541  if (isParamSetByUser(new_name) && !isParamValid(old_name))
1542  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), this);
1543  // Second most: accept old parameter
1544  else if (isParamValid(old_name) && !isParamSetByUser(new_name))
1545  return InputParameters::getParamHelper(old_name, _pars, static_cast<T *>(0), this);
1546  // Third most: accept default for new parameter
1547  else if (isParamValid(new_name) && !isParamValid(old_name))
1548  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), this);
1549  // Refuse: no default, no value passed
1550  else if (!isParamValid(old_name) && !isParamValid(new_name))
1551  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
1552  "' is being retrieved without being set.\n"
1553  "Did you mispell it?");
1554  // Refuse: both old and new parameters set by user
1555  else
1556  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
1557  "' may not be provided alongside former parameter '" + old_name + "'");
1558 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:191
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
std::string blockFullpath() const
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)

◆ getRestartableData() [1/2]

const std::vector<RestartableDataMap>& MooseApp::getRestartableData ( ) const
inline

Return reference to the restartable data object.

Returns
A reference to the restartable data object

Definition at line 704 of file MooseApp.h.

704 { return _restartable_data; }
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1191

◆ getRestartableData() [2/2]

std::vector<RestartableDataMap>& MooseApp::getRestartableData ( )
inline

Definition at line 705 of file MooseApp.h.

705 { return _restartable_data; }
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1191

◆ getRestartableDataMap()

RestartableDataMap & MooseApp::getRestartableDataMap ( const RestartableDataMapName name)

Return a reference to restartable data for the specific type flag.

Definition at line 2863 of file MooseApp.C.

Referenced by getRestartableMetaData(), possiblyLoadRestartableMetaData(), and writeRestartableMetaData().

2864 {
2865  auto iter = _restartable_meta_data.find(name);
2866  if (iter == _restartable_meta_data.end())
2867  mooseError("Unable to find RestartableDataMap object for the supplied name '",
2868  name,
2869  "', did you call registerRestartableDataMapName in the application constructor?");
2870  return iter->second.first;
2871 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57

◆ getRestartableDataMapBegin()

auto MooseApp::getRestartableDataMapBegin ( )
inline

Iterator based access to the extra RestartableDataMap objects; see Checkpoint.C for use case.

These are MOOSE internal functions and should not be used otherwise.

Definition at line 1069 of file MooseApp.h.

Referenced by SetupDebugAction::act().

1069 { return _restartable_meta_data.begin(); }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442

◆ getRestartableDataMapEnd()

auto MooseApp::getRestartableDataMapEnd ( )
inline

Definition at line 1071 of file MooseApp.h.

Referenced by SetupDebugAction::act().

1071 { return _restartable_meta_data.end(); }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442

◆ getRestartableDataMapName()

const std::string & MooseApp::getRestartableDataMapName ( const RestartableDataMapName name) const
Returns
The output name for the restartable data with name name

Definition at line 2890 of file MooseApp.C.

Referenced by possiblyLoadRestartableMetaData(), and writeRestartableMetaData().

2891 {
2892  const auto it = _restartable_meta_data.find(name);
2893  if (it == _restartable_meta_data.end())
2894  mooseError("MooseApp::getRestartableDataMapName: The name '", name, "' is not registered");
2895  return it->second.second;
2896 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57

◆ getRestartableMetaData()

RestartableDataValue & MooseApp::getRestartableMetaData ( const std::string &  name,
const RestartableDataMapName metaname,
THREAD_ID  tid 
)

Definition at line 1950 of file MooseApp.C.

Referenced by MeshMetaDataInterface::getMeshPropertyInternal(), and MeshGenerator::setMeshPropertyHelper().

1953 {
1954  if (tid != 0)
1955  mooseError(
1956  "The meta data storage for '", metaname, "' is not threaded, so the tid must be zero.");
1957 
1958  // Get metadata reference from RestartableDataMap and return a (non-const) reference to its value
1959  auto & restartable_data_map = getRestartableDataMap(metaname);
1960  RestartableDataValue * const data = restartable_data_map.findData(name);
1961  if (!data)
1962  mooseError("Unable to find RestartableDataValue object with name " + name +
1963  " in RestartableDataMap");
1964 
1965  return *data;
1966 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
RestartableDataMap & getRestartableDataMap(const RestartableDataMapName &name)
Return a reference to restartable data for the specific type flag.
Definition: MooseApp.C:2863
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
Abstract definition of a RestartableData value.

◆ getRestartRecoverFileBase()

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

The file_base for the recovery file.

Definition at line 517 of file MooseApp.h.

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

517 { return _restart_recover_base; }
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
Definition: MooseApp.h:1285

◆ getRMClone()

RelationshipManager & MooseApp::getRMClone ( const RelationshipManager template_rm,
const MeshBase mesh 
) const
private

Return the relationship manager clone originally created from the provided template relationship manager and mesh.

Definition at line 2517 of file MooseApp.C.

Referenced by removeRelationshipManager().

2518 {
2519  auto outer_it = _template_to_clones.find(&template_rm);
2520  if (outer_it == _template_to_clones.end())
2521  mooseError("The template rm does not exist in our _template_to_clones map");
2522 
2523  auto & mesh_to_clone_map = outer_it->second;
2524  auto inner_it = mesh_to_clone_map.find(&mesh);
2525  if (inner_it == mesh_to_clone_map.end())
2526  mooseError("We should have the mesh key in our mesh");
2527 
2528  return *inner_it->second;
2529 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::map< const RelationshipManager *, std::map< const MeshBase *, std::unique_ptr< RelationshipManager > > > _template_to_clones
Map from a template relationship manager to a map in which the key-value pairs represent the MeshBase...
Definition: MooseApp.h:1499

◆ getStartTime()

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

Definition at line 312 of file MooseApp.h.

Referenced by FEProblemBase::initialSetup(), and TransientBase::TransientBase().

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

◆ getSystemInfo()

const SystemInfo* MooseApp::getSystemInfo ( ) const
inline

Get SystemInfo object.

Returns
A pointer to the SystemInformation object

Definition at line 578 of file MooseApp.h.

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

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

◆ getVersion()

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

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

Definition at line 724 of file MooseApp.C.

Referenced by getPrintableVersion(), and ExodusFormatter::printInputFile().

725 {
726  return MOOSE_VERSION;
727 }

◆ hasInitialBackup()

bool MooseApp::hasInitialBackup ( ) const
inline
Returns
Whether or not this app currently has an "initial" backup

See _initial_backup and restoreFromInitialBackup() for more info.

Definition at line 1037 of file MooseApp.h.

Referenced by FEProblemBase::initialSetup(), and restoreFromInitialBackup().

1038  {
1039  return _initial_backup != nullptr && *_initial_backup != nullptr;
1040  }
std::unique_ptr< Backup > *const _initial_backup
The backup for use in initial setup; this will get set from the _initial_backup input parameter that ...
Definition: MooseApp.h:1508

◆ hasMeshGenerator()

bool MooseApp::hasMeshGenerator ( const MeshGeneratorName &  name) const
inline
Returns
Whether or not a mesh generator exists with the name name.

Definition at line 878 of file MooseApp.h.

879  {
881  }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1467
bool hasMeshGenerator(const MeshGeneratorName &name) const

◆ hasOutputPosition()

bool MooseApp::hasOutputPosition ( ) const
inline

Whether or not an output position has been set.

Returns
True if it has

Definition at line 288 of file MooseApp.h.

Referenced by Exodus::output().

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

◆ hasRecoverFileBase()

bool MooseApp::hasRecoverFileBase ( ) const

Definition at line 1261 of file MooseApp.C.

1262 {
1263  mooseDeprecated("MooseApp::hasRecoverFileBase is deprecated, use "
1264  "MooseApp::hasRestartRecoverFileBase() instead.");
1265  return !_restart_recover_base.empty();
1266 }
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
Definition: MooseApp.h:1285
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353

◆ hasRelationshipManager()

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

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

Definition at line 2404 of file MooseApp.C.

2405 {
2406  return std::find_if(_relationship_managers.begin(),
2407  _relationship_managers.end(),
2408  [&name](const std::shared_ptr<RelationshipManager> & rm)
2409  { return rm->name() == name; }) != _relationship_managers.end();
2410 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1297

◆ hasRestartableDataMap()

bool MooseApp::hasRestartableDataMap ( const RestartableDataMapName name) const
Returns
Whether or not the restartable data has the given name registered.

Definition at line 2874 of file MooseApp.C.

2875 {
2876  return _restartable_meta_data.count(name);
2877 }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57

◆ hasRestartableMetaData()

bool MooseApp::hasRestartableMetaData ( const std::string &  name,
const RestartableDataMapName metaname 
) const

Definition at line 1940 of file MooseApp.C.

Referenced by MeshMetaDataInterface::hasMeshProperty().

1942 {
1943  auto it = _restartable_meta_data.find(metaname);
1944  if (it == _restartable_meta_data.end())
1945  return false;
1946  return it->second.first.hasData(name);
1947 }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57

◆ hasRestartRecoverFileBase()

bool MooseApp::hasRestartRecoverFileBase ( ) const

Return true if the recovery file base is set.

Definition at line 1255 of file MooseApp.C.

1256 {
1257  return !_restart_recover_base.empty();
1258 }
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
Definition: MooseApp.h:1285

◆ hasRMClone()

bool MooseApp::hasRMClone ( const RelationshipManager template_rm,
const MeshBase mesh 
) const
private
Returns
whether we have created any clones for the provided template relationship manager and mesh yet. This may be false for instance when we are in the initial add relationship manager stage and haven't attempted attaching any relationship managers to the mesh or dof map yet (which is when we generate the clones). It's also maybe possible that we've created a clone of a given template_rm but not for the provided mesh so we return false in that case as well

Definition at line 2509 of file MooseApp.C.

Referenced by removeRelationshipManager().

2510 {
2511  auto it = _template_to_clones.find(&template_rm);
2512  // C++ does short circuiting so we're safe here
2513  return (it != _template_to_clones.end()) && (it->second.find(&mesh) != it->second.end());
2514 }
std::map< const RelationshipManager *, std::map< const MeshBase *, std::unique_ptr< RelationshipManager > > > _template_to_clones
Map from a template relationship manager to a map in which the key-value pairs represent the MeshBase...
Definition: MooseApp.h:1499

◆ hasStartTime()

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

Definition at line 307 of file MooseApp.h.

Referenced by FEProblemBase::initialSetup(), and TransientBase::TransientBase().

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

◆ header()

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

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

Definition at line 2312 of file MooseApp.C.

Referenced by restore(), and setupOptions().

2313 {
2314  return std::string("");
2315 }

◆ isParamSetByUser()

bool MooseApp::isParamSetByUser ( const std::string &  nm) const
inline

Definition at line 193 of file MooseApp.h.

Referenced by copyInputs(), errorCheck(), getRenamedParam(), MooseApp(), runInputFile(), runInputs(), SetupMeshAction::setupMesh(), and setupOptions().

193 { return _pars.isParamSetByUser(nm); }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136

◆ isParamValid()

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

Definition at line 191 of file MooseApp.h.

Referenced by getRenamedParam(), MooseApp(), setupOptions(), and Output::setWallTimeIntervalFromCommandLineParam().

191 { return _pars.isParamValid(name); }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
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.

More specifically whether this has been restarted using the Problem/restart_file_base parameter. Note that this will only return true when doing checkpoint restart. This will be false if doing exodus restart. Finally this will never return true when isRecovering is true

Definition at line 1243 of file MooseApp.C.

Referenced by SetupMeshAction::act(), FEProblemBase::checkICRestartError(), MultiApp::createApp(), EigenProblem::execute(), FileOutput::FileOutput(), FullSolveMultiApp::FullSolveMultiApp(), Eigenvalue::init(), FEProblemBase::initialSetup(), TransientBase::preExecute(), TimeSequenceStepperBase::setupSequence(), and TransientMultiApp::solveStep().

1244 {
1245  return _restart;
1246 }
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:1273

◆ isSplitMesh()

bool MooseApp::isSplitMesh ( ) const

Whether or not this is a split mesh operation.

Definition at line 1249 of file MooseApp.C.

Referenced by MooseMesh::init().

1250 {
1251  return _split_mesh;
1252 }
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:1276

◆ isUltimateMaster()

bool MooseApp::isUltimateMaster ( ) const
inline

◆ libNameToAppName()

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

Converts a library name to an application name:

Definition at line 1876 of file MooseApp.C.

1877 {
1878  std::string app_name(library_name);
1879 
1880  // Strip off the leading "lib" and trailing ".la"
1881  if (pcrecpp::RE("lib(.+?)(?:-\\w+)?\\.la").Replace("\\1", &app_name) == 0)
1882  mooseError("Invalid library name: ", app_name);
1883 
1884  return MooseUtils::underscoreToCamelCase(app_name, true);
1885 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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:586

◆ loadLibraryAndDependencies()

void MooseApp::loadLibraryAndDependencies ( const std::string &  library_filename,
const libMesh::Parameters params,
bool  load_dependencies = true 
)
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 2119 of file MooseApp.C.

Referenced by dynamicRegistration().

2122 {
2123  std::string line;
2124  std::string dl_lib_filename;
2125 
2126  // This RE looks for absolute path libtool filenames (i.e. begins with a slash and ends with a
2127  // .la)
2128  pcrecpp::RE re_deps("(/\\S*\\.la)");
2129 
2130  std::ifstream la_handle(library_filename.c_str());
2131  if (la_handle.is_open())
2132  {
2133  while (std::getline(la_handle, line))
2134  {
2135  // Look for the system dependent dynamic library filename to open
2136  if (line.find("dlname=") != std::string::npos)
2137  // Magic numbers are computed from length of this string "dlname=' and line minus that
2138  // string plus quotes"
2139  dl_lib_filename = line.substr(8, line.size() - 9);
2140 
2141  if (line.find("dependency_libs=") != std::string::npos)
2142  {
2143  if (load_dependencies)
2144  {
2145  pcrecpp::StringPiece input(line);
2146  pcrecpp::StringPiece depend_library;
2147  while (re_deps.FindAndConsume(&input, &depend_library))
2148  // Recurse here to load dependent libraries in depth-first order
2149  loadLibraryAndDependencies(depend_library.as_string(), params, load_dependencies);
2150  }
2151 
2152  // There's only one line in the .la file containing the dependency libs so break after
2153  // finding it
2154  break;
2155  }
2156  }
2157  la_handle.close();
2158  }
2159 
2160  // This should only occur if we have static linkage.
2161  if (dl_lib_filename.empty())
2162  return;
2163 
2164  const auto & [dir, file_name] = MooseUtils::splitFileName(library_filename);
2165 
2166  // Time to load the library, First see if we've already loaded this particular dynamic library
2167  // 1) make sure we haven't already loaded this library
2168  // AND 2) make sure we have a library name (we won't for static linkage)
2169  // Note: Here was are going to assume uniqueness based on the filename alone. This has significant
2170  // implications for applications that have "diamond" inheritance of libraries (usually
2171  // modules). We will only load one of those libraries, versions be damned.
2172  auto dyn_lib_it = _lib_handles.find(file_name);
2173  if (dyn_lib_it == _lib_handles.end())
2174  {
2175  // Assemble the actual filename using the base path of the *.la file and the dl_lib_filename
2176  const auto dl_lib_full_path = MooseUtils::pathjoin(dir, dl_lib_filename);
2177 
2178  MooseUtils::checkFileReadable(dl_lib_full_path, false, /*throw_on_unreadable=*/true);
2179 
2180 #ifdef LIBMESH_HAVE_DLOPEN
2181  void * const lib_handle = dlopen(dl_lib_full_path.c_str(), RTLD_LAZY);
2182 #else
2183  void * const lib_handle = nullptr;
2184 #endif
2185 
2186  if (!lib_handle)
2187  mooseError("The library file \"",
2188  dl_lib_full_path,
2189  "\" exists and has proper permissions, but cannot by dynamically loaded.\nThis "
2190  "generally means that the loader was unable to load one or more of the "
2191  "dependencies listed in the supplied library (see otool or ldd).\n",
2192  dlerror());
2193 
2194  DynamicLibraryInfo lib_info;
2195  lib_info.library_handle = lib_handle;
2196  lib_info.full_path = library_filename;
2197 
2198  auto insert_ret = _lib_handles.insert(std::make_pair(file_name, lib_info));
2199  mooseAssert(insert_ret.second == true, "Error inserting into lib_handles map");
2200 
2201  dyn_lib_it = insert_ret.first;
2202  }
2203 
2204  // Library has been loaded, check to see if we've called the requested registration method
2205  const auto registration_method = params.get<std::string>("registration_method");
2206  auto & entry_sym_from_curr_lib = dyn_lib_it->second.entry_symbols;
2207 
2208  if (entry_sym_from_curr_lib.find(registration_method) == entry_sym_from_curr_lib.end())
2209  {
2210  // get the pointer to the method in the library. The dlsym()
2211  // function returns a null pointer if the symbol cannot be found,
2212  // we also explicitly set the pointer to NULL if dlsym is not
2213  // available.
2214 #ifdef LIBMESH_HAVE_DLOPEN
2215  void * registration_handle =
2216  dlsym(dyn_lib_it->second.library_handle, registration_method.c_str());
2217 #else
2218  void * registration_handle = nullptr;
2219 #endif
2220 
2221  if (registration_handle)
2222  {
2223  switch (params.get<RegistrationType>("reg_type"))
2224  {
2225  case APPLICATION:
2226  {
2227  using register_app_t = void (*)();
2228  register_app_t * const reg_ptr = reinterpret_cast<register_app_t *>(&registration_handle);
2229  (*reg_ptr)();
2230  break;
2231  }
2232  case REGALL:
2233  {
2234  using register_app_t = void (*)(Factory *, ActionFactory *, Syntax *);
2235  register_app_t * const reg_ptr = reinterpret_cast<register_app_t *>(&registration_handle);
2236  (*reg_ptr)(params.get<Factory *>("factory"),
2237  params.get<ActionFactory *>("action_factory"),
2238  params.get<Syntax *>("syntax"));
2239  break;
2240  }
2241  default:
2242  mooseError("Unhandled RegistrationType");
2243  }
2244 
2245  entry_sym_from_curr_lib.insert(registration_method);
2246  }
2247  else
2248  {
2249 
2250 #if defined(DEBUG) && defined(LIBMESH_HAVE_DLOPEN)
2251  // We found a dynamic library that doesn't have a dynamic
2252  // registration method in it. This shouldn't be an error, so
2253  // we'll just move on.
2254  if (!registration_handle)
2255  mooseWarning("Unable to find extern \"C\" method \"",
2256  registration_method,
2257  "\" in library: ",
2258  dyn_lib_it->first,
2259  ".\n",
2260  "This doesn't necessarily indicate an error condition unless you believe that "
2261  "the method should exist in that library.\n",
2262  dlerror());
2263 #endif
2264  }
2265  }
2266 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:336
std::pair< std::filesystem::path, std::filesystem::path > splitFileName(const T &full_file)
Function for splitting path and filename.
Definition: MooseUtils.h:256
const T & get(std::string_view) const
void loadLibraryAndDependencies(const std::string &library_filename, const libMesh::Parameters &params, bool load_dependencies=true)
Recursively loads libraries and dependencies in the proper order to fully register a MOOSE applicatio...
Definition: MooseApp.C:2119
Specialized factory for generic Action System objects.
Definition: ActionFactory.h:50
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:260
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:1445
std::unordered_map< std::string, DynamicLibraryInfo > _lib_handles
The library archive (name only), registration method and the handle to the method.
Definition: MooseApp.h:1318
std::filesystem::path pathjoin(const std::filesystem::path &p)
Definition: MooseUtils.C:59
Holding syntax for parsing input files.
Definition: Syntax.h:21
class infix_ostream_iterator if void
Definition: InfixIterator.h:26

◆ loadRestartableMetaData()

void MooseApp::loadRestartableMetaData ( const std::filesystem::path &  folder_base)

Loads all available restartable meta data if it is available with the folder base folder_base.

Definition at line 1984 of file MooseApp.C.

Referenced by SetupRecoverFileBaseAction::act().

1985 {
1986  for (const auto & name_map_pair : _restartable_meta_data)
1987  possiblyLoadRestartableMetaData(name_map_pair.first, folder_base);
1988 }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
void possiblyLoadRestartableMetaData(const RestartableDataMapName &name, const std::filesystem::path &folder_base)
Loads the restartable meta data for name if it is available with the folder base folder_base.
Definition: MooseApp.C:1969

◆ masterDisplacedMesh()

const MooseMesh* MooseApp::masterDisplacedMesh ( ) const
inline

Returns a pointer to the master displaced mesh.

Definition at line 847 of file MooseApp.h.

Referenced by SetupMeshAction::act().

847 { return _master_displaced_mesh; }
const MooseMesh *const _master_displaced_mesh
The displaced mesh from master app.
Definition: MooseApp.h:1464

◆ masterMesh()

const MooseMesh* MooseApp::masterMesh ( ) const
inline

Returns a pointer to the master mesh.

Definition at line 842 of file MooseApp.h.

Referenced by ExecuteMeshGenerators::act(), SetupMeshCompleteAction::act(), and SetupMeshAction::act().

842 { return _master_mesh; }
const MooseMesh *const _master_mesh
The mesh from master app.
Definition: MooseApp.h:1461

◆ metaDataFolderBase()

std::filesystem::path MooseApp::metaDataFolderBase ( const std::filesystem::path &  folder_base,
const std::string &  map_suffix 
)
static

The file suffix for meta data (header and data)

Definition at line 2485 of file MooseApp.C.

Referenced by possiblyLoadRestartableMetaData(), and writeRestartableMetaData().

2487 {
2488  return RestartableDataIO::restartableDataFolder(folder_base /
2489  std::filesystem::path("meta_data" + map_suffix));
2490 }
static std::filesystem::path restartableDataFolder(const std::filesystem::path &folder_base)

◆ multiAppLevel()

unsigned int MooseApp::multiAppLevel ( ) const
inline

The MultiApp Level.

Returns
The current number of levels from the master app

Definition at line 826 of file MooseApp.h.

Referenced by DefaultNonlinearConvergence::checkConvergence(), MultiApp::createApp(), OutputWarehouse::mooseConsole(), ConsoleUtils::outputFrameworkInformation(), and Console::write().

826 { 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:1455

◆ 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 832 of file MooseApp.h.

Referenced by FileOutput::FileOutput(), and Console::outputSystemInformation().

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

◆ name()

virtual const std::string& MooseBase::name ( ) const
inlinevirtualinherited

Get the name of the class.

Returns
The name of the class

Reimplemented in MooseVariableBase.

Definition at line 57 of file MooseBase.h.

Referenced by AddElementalFieldAction::act(), CopyNodalVarsAction::act(), AdaptivityAction::act(), AddTimeStepperAction::act(), DeprecatedBlockAction::act(), SetupTimeIntegratorAction::act(), AddActionComponentAction::act(), AddVariableAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), AddPeriodicBCAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), PhysicsComponentInterface::addComponent(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), Registry::addDataFilePath(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), addExecutor(), addExecutorParams(), FEProblemBase::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGIntegratedBC(), FEProblemBase::addHDGKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), FEProblemBase::addMeshDivision(), addMeshGenerator(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), FEProblemBase::addPostprocessor(), InitialConditionBase::addPostprocessorDependencyHelper(), UserObject::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), InitialConditionBase::addUserObjectDependencyHelper(), UserObject::addUserObjectDependencyHelper(), AuxKernelTempl< Real >::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), UserObject::addVectorPostprocessorDependencyHelper(), FVFluxKernel::adjustRMGhostLayers(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), appBinaryName(), appendMeshGenerator(), Registry::appNameFromAppPath(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), AuxKernelTempl< Real >::AuxKernelTempl(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularBase::buildFromFile(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), ParsedConvergence::checkConvergence(), DefaultNonlinearConvergence::checkConvergence(), FEProblemBase::checkDependMaterialsHelper(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), Material::checkMaterialProperty(), checkMetaDataIntegrity(), Damper::checkMinDamping(), Checkpoint::checkpointInfo(), Coupleable::checkWritableVar(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBaseParameterInterface::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), MultiApp::createApp(), createExecutors(), AddVariableAction::createInitialConditionAction(), MeshGeneratorSystem::createMeshGeneratorOrder(), createRecoverablePerfGraph(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), MaterialBase::declareADProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), Registry::determineDataFilePath(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), ElementValueSampler::ElementValueSampler(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), MooseBase::errorPrefix(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), RestartableDataReporter::execute(), PointValue::execute(), MultiAppNearestNodeTransfer::execute(), WebServerControl::execute(), MultiAppGeneralFieldTransfer::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), MultiApp::fillPositions(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionDT::FunctionDT(), FunctionIC::functionName(), FVFunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), MooseServer::gatherDocumentSymbols(), BoundaryDeletionGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), BreakMeshByBlockGenerator::generate(), GeneratedMeshGenerator::generate(), ParsedSubdomainMeshGenerator::generate(), ParsedExtraElementIDGenerator::generate(), StitchedMeshGenerator::generate(), XYDelaunayGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), MeshGenerator::generateInternal(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MultiApp::getBoundingBox(), getCheckpointDirectories(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getConvergence(), Registry::getDataFilePath(), UserObject::getDependObjects(), DistributionInterface::getDistribution(), FEProblemBase::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), getExecutor(), FEProblemBase::getExecutor(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SubProblem::getFunctor(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), AuxKernelTempl< Real >::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), FEProblemBase::getMaterial(), Material::getMaterialByName(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), AuxKernelTempl< Real >::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< Real >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), AuxKernelTempl< Real >::getMaterialPropertyOlder(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), ActionWarehouse::getMooseAppName(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), MooseServer::getObjectParameters(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), OutputWarehouse::getOutput(), getParam(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), getRestartableDataMap(), getRestartableDataMapName(), getRestartableMetaData(), FEProblemBase::getSampler(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), Terminator::handleMessage(), Control::hasControllableParameterByName(), FEProblemBase::hasConvergence(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), hasMeshGenerator(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), hasRelationshipManager(), hasRestartableDataMap(), hasRestartableMetaData(), FEProblemBase::hasUserObject(), IterationAdaptiveDT::init(), AddVariableAction::init(), AdvancedOutput::init(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), SideFVFluxBCIntegral::initialSetup(), SolutionScalarAux::initialSetup(), MultiAppProjectionTransfer::initialSetup(), NodalVariableValue::initialSetup(), Console::initialSetup(), SolutionUserObjectBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MeshGenerator::isChildMeshGenerator(), MeshGenerator::isNullMeshName(), isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), Marker::Marker(), MaterialBase::markMatPropRequested(), MatDiffusionBase< Real >::MatDiffusionBase(), Material::Material(), MaterialDerivativeTestKernelBase< Real >::MaterialDerivativeTestKernelBase(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), MeshGenerator::meshPropertyPrefix(), MooseApp(), OutputWarehouse::mooseConsole(), MooseVariableInterface< Real >::MooseVariableInterface(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), Registry::objData(), MeshGenerator::Comparator::operator()(), ProgressOutput::output(), DOFMapOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), MaterialOutputAction::outputHelper(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), Exodus::outputPostprocessors(), AdvancedOutput::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedExtraElementIDGenerator::ParsedExtraElementIDGenerator(), MooseServer::parseDocumentForDiagnostics(), ParsedODEKernel::ParsedODEKernel(), ParsedSubdomainMeshGenerator::ParsedSubdomainMeshGenerator(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), possiblyLoadRestartableMetaData(), PhysicsBase::prefix(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), Registry::registerObjectsTo(), FEProblemBase::registerRandomInterface(), registerRestartableDataMapName(), registerRestartableNameWithFilter(), GlobalParamsAction::remove(), MaterialBase::resetQpProperties(), MultiApp::restore(), runInputFile(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), GlobalParamsAction::setDoubleIndexParam(), OutputWarehouse::setFileNumbers(), GlobalParamsAction::setParam(), FEProblemBase::setPostprocessorValueByName(), FEProblemBase::setResidualObjectParamsAndLog(), GlobalParamsAction::setScalarParam(), MooseMesh::setSubdomainName(), GlobalParamsAction::setTripleIndexParam(), NodeSetsGeneratorBase::setup(), Split::setup(), SideSetsGeneratorBase::setup(), TransientMultiApp::setupApp(), GlobalParamsAction::setVectorParam(), FullSolveMultiApp::showStatusMessage(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), MaterialBase::subdomainSetup(), TaggingInterface::TaggingInterface(), VectorPostprocessorVisualizationAux::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), TransientMultiApp::TransientMultiApp(), MooseServer::traverseParseTreeAndFillSymbols(), MooseBase::typeAndName(), MooseBaseParameterInterface::uniqueParameterName(), FVFluxBC::uOnGhost(), FVFluxBC::uOnUSub(), UserObject::UserObject(), UserObjectInterface::userObjectName(), ParsedAux::validateGenericVectorNames(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), Convergence::verboseOutput(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), and writeRestartableMetaData().

57 { return _name; }
const std::string _name
The name of this class.
Definition: MooseBase.h:90

◆ parameters()

InputParameters& MooseApp::parameters ( )
inline

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 147 of file MooseApp.h.

Referenced by MeshOnlyAction::act(), SplitMeshAction::act(), CommonOutputAction::act(), MeshGeneratorSystem::hasDataDrivenAllowed(), MooseApp(), ConsoleUtils::outputLegacyInformation(), MooseServer::parseDocumentForDiagnostics(), and NonlinearSystemBase::shouldEvaluatePreSMOResidual().

147 { return _pars; }
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136

◆ parser()

Parser & MooseApp::parser ( )
Returns
The Parser

Definition at line 1422 of file MooseApp.C.

Referenced by ActionFactory::create().

1423 {
1424  mooseAssert(_parser, "Not set");
1425  return *_parser;
1426 }
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
Definition: MooseApp.h:1185

◆ perfGraph()

PerfGraph& MooseApp::perfGraph ( )
inline

Get the PerfGraph for this app.

Definition at line 158 of file MooseApp.h.

Referenced by PerfGraphInterface::perfGraph().

158 { return _perf_graph; }
PerfGraph & _perf_graph
The PerfGraph object for this application (recoverable)
Definition: MooseApp.h:1200

◆ possiblyLoadRestartableMetaData()

void MooseApp::possiblyLoadRestartableMetaData ( const RestartableDataMapName name,
const std::filesystem::path &  folder_base 
)

Loads the restartable meta data for name if it is available with the folder base folder_base.

Definition at line 1969 of file MooseApp.C.

Referenced by FileMesh::buildMesh(), FileMeshGenerator::generate(), and loadRestartableMetaData().

1971 {
1972  const auto & map_name = getRestartableDataMapName(name);
1973  const auto meta_data_folder_base = metaDataFolderBase(folder_base, map_name);
1974  if (RestartableDataReader::isAvailable(meta_data_folder_base))
1975  {
1977  reader.setErrorOnLoadWithDifferentNumberOfProcessors(false);
1978  reader.setInput(meta_data_folder_base);
1979  reader.restore();
1980  }
1981 }
Reader for restartable data written by the RestartableDataWriter.
static std::filesystem::path metaDataFolderBase(const std::filesystem::path &folder_base, const std::string &map_suffix)
The file suffix for meta data (header and data)
Definition: MooseApp.C:2485
RestartableDataMap & getRestartableDataMap(const RestartableDataMapName &name)
Return a reference to restartable data for the specific type flag.
Definition: MooseApp.C:2863
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & getRestartableDataMapName(const RestartableDataMapName &name) const
Definition: MooseApp.C:2890
static bool isAvailable(const std::filesystem::path &folder_base)

◆ postRestore()

virtual void MooseApp::postRestore ( const bool  )
inlinevirtual

Insertion point for other apps that is called after restore()

Parameters
for_restartWhether this restoration is explicitly for the first restoration of restart data

Definition at line 790 of file MooseApp.h.

Referenced by restore().

790 {}

◆ preBackup()

virtual void MooseApp::preBackup ( )
inlinevirtual

Insertion point for other apps that is called before backup()

Definition at line 756 of file MooseApp.h.

Referenced by backup().

756 {}

◆ processor_id()

processor_id_type MooseApp::processor_id ( ) const
inline

Returns the MPI processor ID of the current processor.

Definition at line 434 of file MooseApp.h.

Referenced by MooseApp(), restartFolderBase(), FileOutput::setFileBaseInternal(), and writeRestartableMetaData().

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

◆ rankMap()

const RankMap& MooseApp::rankMap ( )
inline

The RankMap is a useful object for determining how the processes are laid out on the physical nodes of the cluster.

Definition at line 153 of file MooseApp.h.

153 { return _rank_map; }
const RankMap _rank_map
The RankMap is a useful object for determining how the processes are laid out on the physical hardwar...
Definition: MooseApp.h:1206

◆ recursivelyCreateExecutors()

void MooseApp::recursivelyCreateExecutors ( const std::string &  current_executor_name,
std::list< std::string > &  possible_roots,
std::list< std::string > &  current_branch 
)
private

Internal function used to recursively create the executor objects.

Called by createExecutors

Parameters
current_executor_nameThe name of the executor currently needing to be built
possible_rootsThe names of executors that are currently candidates for being the root

Definition at line 1429 of file MooseApp.C.

Referenced by createExecutors().

1432 {
1433  // Did we already make this one?
1434  if (_executors.find(current_executor_name) != _executors.end())
1435  return;
1436 
1437  // Is this one already on the current branch (i.e. there is a cycle)
1438  if (std::find(current_branch.begin(), current_branch.end(), current_executor_name) !=
1439  current_branch.end())
1440  {
1441  std::stringstream exec_names_string;
1442 
1443  auto branch_it = current_branch.begin();
1444 
1445  exec_names_string << *branch_it++;
1446 
1447  for (; branch_it != current_branch.end(); ++branch_it)
1448  exec_names_string << ", " << *branch_it;
1449 
1450  exec_names_string << ", " << current_executor_name;
1451 
1452  mooseError("Executor cycle detected: ", exec_names_string.str());
1453  }
1454 
1455  current_branch.push_back(current_executor_name);
1456 
1457  // Build the dependencies first
1458  const auto & params = *_executor_params[current_executor_name].second;
1459 
1460  for (const auto & param : params)
1461  {
1462  if (params.have_parameter<ExecutorName>(param.first))
1463  {
1464  const auto & dependency_name = params.get<ExecutorName>(param.first);
1465 
1466  possible_roots.remove(dependency_name);
1467 
1468  if (!dependency_name.empty())
1469  recursivelyCreateExecutors(dependency_name, possible_roots, current_branch);
1470  }
1471  }
1472 
1473  // Add this Executor
1474  const auto & type = _executor_params[current_executor_name].first;
1475  addExecutor(type, current_executor_name, params);
1476 
1477  current_branch.pop_back();
1478 }
std::unordered_map< std::string, std::pair< std::string, std::unique_ptr< InputParameters > > > _executor_params
Used in building the Executors Maps the name of the Executor block to the <type, params> ...
Definition: MooseApp.h:1220
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void recursivelyCreateExecutors(const std::string &current_executor_name, std::list< std::string > &possible_roots, std::list< std::string > &current_branch)
Internal function used to recursively create the executor objects.
Definition: MooseApp.C:1429
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
Definition: MooseApp.h:1215
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void addExecutor(const std::string &type, const std::string &name, const InputParameters &params)
Definition: MooseApp.C:1402

◆ registerInterfaceObject()

template<class T >
void MooseApp::registerInterfaceObject ( T &  interface)

Registers an interface object for accessing with getInterfaceObjects.

This should be called within the constructor of the interface in interest.

Definition at line 1562 of file MooseApp.h.

Referenced by Coupleable::Coupleable(), MaterialPropertyInterface::MaterialPropertyInterface(), PetscOutputInterface::PetscOutputInterface(), and Reporter::Reporter().

1563 {
1564  static_assert(!std::is_base_of<MooseObject, T>::value, "T is not an interface");
1565 
1566  InterfaceRegistryObjects<T> * registry = nullptr;
1567  auto it = _interface_registry.find(typeid(T));
1568  if (it == _interface_registry.end())
1569  {
1570  auto new_registry = std::make_unique<InterfaceRegistryObjects<T>>();
1571  registry = new_registry.get();
1572  _interface_registry.emplace(typeid(T), std::move(new_registry));
1573  }
1574  else
1575  registry = static_cast<InterfaceRegistryObjects<T> *>(it->second.get());
1576 
1577  mooseAssert(std::count(registry->_objects.begin(), registry->_objects.end(), &interface) == 0,
1578  "Interface already registered");
1579  registry->_objects.push_back(&interface);
1580 }
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
Registration for interface objects.
Definition: MooseApp.h:1502

◆ registerRestartableData() [1/2]

RestartableDataValue & MooseApp::registerRestartableData ( std::unique_ptr< RestartableDataValue data,
THREAD_ID  tid,
bool  read_only,
const RestartableDataMapName metaname = "" 
)

Definition at line 1888 of file MooseApp.C.

Referenced by createRecoverablePerfGraph(), createRecoverableSolutionInvalidity(), MeshGenerator::declareMeshProperty(), ReporterData::getRestartableDataHelper(), and Restartable::registerRestartableDataOnApp().

1892 {
1893  if (!metaname.empty() && tid != 0)
1894  mooseError(
1895  "The meta data storage for '", metaname, "' is not threaded, so the tid must be zero.");
1896 
1897  mooseAssert(metaname.empty() ||
1898  _restartable_meta_data.find(metaname) != _restartable_meta_data.end(),
1899  "The desired meta data name does not exist: " + metaname);
1900 
1901  // Select the data store for saving this piece of restartable data (mesh or everything else)
1902  auto & data_map =
1903  metaname.empty() ? _restartable_data[tid] : _restartable_meta_data[metaname].first;
1904 
1905  RestartableDataValue * stored_data = data_map.findData(data->name());
1906  if (stored_data)
1907  {
1908  if (data->typeId() != stored_data->typeId())
1909  mooseError("Type mismatch found in RestartableData registration of '",
1910  data->name(),
1911  "'\n\n Stored type: ",
1912  stored_data->type(),
1913  "\n New type: ",
1914  data->type());
1915  }
1916  else
1917  stored_data = &data_map.addData(std::move(data));
1918 
1919  if (!read_only)
1920  stored_data->setDeclared({});
1921 
1922  return *stored_data;
1923 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::type_info & typeId() const =0
The type ID of the underlying data.
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1191
virtual std::string type() const =0
String identifying the type of parameter stored.
void setDeclared(const SetDeclaredKey)
Sets that this restartable value has been declared.
Abstract definition of a RestartableData value.

◆ registerRestartableData() [2/2]

RestartableDataValue& MooseApp::registerRestartableData ( const std::string &  name,
std::unique_ptr< RestartableDataValue data,
THREAD_ID  tid,
bool  read_only,
const RestartableDataMapName metaname = "" 
)

◆ registerRestartableDataMapName()

void MooseApp::registerRestartableDataMapName ( const RestartableDataMapName name,
std::string  suffix = "" 
)

Reserve a location for storing custom RestartableDataMap objects.

This should be called in the constructor of an application.

Parameters
nameA key to use for accessing the data object
suffixThe suffix to use when appending to checkpoint output, if not supplied the given name is used to generate the suffix (MyMetaData -> _mymetadata)

Definition at line 2880 of file MooseApp.C.

Referenced by MooseApp().

2881 {
2882  if (!suffix.empty())
2883  std::transform(suffix.begin(), suffix.end(), suffix.begin(), ::tolower);
2884  suffix.insert(0, "_");
2885  _restartable_meta_data.emplace(
2886  std::make_pair(name, std::make_pair(RestartableDataMap(), suffix)));
2887 }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
Storage for restartable data that is ordered based on insertion order.

◆ registerRestartableNameWithFilter()

void MooseApp::registerRestartableNameWithFilter ( const std::string &  name,
Moose::RESTARTABLE_FILTER  filter 
)
protected

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

Register a piece of restartable data that will be used in a filter in/out during deserialization. Note however that this data will always be written to the restart file.

Parameters
nameThe full (unique) name.
filterThe filter name where to direct the name

Definition at line 1269 of file MooseApp.C.

Referenced by createRecoverablePerfGraph(), createRecoverableSolutionInvalidity(), and Restartable::registerRestartableNameWithFilterOnApp().

1271 {
1273  switch (filter)
1274  {
1275  case RESTARTABLE_FILTER::RECOVERABLE:
1276  _recoverable_data_names.insert(name);
1277  break;
1278  default:
1279  mooseError("Unknown filter");
1280  }
1281 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
Definition: MooseTypes.h:785
DataNames _recoverable_data_names
Data names that will only be read from the restart file during RECOVERY.
Definition: MooseApp.h:1197

◆ registerTimedSection() [1/2]

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

Call to register a named section for timing.

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

Definition at line 53 of file PerfGraphInterface.C.

55 {
56  const auto timed_section_name = timedSectionName(section_name);
57  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
58  return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
59  else
60  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
61 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 64 of file PerfGraphInterface.C.

68 {
69  const auto timed_section_name = timedSectionName(section_name);
70  if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
72  timedSectionName(section_name), level, live_message, print_dots);
73  else
74  return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
75 }
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID The name of the section.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ relationshipManagers()

const std::set<std::shared_ptr<RelationshipManager> >& MooseApp::relationshipManagers ( ) const
inline

Return the container of relationship managers.

Definition at line 1053 of file MooseApp.h.

Referenced by NumRelationshipManagers::getValue().

1054  {
1055  return _relationship_managers;
1056  }
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1297

◆ removeRelationshipManager()

void MooseApp::removeRelationshipManager ( std::shared_ptr< RelationshipManager relationship_manager)
private

Purge this relationship manager from meshes and DofMaps and finally from us.

This method is private because only this object knows when we should remove relationship managers: when we are adding relationship managers to this object's storage, we perform an operator>= comparison between our existing RMs and the RM we are trying to add. If any comparison returns true, we do not add the new RM because the comparison indicates that we would gain no new coverage. However, if no comparison return true, then we add the new RM and we turn the comparison around! Consequently if our new RM is >= than any of our preexisting RMs, we remove those preexisting RMs using this method

Definition at line 2532 of file MooseApp.C.

Referenced by addRelationshipManager().

2533 {
2534  auto * const mesh = _action_warehouse.mesh().get();
2535  if (!mesh)
2536  mooseError("The MooseMesh should exist");
2537 
2538  const MeshBase * const undisp_lm_mesh = mesh->getMeshPtr();
2539  RelationshipManager * undisp_clone = nullptr;
2540  if (undisp_lm_mesh && hasRMClone(*rm, *undisp_lm_mesh))
2541  {
2542  undisp_clone = &getRMClone(*rm, *undisp_lm_mesh);
2543  const_cast<MeshBase *>(undisp_lm_mesh)->remove_ghosting_functor(*undisp_clone);
2544  }
2545 
2546  auto & displaced_mesh = _action_warehouse.displacedMesh();
2547  MeshBase * const disp_lm_mesh = displaced_mesh ? &displaced_mesh->getMesh() : nullptr;
2548  RelationshipManager * disp_clone = nullptr;
2549  if (disp_lm_mesh && hasRMClone(*rm, *disp_lm_mesh))
2550  {
2551  disp_clone = &getRMClone(*rm, *disp_lm_mesh);
2552  disp_lm_mesh->remove_ghosting_functor(*disp_clone);
2553  }
2554 
2555  if (_executioner)
2556  {
2557  auto & problem = feProblem();
2558  if (undisp_clone)
2559  {
2560  problem.removeAlgebraicGhostingFunctor(*undisp_clone);
2561  problem.removeCouplingGhostingFunctor(*undisp_clone);
2562  }
2563 
2564  auto * dp = problem.getDisplacedProblem().get();
2565  if (dp && disp_clone)
2566  dp->removeAlgebraicGhostingFunctor(*disp_clone);
2567  }
2568 
2569  _factory.releaseSharedObjects(*rm);
2570  _relationship_managers.erase(rm);
2571 }
bool hasRMClone(const RelationshipManager &template_rm, const MeshBase &mesh) const
Definition: MooseApp.C:2509
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::shared_ptr< MooseMesh > & displacedMesh()
RelationshipManager & getRMClone(const RelationshipManager &template_rm, const MeshBase &mesh) const
Return the relationship manager clone originally created from the provided template relationship mana...
Definition: MooseApp.C:2517
void remove_ghosting_functor(GhostingFunctor &ghosting_functor)
MeshBase & mesh
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
FEProblemBase & feProblem() const
Definition: MooseApp.C:1396
std::shared_ptr< MooseMesh > & mesh()
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1297
Factory _factory
Definition: MooseApp.h:1250

◆ restartFolderBase()

std::filesystem::path MooseApp::restartFolderBase ( const std::filesystem::path &  folder_base) const

The file suffix for restartable data.

Definition at line 2493 of file MooseApp.C.

Referenced by FEProblemBase::initialSetup(), and Checkpoint::output().

2494 {
2495  auto folder = folder_base;
2496  folder += "-restart-" + std::to_string(processor_id());
2498 }
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Definition: MooseApp.h:434
static std::filesystem::path restartableDataFolder(const std::filesystem::path &folder_base)

◆ restore() [1/2]

void MooseApp::restore ( const std::filesystem::path &  folder_base,
const bool  for_restart 
)

Restore an application from file.

Parameters
folder_baseThe backup folder base
for_restartWhether this restoration is explicitly for the first restoration of restart data

You must call finalizeRestore() after this in order to finalize the restoration. The restore process is kept open in order to restore additional data after the initial restore (that is, the restoration of data that has already been declared).

Definition at line 1310 of file MooseApp.C.

Referenced by FEProblemBase::initialSetup(), and restoreFromInitialBackup().

1311 {
1312  TIME_SECTION("restore", 2, "Restoring Application from File");
1313 
1314  const DataNames filter_names = for_restart ? getRecoverableData() : DataNames{};
1315 
1316  _rd_reader.setInput(folder_base);
1317  _rd_reader.restore(filter_names);
1318 
1319  postRestore(for_restart);
1320 }
void setInput(std::unique_ptr< std::stringstream > header_stream, std::unique_ptr< std::stringstream > data_stream)
Sets the input stream for reading from the stringstreams header_stream and data_stream for the header...
RestartableDataReader _rd_reader
Definition: MooseApp.h:1472
virtual void postRestore(const bool)
Insertion point for other apps that is called after restore()
Definition: MooseApp.h:790
std::unordered_set< std::string > DataNames
void restore(const DataNames &filter_names={})
Restores the restartable data.
const DataNames & getRecoverableData() const
Return a reference to the recoverable data object.
Definition: MooseApp.h:738

◆ restore() [2/2]

void MooseApp::restore ( std::unique_ptr< Backup backup,
const bool  for_restart 
)

Restore an application from the backup backup.

Parameters
backupThe backup
for_restartWhether this restoration is explicitly for the first restoration of restart data

You must call finalizeRestore() after this in order to finalize the restoration. The restore process is kept open in order to restore additional data after the initial restore (that is, the restoration of data that has already been declared).

Definition at line 1323 of file MooseApp.C.

1324 {
1325  TIME_SECTION("restore", 2, "Restoring Application");
1326 
1327  const DataNames filter_names = for_restart ? getRecoverableData() : DataNames{};
1328 
1329  if (!backup)
1330  mooseError("MooseApp::resore(): Provided backup is not initialized");
1331 
1332  auto header = std::move(backup->header);
1333  mooseAssert(header, "Header not available");
1334 
1335  auto data = std::move(backup->data);
1336  mooseAssert(data, "Data not available");
1337 
1338  _rd_reader.setInput(std::move(header), std::move(data));
1339  _rd_reader.restore(filter_names);
1340 
1341  postRestore(for_restart);
1342 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void setInput(std::unique_ptr< std::stringstream > header_stream, std::unique_ptr< std::stringstream > data_stream)
Sets the input stream for reading from the stringstreams header_stream and data_stream for the header...
RestartableDataReader _rd_reader
Definition: MooseApp.h:1472
virtual void postRestore(const bool)
Insertion point for other apps that is called after restore()
Definition: MooseApp.h:790
std::unique_ptr< Backup > backup()
Backs up the application memory in a Backup.
Definition: MooseApp.C:1295
virtual std::string header() const
Returns a string to be printed at the beginning of a simulation.
Definition: MooseApp.C:2312
std::unordered_set< std::string > DataNames
void restore(const DataNames &filter_names={})
Restores the restartable data.
const DataNames & getRecoverableData() const
Return a reference to the recoverable data object.
Definition: MooseApp.h:738

◆ restoreFromInitialBackup()

void MooseApp::restoreFromInitialBackup ( const bool  for_restart)

Restores from a "initial" backup, that is, one set in _initial_backup.

Parameters
for_restartWhether this restoration is explicitly for the first restoration of restart data

This is only used for restoration of multiapp subapps, which have been given a Backup from their parent on initialization. Said Backup is passed to this app via the "_initial_backup" private input parameter.

See restore() for more information

Definition at line 1345 of file MooseApp.C.

Referenced by FEProblemBase::initialSetup().

1346 {
1347  mooseAssert(hasInitialBackup(), "Missing initial backup");
1348  restore(std::move(*_initial_backup), for_restart);
1349 }
bool hasInitialBackup() const
Definition: MooseApp.h:1037
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
Definition: MooseApp.C:1310
std::unique_ptr< Backup > *const _initial_backup
The backup for use in initial setup; this will get set from the _initial_backup input parameter that ...
Definition: MooseApp.h:1508

◆ run()

void MooseApp::run ( )
virtual

Run the application.

Definition at line 1564 of file MooseApp.C.

1565 {
1566  TIME_SECTION("run", 3);
1567  if (getParam<bool>("show_docs"))
1568  {
1569  auto binname = appBinaryName();
1570  if (binname == "")
1571  mooseError("could not locate installed tests to run (unresolved binary/app name)");
1572  auto docspath = MooseUtils::docsDir(binname);
1573  if (docspath == "")
1574  mooseError("no installed documentation found");
1575 
1576  auto docmsgfile = MooseUtils::pathjoin(docspath, "docmsg.txt");
1577  std::string docmsg = "file://" + MooseUtils::realpath(docspath) + "/index.html";
1578  if (MooseUtils::pathExists(docmsgfile) && MooseUtils::checkFileReadable(docmsgfile))
1579  {
1580  std::ifstream ifs(docmsgfile);
1581  std::string content((std::istreambuf_iterator<char>(ifs)),
1582  (std::istreambuf_iterator<char>()));
1583  content.replace(content.find("$LOCAL_SITE_HOME"), content.length(), docmsg);
1584  docmsg = content;
1585  }
1586 
1587  Moose::out << docmsg << "\n";
1588  _early_exit_param = "--docs";
1589  _ready_to_exit = true;
1590  return;
1591  }
1592 
1593  if (showInputs() || copyInputs() || runInputs())
1594  {
1595  _early_exit_param = "--show-input, --copy-inputs, or --run";
1596  _ready_to_exit = true;
1597  return;
1598  }
1599 
1600  try
1601  {
1602  TIME_SECTION("setup", 2, "Setting Up");
1603  setupOptions();
1604  runInputFile();
1605  }
1606  catch (std::exception & err)
1607  {
1608  mooseError(err.what());
1609  }
1610 
1611  if (!_check_input)
1612  {
1613  TIME_SECTION("execute", 2, "Executing");
1615  }
1616  else
1617  {
1618  errorCheck();
1619  // Output to stderr, so it is easier for peacock to get the result
1620  Moose::err << "Syntax OK" << std::endl;
1621  }
1622 }
OStreamProxy err
std::string docsDir(const std::string &app_name)
Returns the directory of any installed docs/site.
Definition: MooseUtils.C:121
virtual void setupOptions()
Setup options based on InputParameters.
Definition: MooseApp.C:736
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual std::string appBinaryName() const
Definition: MooseApp.h:123
bool runInputs()
Handles the run input parameter logic: Checks to see whether a directory exists in user space and lau...
Definition: MooseApp.C:1728
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:1294
std::string realpath(const std::string &path)
Wrapper around PetscGetRealPath, which is a cross-platform replacement for realpath.
Definition: MooseUtils.C:1257
bool showInputs() const
Prints a message showing the installable inputs for a given application (if getInstallableInputs has ...
Definition: MooseApp.C:1625
bool checkFileReadable(const std::string &filename, bool check_line_endings=false, bool throw_on_unreadable=true, bool check_for_git_lfs_pointer=true)
Checks to see if a file is readable (exists and permissions)
Definition: MooseUtils.C:260
std::filesystem::path pathjoin(const std::filesystem::path &p)
Definition: MooseUtils.C:59
virtual void executeExecutioner()
Execute the Executioner that was built.
Definition: MooseApp.C:1207
virtual void runInputFile()
Actually build everything in the input file.
Definition: MooseApp.C:1137
bool pathExists(const std::string &path)
Definition: MooseUtils.C:253
bool _ready_to_exit
Definition: MooseApp.h:1256
bool copyInputs()
Handles the copy_inputs input parameter logic: Checks to see whether the passed argument is valid (a ...
Definition: MooseApp.C:1663
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
Definition: MooseApp.C:1171
std::string _early_exit_param
Indicates if simulation is ready to exit, and keeps track of which param caused it to exit...
Definition: MooseApp.h:1255

◆ runInputFile()

void MooseApp::runInputFile ( )
virtual

Actually build everything in the input file.

Definition at line 1137 of file MooseApp.C.

Referenced by run().

1138 {
1139  TIME_SECTION("runInputFile", 3);
1140 
1141  // If early exit param has been set, then just return
1142  if (_ready_to_exit)
1143  return;
1144 
1146 
1147  if (isParamSetByUser("mesh_only"))
1148  {
1149  _early_exit_param = "--mesh-only";
1150  _ready_to_exit = true;
1151  }
1152  else if (isParamSetByUser("split_mesh"))
1153  {
1154  _early_exit_param = "--split-mesh";
1155  _ready_to_exit = true;
1156  }
1157  else if (getParam<bool>("list_constructed_objects"))
1158  {
1159  // TODO: ask multiapps for their constructed objects
1160  _early_exit_param = "--list-constructed-objects";
1161  _ready_to_exit = true;
1162  std::vector<std::string> obj_list = _factory.getConstructedObjects();
1163  Moose::out << "**START OBJECT DATA**\n";
1164  for (const auto & name : obj_list)
1165  Moose::out << name << "\n";
1166  Moose::out << "**END OBJECT DATA**\n" << std::endl;
1167  }
1168 }
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
Factory _factory
Definition: MooseApp.h:1250
void executeAllActions()
This method loops over all actions in the warehouse and executes them.
bool _ready_to_exit
Definition: MooseApp.h:1256
std::string _early_exit_param
Indicates if simulation is ready to exit, and keeps track of which param caused it to exit...
Definition: MooseApp.h:1255
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193

◆ runInputs()

bool MooseApp::runInputs ( )
private

Handles the run input parameter logic: Checks to see whether a directory exists in user space and launches the TestHarness to process the given directory.

Returns
a Boolean value used to indicate whether the application should exit early

Definition at line 1728 of file MooseApp.C.

Referenced by run().

1729 {
1730  if (isParamSetByUser("run"))
1731  {
1732  if (comm().size() > 1)
1733  mooseError("The --run option should not be ran in parallel");
1734 
1735  // Pass everything after --run on the cli to the TestHarness
1736  const auto find_run_it = std::as_const(*_command_line).findCommandLineParam("run");
1737  const auto & cl_entries = std::as_const(*_command_line).getEntries();
1738  mooseAssert(find_run_it != cl_entries.end(), "Didn't find the option");
1739  std::string test_args;
1740  for (auto it = std::next(find_run_it); it != cl_entries.end(); ++it)
1741  for (const auto & arg : it->raw_args)
1742  {
1743  test_args += " " + arg;
1745  }
1746 
1747  auto working_dir = MooseUtils::getCurrentWorkingDir();
1748  if (MooseUtils::findTestRoot() == "")
1749  {
1750  auto bin_name = appBinaryName();
1751  if (bin_name == "")
1752  mooseError("Could not locate binary name relative to installed location");
1753 
1754  auto cmd_name = Moose::getExecutableName();
1755  mooseError(
1756  "Could not locate installed tests from the current working directory:",
1757  working_dir,
1758  ".\nMake sure you are executing this command from within a writable installed inputs ",
1759  "directory.\nRun \"",
1760  cmd_name,
1761  " --copy-inputs <dir>\" to copy the contents of <dir> to a \"./",
1762  bin_name,
1763  "_<dir>\" directory.\nChange into that directory and try \"",
1764  cmd_name,
1765  " --run <dir>\" again.");
1766  }
1767 
1768  // Set this application as the app name for the moose_test_runner script that we're running
1769  setenv("MOOSE_TEST_RUNNER_APP_NAME", appBinaryName().c_str(), true);
1770 
1771  const std::string cmd = MooseUtils::runTestsExecutable() + test_args;
1772  Moose::out << "Working Directory: " << working_dir << "\nRunning Command: " << cmd << std::endl;
1773  mooseAssert(comm().size() == 1, "Should be run in serial");
1774  const auto return_value = system(cmd.c_str());
1775  if (!WIFEXITED(return_value))
1776  mooseError("Process exited unexpectedly");
1777  setExitCode(WEXITSTATUS(return_value));
1778  return true;
1779  }
1780 
1781  return false;
1782 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
virtual std::string appBinaryName() const
Definition: MooseApp.h:123
const Parallel::Communicator & comm() const
std::string runTestsExecutable()
Returns the location of either a local repo run_tests script - or an installed test executor script i...
Definition: MooseUtils.C:65
void add_command_line_name(const std::string &name)
std::string getCurrentWorkingDir()
Returns the current working directory as a string.
Definition: MooseUtils.C:442
void setExitCode(const int exit_code)
Sets the exit code that the application will exit with.
Definition: MooseApp.h:141
std::string getExecutableName()
This function returns the name of the running executable.
std::string findTestRoot()
Searches in the current working directory and then recursively up in each parent directory looking fo...
Definition: MooseUtils.C:75
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193

◆ setCheckUnusedFlag()

void MooseApp::setCheckUnusedFlag ( bool  warn_is_error = false)
private

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

Definition at line 1384 of file MooseApp.C.

Referenced by setupOptions().

1385 {
1386  _enable_unused_check = warn_is_error ? ERROR_UNUSED : WARN_UNUSED;
1387 }
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 1558 of file MooseApp.C.

Referenced by setupOptions().

1559 {
1560  _error_overridden = true;
1561 }
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected...
Definition: MooseApp.h:1253

◆ setExecutioner()

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

Set the Executioner for this App.

Definition at line 355 of file MooseApp.h.

Referenced by CreateExecutionerAction::act().

355 { _executioner = executioner; }
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1209

◆ setExecutor()

void MooseApp::setExecutor ( std::shared_ptr< Executor > &&  executor)
inline

Definition at line 356 of file MooseApp.h.

356 { _executor = executor; }
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1212

◆ setExitCode()

void MooseApp::setExitCode ( const int  exit_code)
inline

Sets the exit code that the application will exit with.

Definition at line 141 of file MooseApp.h.

Referenced by copyInputs(), and runInputs().

141 { _exit_code = exit_code; }
int _exit_code
The exit code.
Definition: MooseApp.h:1258

◆ setExodusFileRestart()

void MooseApp::setExodusFileRestart ( bool  flag)
inline

Set the flag to indicate whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh.

Definition at line 447 of file MooseApp.h.

Referenced by CopyNodalVarsAction::act(), and PhysicsBase::prepareCopyVariablesFromMesh().

447 { _initial_from_file = flag; }
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Definition: MooseApp.h:1261

◆ setExReaderForRestart()

void MooseApp::setExReaderForRestart ( std::shared_ptr< libMesh::ExodusII_IO > &&  exreader)
inline

Set the Exodus reader to restart variables from an Exodus mesh file.

Definition at line 458 of file MooseApp.h.

Referenced by FileMesh::buildMesh(), and FileMeshGenerator::generate().

459  {
460  _ex_reader = exreader;
461  }
std::shared_ptr< libMesh::ExodusII_IO > _ex_reader
The Exodus reader when _initial_from_file is set to true.
Definition: MooseApp.h:1264

◆ setGlobalTimeOffset()

void MooseApp::setGlobalTimeOffset ( 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 318 of file MooseApp.h.

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

◆ setOutputFileBase()

void MooseApp::setOutputFileBase ( const std::string &  output_file_base)

Override the selection of the output file base name.

Note: This method is supposed to be called by MultiApp only.

Definition at line 1121 of file MooseApp.C.

1122 {
1123  _output_file_base = output_file_base;
1124 
1125  // Reset the file base in the outputs
1127 
1128  // Reset the file base in multiapps (if they have been constructed yet)
1129  if (getExecutioner())
1130  for (auto & multi_app : feProblem().getMultiAppWarehouse().getObjects())
1131  multi_app->setAppOutputFileBase();
1132 
1133  _file_base_set_by_user = true;
1134 }
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition: MooseApp.h:1148
FEProblemBase & feProblem() const
Definition: MooseApp.C:1396
void resetFileBase()
Resets the file base for all FileOutput objects.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:1552
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:1182
std::string _output_file_base
The output file basename.
Definition: MooseApp.h:1145

◆ setOutputFileNumbers()

void MooseApp::setOutputFileNumbers ( const 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 551 of file MooseApp.h.

552  {
553  _output_file_numbers = numbers;
554  }
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:1291

◆ setOutputPosition()

void MooseApp::setOutputPosition ( const Point p)

Tell the app to output in a specific position.

Definition at line 1785 of file MooseApp.C.

1786 {
1787  _output_position_set = true;
1788  _output_position = p;
1790 
1791  if (_executioner.get())
1792  _executioner->parentOutputPositionChanged();
1793 }
bool _output_position_set
Whether or not an output position has been set for this app.
Definition: MooseApp.h:1151
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:1209
Point _output_position
The output position.
Definition: MooseApp.h:1154
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:1182

◆ setRecover()

void MooseApp::setRecover ( bool  value)

Definition at line 2324 of file MooseApp.C.

2325 {
2326  _recover = value;
2327 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:1270

◆ setRestart()

void MooseApp::setRestart ( bool  value)

Sets the restart/recover flags.

Parameters
stateThe state to set the flag to

Definition at line 2318 of file MooseApp.C.

Referenced by FEProblemBase::setRestartFile().

2319 {
2320  _restart = value;
2321 }
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:1273
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ setRestartRecoverFileBase()

void MooseApp::setRestartRecoverFileBase ( const std::string &  file_base)
inline

mutator for recover_base (set by RecoverBaseAction)

Definition at line 529 of file MooseApp.h.

Referenced by SetupRecoverFileBaseAction::act(), and FEProblemBase::setRestartFile().

530  {
531  if (file_base.empty())
533  else
534  _restart_recover_base = file_base;
535  }
std::list< std::string > getCheckpointFiles() const
Extract all possible checkpoint file names.
Definition: MooseApp.C:1828
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
Definition: MooseApp.h:1285
std::string getLatestCheckpointFilePrefix(const std::list< std::string > &checkpoint_files)
Returns the most recent checkpoint prefix (the four numbers at the beginning) If a suitable file isn&#39;...
Definition: MooseUtils.C:825

◆ setStartTime()

void MooseApp::setStartTime ( 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 1835 of file MooseApp.C.

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

1836 {
1837  _start_time_set = true;
1838  _start_time = time;
1839 }
Real _start_time
The time at which to start the simulation.
Definition: MooseApp.h:1160
bool _start_time_set
Whether or not an start time has been set.
Definition: MooseApp.h:1157

◆ setupOptions()

void MooseApp::setupOptions ( )
virtual

Setup options based on InputParameters.

Definition at line 736 of file MooseApp.C.

Referenced by run().

737 {
738  TIME_SECTION("setupOptions", 5, "Setting Up Options");
739 
740  // Print the header, this is as early as possible
741  if (header().length() && !getParam<bool>("suppress_header"))
742  _console << header() << std::endl;
743 
744  if (getParam<bool>("error_unused"))
745  setCheckUnusedFlag(true);
746  else if (getParam<bool>("allow_unused"))
747  setCheckUnusedFlag(false);
748 
749  if (getParam<bool>("error_override"))
751 
752  _distributed_mesh_on_command_line = getParam<bool>("distributed_mesh");
753 
754  _test_checkpoint_half_transient = getParam<bool>("test_checkpoint_half_transient");
755 
756  // The no_timing flag takes precedence over the timing flag.
757  if (getParam<bool>("no_timing"))
758  _pars.set<bool>("timing") = false;
759 
760  if (getParam<bool>("trap_fpe"))
761  {
762  _trap_fpe = true;
763  _perf_graph.setActive(false);
764  if (getParam<bool>("no_trap_fpe"))
765  mooseError("Cannot use both \"--trap-fpe\" and \"--no-trap-fpe\" flags.");
766  }
767  else if (getParam<bool>("no_trap_fpe"))
768  _trap_fpe = false;
769 
770  // Turn all warnings in MOOSE to errors (almost see next logic block)
771  Moose::_warnings_are_errors = getParam<bool>("error");
772 
773  // Deprecated messages can be toggled to errors independently from everything else.
774  Moose::_deprecated_is_error = getParam<bool>("error_deprecated");
775 
776  if (isUltimateMaster()) // makes sure coloring isn't reset incorrectly in multi-app settings
777  {
778  // Set from command line
779  auto color = getParam<MooseEnum>("color");
780  if (!isParamSetByUser("color"))
781  {
782  // Set from deprecated --no-color
783  if (getParam<bool>("no_color"))
784  color = "off";
785  // Set from environment
786  else
787  {
788  char * c_color = std::getenv("MOOSE_COLOR");
789  if (c_color)
790  color.assign(std::string(c_color), "While assigning environment variable MOOSE_COLOR");
791  }
792  }
793 
794  if (color == "auto")
796  else if (color == "on")
797  Moose::setColorConsole(true, true);
798  else if (color == "off")
799  Moose::setColorConsole(false);
800  else
801  mooseAssert(false, "Should not hit");
802 
803  // After setting color so that non-yellow deprecated is honored
804  if (getParam<bool>("no_color"))
805  mooseDeprecated("The --no-color flag is deprecated. Use '--color off' instead.");
806  }
807 
808 // If there's no threading model active, but the user asked for
809 // --n-threads > 1 on the command line, throw a mooseError. This is
810 // intended to prevent situations where the user has potentially
811 // built MOOSE incorrectly (neither TBB nor pthreads found) and is
812 // asking for multiple threads, not knowing that there will never be
813 // any threads launched.
814 #if !LIBMESH_USING_THREADS
815  if (libMesh::command_line_value("--n-threads", 1) > 1)
816  mooseError("You specified --n-threads > 1, but there is no threading model active!");
817 #endif
818 
819  // Build a minimal running application, ignoring the input file.
820  if (getParam<bool>("minimal"))
822 
823  else if (getParam<bool>("display_version"))
824  {
825  Moose::out << getPrintableVersion() << std::endl;
826  _early_exit_param = "--version";
827  _ready_to_exit = true;
828  return;
829  }
830  else if (getParam<bool>("help"))
831  {
832  _command_line->printUsage();
833  _early_exit_param = "--help";
834  _ready_to_exit = true;
835  }
836  else if (getParam<bool>("dump") || isParamSetByUser("dump_search"))
837  {
838  const std::string search =
839  isParamSetByUser("dump_search") ? getParam<std::string>("dump_search") : "";
840 
841  JsonSyntaxTree tree(search);
842 
843  {
844  TIME_SECTION("dump", 1, "Building Syntax Tree");
846  }
847 
848  // Check if second arg is valid or not
849  if ((tree.getRoot()).is_object())
850  {
851  // Turn off live printing so that it doesn't mess with the dump
853 
854  JsonInputFileFormatter formatter;
855  Moose::out << "\n### START DUMP DATA ###\n"
856  << formatter.toString(tree.getRoot()) << "\n### END DUMP DATA ###" << std::endl;
857  _early_exit_param = "--dump";
858  _ready_to_exit = true;
859  }
860  else
861  mooseError("Search parameter '", search, "' was not found in the registered syntax.");
862  }
863  else if (getParam<bool>("registry"))
864  {
866 
867  Moose::out << "Label\tType\tName\tClass\tFile\n";
868 
869  auto & objmap = Registry::allObjects();
870  for (auto & entry : objmap)
871  for (auto & obj : entry.second)
872  Moose::out << entry.first << "\tobject\t" << obj->name() << "\t" << obj->_classname << "\t"
873  << obj->_file << "\n";
874 
875  auto & actmap = Registry::allActions();
876  for (auto & entry : actmap)
877  {
878  for (auto & act : entry.second)
879  Moose::out << entry.first << "\taction\t" << act->_name << "\t" << act->_classname << "\t"
880  << act->_file << "\n";
881  }
882  _early_exit_param = "--registry";
883  _ready_to_exit = true;
884  }
885  else if (getParam<bool>("registry_hit"))
886  {
888 
889  Moose::out << "### START REGISTRY DATA ###\n";
890 
891  hit::Section root("");
892  auto sec = new hit::Section("registry");
893  root.addChild(sec);
894  auto objsec = new hit::Section("objects");
895  sec->addChild(objsec);
896 
897  auto & objmap = Registry::allObjects();
898  for (auto & entry : objmap)
899  for (auto & obj : entry.second)
900  {
901  auto ent = new hit::Section("entry");
902  objsec->addChild(ent);
903  ent->addChild(new hit::Field("label", hit::Field::Kind::String, entry.first));
904  ent->addChild(new hit::Field("type", hit::Field::Kind::String, "object"));
905  ent->addChild(new hit::Field("name", hit::Field::Kind::String, obj->name()));
906  ent->addChild(new hit::Field("class", hit::Field::Kind::String, obj->_classname));
907  ent->addChild(new hit::Field("file", hit::Field::Kind::String, obj->_file));
908  }
909 
910  auto actsec = new hit::Section("actions");
911  sec->addChild(actsec);
912  auto & actmap = Registry::allActions();
913  for (auto & entry : actmap)
914  for (auto & act : entry.second)
915  {
916  auto ent = new hit::Section("entry");
917  actsec->addChild(ent);
918  ent->addChild(new hit::Field("label", hit::Field::Kind::String, entry.first));
919  ent->addChild(new hit::Field("type", hit::Field::Kind::String, "action"));
920  ent->addChild(new hit::Field("task", hit::Field::Kind::String, act->_name));
921  ent->addChild(new hit::Field("class", hit::Field::Kind::String, act->_classname));
922  ent->addChild(new hit::Field("file", hit::Field::Kind::String, act->_file));
923  }
924 
925  Moose::out << root.render();
926 
927  Moose::out << "\n### END REGISTRY DATA ###\n";
928  _early_exit_param = "--registry_hit";
929  _ready_to_exit = true;
930  }
931  else if (getParam<bool>("definition"))
932  {
934 
935  JsonSyntaxTree tree("");
937  SONDefinitionFormatter formatter;
938  Moose::out << "%-START-SON-DEFINITION-%\n"
939  << formatter.toString(tree.getRoot()) << "\n%-END-SON-DEFINITION-%\n";
940  _early_exit_param = "--definition";
941  _ready_to_exit = true;
942  }
943  else if (getParam<bool>("yaml") || isParamSetByUser("yaml_search"))
944  {
945  const std::string search =
946  isParamSetByUser("yaml_search") ? getParam<std::string>("yaml_search") : "";
948 
950  _builder.buildFullTree(search);
951 
952  _early_exit_param = "--yaml";
953  _ready_to_exit = true;
954  }
955  else if (getParam<bool>("json") || isParamSetByUser("json_search"))
956  {
957  const std::string search =
958  isParamSetByUser("json_search") ? getParam<std::string>("json_search") : "";
960 
961  JsonSyntaxTree tree(search);
963 
964  Moose::out << "**START JSON DATA**\n" << tree.getRoot().dump(2) << "\n**END JSON DATA**\n";
965  _early_exit_param = "--json";
966  _ready_to_exit = true;
967  }
968  else if (getParam<bool>("syntax"))
969  {
971 
972  std::multimap<std::string, Syntax::ActionInfo> syntax = _syntax.getAssociatedActions();
973  Moose::out << "**START SYNTAX DATA**\n";
974  for (const auto & it : syntax)
975  Moose::out << it.first << "\n";
976  Moose::out << "**END SYNTAX DATA**\n" << std::endl;
977  _early_exit_param = "--syntax";
978  _ready_to_exit = true;
979  }
980  else if (getParam<bool>("show_type"))
981  {
983 
984  Moose::out << "MooseApp Type: " << type() << std::endl;
985  _early_exit_param = "--show-type";
986  _ready_to_exit = true;
987  }
988  else if (getInputFileNames().size())
989  {
990  if (isParamSetByUser("recover"))
991  {
992  // We need to set the flag manually here since the recover parameter is a string type (takes
993  // an optional filename)
994  _recover = true;
995  const auto & recover = getParam<std::string>("recover");
996  if (recover.size())
997  _restart_recover_base = recover;
998  }
999 
1000  // In the event that we've parsed once before already in MooseMain, we
1001  // won't need to parse again
1002  if (!_parser->root())
1003  _parser->parse();
1004 
1005  _builder.build();
1006 
1007  if (isParamSetByUser("mesh_only"))
1008  {
1009  // If we are looking to just check the input, there is no need to
1010  // call MeshOnlyAction and generate a mesh
1011  if (_check_input)
1012  _action_warehouse.setFinalTask("setup_mesh_complete");
1013  else
1014  {
1015  _syntax.registerTaskName("mesh_only", true);
1016  _syntax.addDependency("mesh_only", "setup_mesh_complete");
1017  _syntax.addDependency("determine_system_type", "mesh_only");
1018  _action_warehouse.setFinalTask("mesh_only");
1019  }
1020  }
1021  else if (isParamSetByUser("split_mesh"))
1022  {
1023  _split_mesh = true;
1024  _syntax.registerTaskName("split_mesh", true);
1025  _syntax.addDependency("split_mesh", "setup_mesh_complete");
1026  _syntax.addDependency("determine_system_type", "split_mesh");
1027  _action_warehouse.setFinalTask("split_mesh");
1028  }
1030 
1031  // Setup the AppFileBase for use by the Outputs or other systems that need output file info
1032  {
1033  // Extract the CommonOutputAction
1034  const auto common_actions = _action_warehouse.getActions<CommonOutputAction>();
1035  mooseAssert(common_actions.size() <= 1, "Should not be more than one CommonOutputAction");
1036  const Action * common = common_actions.empty() ? nullptr : *common_actions.begin();
1037 
1038  // If file_base is set in CommonOutputAction through parsing input, obtain the file_base
1039  if (common && common->isParamValid("file_base"))
1040  {
1041  _output_file_base = common->getParam<std::string>("file_base");
1042  _file_base_set_by_user = true;
1043  }
1044  else if (isUltimateMaster())
1045  {
1046  // if this app is a master, we use the first input file name as the default file base.
1047  // use proximate here because the input file is an absolute path
1048  const auto & base = getLastInputFileName();
1049  size_t pos = base.find_last_of('.');
1050  _output_file_base = base.substr(0, pos);
1051  // Note: we did not append "_out" in the file base here because we do not want to
1052  // have it in between the input file name and the object name for Output/*
1053  // syntax.
1054  }
1055  // default file base for multiapps is set by MultiApp
1056  }
1057  }
1058  // No input file provided but we have other arguments (so don't just show print usage)
1059  else if (!isParamSetByUser("input_file") && _command_line->getArguments().size() > 2)
1060  {
1061  mooseAssert(getInputFileNames().empty(), "Should be empty");
1062 
1063  if (_check_input)
1064  mooseError("You specified --check-input, but did not provide an input file. Add -i "
1065  "<inputfile> to your command line.");
1066 
1067  mooseError("No input files specified. Add -i <inputfile> to your command line.");
1068  }
1069  else if (isParamValid("language_server") && getParam<bool>("language_server"))
1070  {
1072 
1073  // Reset output to the buffer what was cached before it was turned it off
1074  if (!Moose::out.rdbuf() && _output_buffer_cache)
1075  Moose::out.rdbuf(_output_buffer_cache);
1076 
1077  // Start a language server that communicates using an iostream connection
1078  MooseServer moose_server(*this);
1079 
1080  moose_server.run();
1081 
1082  _early_exit_param = "--language-server";
1083  _ready_to_exit = true;
1084  }
1085 
1086  else /* The catch-all case for bad options or missing options, etc. */
1087  {
1088  _command_line->printUsage();
1089  _early_exit_param = "bad or missing";
1090  _ready_to_exit = true;
1091  _exit_code = 1;
1092  }
1093 
1094  Moose::out << std::flush;
1095 }
void build()
Parse an input file (or text string if provided) consisting of hit syntax and setup objects in the MO...
Definition: Builder.C:328
PerfGraph & _perf_graph
The PerfGraph object for this application (recoverable)
Definition: MooseApp.h:1200
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:837
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
Definition: MooseApp.h:1285
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
Definition: MooseApp.h:1185
const std::multimap< std::string, ActionInfo > & getAssociatedActions() const
Return all Syntax to Action associations.
Definition: Syntax.C:374
void buildFullTree(const std::string &search_string)
Use MOOSE Factories to construct a full parse tree for documentation or echoing input.
Definition: Builder.C:640
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition: MooseApp.h:1148
void addDependency(const std::string &task, const std::string &pre_req)
Definition: Syntax.C:60
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:1384
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool _warnings_are_errors
Variable to toggle any warning into an error (includes deprecated code warnings)
Definition: Moose.C:702
void registerTaskName(const std::string &task, bool should_auto_build=false)
Method to register a new task.
Definition: Syntax.C:20
static const std::map< std::string, std::vector< std::shared_ptr< RegistryEntryBase > > > & allActions()
Returns a per-label keyed map of all Actions in the registry.
Definition: Registry.h:227
void setFinalTask(const std::string &task)
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:1294
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:191
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:1169
Syntax & syntax()
Returns a writable reference to the syntax object.
Definition: MooseApp.h:237
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition: MooseApp.h:1282
static const std::map< std::string, std::vector< std::shared_ptr< RegistryEntryBase > > > & allObjects()
Returns a per-label keyed map of all MooseObjects in the registry.
Definition: Registry.h:222
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1179
This class produces a dump of the InputFileParameters in the Standard Object Notation (SON) format fo...
Holds the syntax in a Json::Value tree.
Base class for actions.
Definition: Action.h:33
int _exit_code
The exit code.
Definition: MooseApp.h:1258
const std::string & getLastInputFileName() const
Definition: MooseApp.C:1105
void setErrorOverridden()
Set a flag so that the parser will throw an error if overridden parameters are detected.
Definition: MooseApp.C:1558
T command_line_value(const std::string &, T)
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:1166
bool _deprecated_is_error
Variable to toggle only deprecated warnings as errors.
Definition: Moose.C:703
void setActive(bool active)
Turn on or off timing.
Definition: PerfGraph.h:129
void initSyntaxFormatter(SyntaxFormatterType type, bool dump_mode)
Creates a syntax formatter for printing.
Definition: Builder.C:463
void disableLivePrint()
Completely disables Live Print (cannot be restarted)
Definition: PerfGraph.C:67
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:1270
void buildJsonSyntaxTree(JsonSyntaxTree &tree) const
Use MOOSE Factories to construct a parameter tree for documentation or echoing input.
Definition: Builder.C:480
std::string toString(const nlohmann::json &root)
returns a string representation of the tree in input file format
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
This class produces produces a dump of the InputParameters that appears like the normal input file sy...
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition: MooseApp.h:1267
Moose::Builder _builder
Builder for building app related parser tree.
Definition: MooseApp.h:1188
bool _test_checkpoint_half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:1288
std::string _output_file_base
The output file basename.
Definition: MooseApp.h:1145
std::streambuf * _output_buffer_cache
Cache output buffer so the language server can turn it off then back on.
Definition: MooseApp.h:1484
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:696
virtual std::string header() const
Returns a string to be printed at the beginning of a simulation.
Definition: MooseApp.C:2312
const std::vector< std::string > & getInputFileNames() const
Definition: MooseApp.C:1098
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::string toString(const nlohmann::json &root)
Returns a string representation of the tree in input file format.
std::string getPrintableVersion() const
Non-virtual method for printing out the version string in a consistent format.
Definition: MooseApp.C:730
std::vector< const T * > getActions()
Retrieve all actions in a specific type ordered by their names.
void createMinimalApp()
Method for creating the minimum required actions for an application (no input file) ...
Definition: MooseApp.C:2330
bool _ready_to_exit
Definition: MooseApp.h:1256
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:1276
Meta-action for creating common output object parameters This action serves two purpose, first it adds common output object parameters.
std::string _early_exit_param
Indicates if simulation is ready to exit, and keeps track of which param caused it to exit...
Definition: MooseApp.h:1255
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:193

◆ showInputs()

bool MooseApp::showInputs ( ) const
private

Prints a message showing the installable inputs for a given application (if getInstallableInputs has been overridden for an application).

Definition at line 1625 of file MooseApp.C.

Referenced by run().

1626 {
1627  if (getParam<bool>("show_inputs"))
1628  {
1629  const auto show_inputs_syntax = _pars.getCommandLineMetadata("show_inputs").switches;
1630  std::vector<std::string> dirs;
1631  const auto installable_inputs = getInstallableInputs();
1632 
1633  if (installable_inputs == "")
1634  {
1635  Moose::out
1636  << "Show inputs has not been overriden in this application.\nContact the developers of "
1637  "this appication and request that they override \"MooseApp::getInstallableInputs\".\n";
1638  }
1639  else
1640  {
1641  mooseAssert(!show_inputs_syntax.empty(), "show_inputs sytnax should not be empty");
1642 
1643  MooseUtils::tokenize(installable_inputs, dirs, 1, " ");
1644  Moose::out << "The following directories are installable into a user-writeable directory:\n\n"
1645  << installable_inputs << '\n'
1646  << "\nTo install one or more directories of inputs, execute the binary with the \""
1647  << show_inputs_syntax[0] << "\" flag. e.g.:\n$ "
1648  << _command_line->getExecutableName() << ' ' << show_inputs_syntax[0] << ' '
1649  << dirs[0] << '\n';
1650  }
1651  return true;
1652  }
1653  return false;
1654 }
virtual std::string getInstallableInputs() const
Method to retrieve the installable inputs from a given applications <app>Revision.h file.
Definition: MooseApp.C:1657
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:812
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:1166
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1136
const InputParameters::CommandLineMetadata & getCommandLineMetadata(const std::string &name) const
std::vector< std::string > switches
The switches for the parameter (i.e., [-t, –timing])

◆ solutionInvalidity() [1/2]

SolutionInvalidity& MooseApp::solutionInvalidity ( )
inline

◆ solutionInvalidity() [2/2]

const SolutionInvalidity& MooseApp::solutionInvalidity ( ) const
inline

Definition at line 165 of file MooseApp.h.

165 { return _solution_invalidity; }
SolutionInvalidity & _solution_invalidity
The SolutionInvalidity object for this application.
Definition: MooseApp.h:1203

◆ syntax()

Syntax& MooseApp::syntax ( )
inline

Returns a writable reference to the syntax object.

Definition at line 237 of file MooseApp.h.

Referenced by dynamicAllRegistration(), and setupOptions().

237 { return _syntax; }
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:1169

◆ testCheckpointHalfTransient()

bool MooseApp::testCheckpointHalfTransient ( ) const
inline

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

Definition at line 541 of file MooseApp.h.

Referenced by AutoCheckpointAction::act(), TimeStepper::constrainStep(), TransientBase::execute(), TimeSequenceStepperBase::setupSequence(), and TransientBase::TransientBase().

bool _test_checkpoint_half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:1288

◆ theWarehouse()

TheWarehouse& MooseApp::theWarehouse ( )
inline

Definition at line 116 of file MooseApp.h.

Referenced by MooseVariableDataFV< OutputType >::MooseVariableDataFV(), and FEProblemBase::theWarehouse().

116 { return *_the_warehouse; }
std::unique_ptr< TheWarehouse > _the_warehouse
The combined warehouse for storing any MooseObject based object.
Definition: MooseApp.h:1452

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 47 of file PerfGraphInterface.C.

Referenced by PerfGraphInterface::registerTimedSection().

48 {
49  return _prefix.empty() ? "" : (_prefix + "::") + section_name;
50 }
const std::string _prefix
A prefix to use for all sections.

◆ type()

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

Get the type of this class.

Returns
the name of the type of this class

Definition at line 51 of file MooseBase.h.

Referenced by CreateProblemDefaultAction::act(), SetupDebugAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addConvergence(), FEProblemBase::addDistribution(), addExecutor(), addExecutorParams(), FEProblemBase::addFunction(), FEProblemBase::addMeshDivision(), addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addObject(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addTimeIntegrator(), MooseServer::addValuesToList(), DisplacedProblem::addVectorTag(), SubProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), appendMeshGenerator(), AuxKernelTempl< Real >::AuxKernelTempl(), FEProblemBase::backupMultiApps(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildLowerDMesh(), MooseMesh::buildPRefinementAndCoarseningMaps(), PhysicsBase::checkComponentType(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), ADDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayDGLowerDKernel::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), FEProblemBase::computeMultiAppsDT(), ADDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGConvection::computeQpJacobian(), ScalarKernel::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGDiffusion::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), EqualValueEmbeddedConstraint::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), EqualValueEmbeddedConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), ArrayHFEMDiffusion::computeQpResidual(), DGConvection::computeQpResidual(), HFEMDiffusion::computeQpResidual(), ScalarKernel::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceReaction::computeQpResidual(), ADDGAdvection::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), ADDGDiffusion::computeQpResidual(), DGDiffusion::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), EqualValueEmbeddedConstraint::computeQpResidual(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), DisplacedProblem::createQRules(), FEProblemBase::createQRules(), createRecoverablePerfGraph(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MooseBase::errorPrefix(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), FEProblemBase::execTransfers(), WebServerControl::execute(), SteadyBase::execute(), ActionWarehouse::executeActionsWithAction(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), MooseServer::gatherDocumentReferencesLocations(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), MooseServer::getInputLookupDefinitionNodes(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), FEProblemBase::getTransfers(), DisplacedProblem::getVectorTags(), SubProblem::getVectorTags(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), MultiAppConservativeTransfer::initialSetup(), LinearFVDiffusion::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVAdvection::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MooseObject::MooseObject(), DisplacedProblem::numVectorTags(), SubProblem::numVectorTags(), Console::output(), AdvancedOutput::output(), ConsoleUtils::outputExecutionInformation(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), MooseServer::parseDocumentForDiagnostics(), ProjectedStatefulMaterialStorageAction::processProperty(), recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), setupOptions(), WebServerControl::startServer(), MooseBase::typeAndName(), ScalarKernelBase::uOld(), AuxScalarKernel::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

51 { return _type; }
const std::string _type
The type of this class.
Definition: MooseBase.h:87

◆ typeAndName()

std::string MooseBase::typeAndName ( ) const
inherited

Get the class's combined type and name; useful in error handling.

Returns
The type and name of this class in the form '<type()> "<name()>"'.

Definition at line 27 of file MooseBase.C.

Referenced by MaterialPropertyStorage::addProperty(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< std::vector< T > >::finalize(), and ReporterData::getReporterInfo().

28 {
29  return type() + std::string(" \"") + name() + std::string("\"");
30 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51

◆ useEigenvalue()

bool& MooseApp::useEigenvalue ( )
inline

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

Definition at line 419 of file MooseApp.h.

Referenced by CreateProblemDefaultAction::act().

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

◆ useExecutor()

bool MooseApp::useExecutor ( ) const
inline

Definition at line 349 of file MooseApp.h.

349 { return _use_executor; }
const bool _use_executor
Indicates whether we are operating in the new/experimental executor mode instead of using the legacy ...
Definition: MooseApp.h:1228

◆ useNonlinear()

bool& MooseApp::useNonlinear ( )
inline

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

Definition at line 414 of file MooseApp.h.

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

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

◆ validParams()

InputParameters MooseApp::validParams ( )
static

Definition at line 104 of file MooseApp.C.

105 {
107 
108  MooseApp::addAppParam(params);
109  MooseApp::addInputParam(params);
110 
111  params.addCommandLineParam<bool>("display_version", "-v --version", "Print application version");
112 
113  params.addOptionalValuedCommandLineParam<std::string>(
114  "mesh_only",
115  "--mesh-only <optional path>",
116  "",
117  "Build and output the mesh only (Default: \"<input_file_name>_in.e\")");
118 
119  params.addCommandLineParam<bool>(
120  "show_input", "--show-input", "Shows the parsed input file before running the simulation");
121  params.setGlobalCommandLineParam("show_input");
122  params.addCommandLineParam<bool>(
123  "show_outputs", "--show-outputs", "Shows the output execution time information");
124  params.setGlobalCommandLineParam("show_outputs");
125  params.addCommandLineParam<bool>(
126  "show_controls", "--show-controls", "Shows the Control logic available and executed");
127  params.setGlobalCommandLineParam("show_controls");
128 
129  params.addCommandLineParam<bool>(
130  "no_color", "--no-color", "Disable coloring of all Console outputs");
131  params.setGlobalCommandLineParam("no_color");
132 
133  MooseEnum colors("auto on off", "on");
135  "color", "--color <auto,on,off=on>", colors, "Whether to use color in console output");
136  params.setGlobalCommandLineParam("color");
137 
138  params.addCommandLineParam<bool>("help", "-h --help", "Displays CLI usage statement");
139  params.addCommandLineParam<bool>(
140  "minimal",
141  "--minimal",
142  "Ignore input file and build a minimal application with Transient executioner");
143 
144  params.addCommandLineParam<bool>(
145  "language_server",
146  "--language-server",
147  "Starts a process to communicate with development tools using the language server protocol");
148 
149  params.addCommandLineParam<bool>(
150  "definition", "--definition", "Shows a SON style input definition dump for input validation");
151  params.addCommandLineParam<bool>("dump", "--dump", "Shows a dump of available input file syntax");
152  params.addCommandLineParam<std::string>(
153  "dump_search",
154  "--dump-search <search>",
155  "Shows a dump of available input syntax matching a search");
156  params.addCommandLineParam<bool>("registry", "--registry", "Lists all known objects and actions");
157  params.addCommandLineParam<bool>(
158  "registry_hit", "--registry-hit", "Lists all known objects and actions in hit format");
159  params.addCommandLineParam<bool>(
160  "use_executor", "--executor", "Use the new Executor system instead of Executioners");
161 
162  params.addCommandLineParam<bool>(
163  "show_type", "--show-type", "Return the name of the application object");
164  params.addCommandLineParam<bool>("yaml", "--yaml", "Dumps all input file syntax in YAML format");
165  params.addCommandLineParam<std::string>(
166  "yaml_search", "--yaml-search", "Dumps input file syntax matching a search in YAML format");
167  params.addCommandLineParam<bool>("json", "--json", "Dumps all input file syntax in JSON format");
168  params.addCommandLineParam<std::string>(
169  "json_search", "--json-search", "Dumps input file syntax matching a search in JSON format");
170  params.addCommandLineParam<bool>(
171  "syntax", "--syntax", "Dumps the associated Action syntax paths ONLY");
172  params.addCommandLineParam<bool>(
173  "show_docs", "--docs", "Print url/path to the documentation website");
174  params.addCommandLineParam<bool>("check_input",
175  "--check-input",
176  "Check the input file (i.e. requires -i <filename>) and quit");
177  params.setGlobalCommandLineParam("check_input");
178  params.addCommandLineParam<bool>(
179  "show_inputs",
180  "--show-copyable-inputs",
181  "Shows the directories able to be copied into a user-writable location");
182 
183  params.addCommandLineParam<std::string>(
184  "copy_inputs",
185  "--copy-inputs <dir>",
186  "Copies installed inputs (e.g. tests, examples, etc.) to a directory <appname>_<dir>");
187  // TODO: Should this remain a bool? It can't be a regular argument because it contains
188  // values that have dashes in it, so it'll get treated as another arg
189  params.addOptionalValuedCommandLineParam<std::string>(
190  "run",
191  "--run <test harness args>",
192  "",
193  "Runs the inputs in the current directory copied to a "
194  "user-writable location by \"--copy-inputs\"");
195 
196  params.addCommandLineParam<bool>(
197  "list_constructed_objects",
198  "--list-constructed-objects",
199  "List all moose object type names constructed by the master app factory");
200 
201  params.addCommandLineParam<unsigned int>(
202  "n_threads", "--n-threads=<n>", "Runs the specified number of threads per process");
203  // This probably shouldn't be global, but the implications of removing this are currently
204  // unknown and we need to manage it with libmesh better
205  params.setGlobalCommandLineParam("n_threads");
206 
207  params.addCommandLineParam<bool>("allow_unused",
208  "-w --allow-unused",
209  "Warn about unused input file options instead of erroring");
210  params.setGlobalCommandLineParam("allow_unused");
211  params.addCommandLineParam<bool>(
212  "error_unused", "-e --error-unused", "Error when encountering unused input file options");
213  params.setGlobalCommandLineParam("error_unused");
214  params.addCommandLineParam<bool>(
215  "error_override",
216  "-o --error-override",
217  "Error when encountering overridden or parameters supplied multiple times");
218  params.setGlobalCommandLineParam("error_override");
219  params.addCommandLineParam<bool>(
220  "error_deprecated", "--error-deprecated", "Turn deprecated code messages into Errors");
221  params.setGlobalCommandLineParam("error_deprecated");
222 
223  params.addCommandLineParam<bool>("distributed_mesh",
224  "--distributed-mesh",
225  "Forces the use of a distributed finite element mesh");
226  // Would prefer that this parameter isn't global, but we rely on it too much
227  // in tests to be able to go back on that decision now
228  params.setGlobalCommandLineParam("distributed_mesh");
229 
230  params.addCommandLineParam<std::string>(
231  "split_mesh",
232  "--split-mesh <splits>",
233  "Comma-separated list of numbers of chunks to split the mesh into");
234 
235  // TODO: remove the logic now that this is global
236  params.addCommandLineParam<std::string>(
237  "split_file", "--split-file <filename>", "Name of split mesh file(s) to write/read");
238 
239  params.addCommandLineParam<bool>("use_split", "--use-split", "Use split distributed mesh files");
240 
241  params.addCommandLineParam<unsigned int>(
242  "refinements", "-r <num refinements>", "Specify additional initial uniform mesh refinements");
243 
244  params.addOptionalValuedCommandLineParam<std::string>(
245  "recover",
246  "--recover <optional file base>",
247  "",
248  "Continue the calculation. Without <file base>, the most recent recovery file will be used");
249  params.setGlobalCommandLineParam("recover");
250 
251  params.addCommandLineParam<bool>("suppress_header",
252  "--suppress-header",
253  false,
254  "Disables the output of the application header.");
255  params.setGlobalCommandLineParam("suppress_header");
256 
257  params.addCommandLineParam<bool>(
258  "test_checkpoint_half_transient",
259  "--test-checkpoint-half-transient",
260  "Run half of a transient with checkpoints enabled; used by the TestHarness");
261  params.setGlobalCommandLineParam("test_checkpoint_half_transient");
262 
263  params.addCommandLineParam<bool>(
264  "trap_fpe",
265  "--trap-fpe",
266  "Enable floating point exception handling in critical sections of code"
267 #ifdef DEBUG
268  " (automatic due to debug build)"
269 #endif
270  );
271  params.setGlobalCommandLineParam("trap_fpe");
272 
273  params.addCommandLineParam<bool>(
274  "no_trap_fpe",
275  "--no-trap-fpe",
276  "Disable floating point exception handling in critical sections of code"
277 #ifndef DEBUG
278  " (unused due to non-debug build)"
279 #endif
280  );
281 
282  params.setGlobalCommandLineParam("no_trap_fpe");
283 
284  params.addCommandLineParam<bool>(
285  "no_gdb_backtrace", "--no-gdb-backtrace", "Disables gdb backtraces.");
286  params.setGlobalCommandLineParam("no_gdb_backtrace");
287 
288  params.addCommandLineParam<bool>("error", "--error", "Turn all warnings into errors");
289  params.setGlobalCommandLineParam("error");
290 
291  params.addCommandLineParam<bool>("timing",
292  "-t --timing",
293  "Enable all performance logging for timing; disables screen "
294  "output of performance logs for all Console objects");
295  params.setGlobalCommandLineParam("timing");
296  params.addCommandLineParam<bool>(
297  "no_timing", "--no-timing", "Disabled performance logging; overrides -t or --timing");
298  params.setGlobalCommandLineParam("no_timing");
299 
300  params.addCommandLineParam<bool>(
301  "allow_test_objects", "--allow-test-objects", "Register test objects and syntax");
302  params.setGlobalCommandLineParam("allow_test_objects");
303 
304  // Options ignored by MOOSE but picked up by libMesh, these are here so that they are displayed in
305  // the application help
306  params.addCommandLineParam<bool>(
307  "keep_cout",
308  "--keep-cout",
309  "Keep standard output from all processors when running in parallel");
310  params.setGlobalCommandLineParam("keep_cout");
311  params.addCommandLineParam<bool>(
312  "redirect_stdout",
313  "--redirect-stdout",
314  "Keep standard output from all processors when running in parallel");
315  params.setGlobalCommandLineParam("redirect_stdout");
316 
317  params.addCommandLineParam<std::string>(
318  "timpi_sync",
319  "--timpi-sync <type=nbx>",
320  "nbx",
321  "Changes the sync type used in spare parallel communitations within TIMPI");
322  params.setGlobalCommandLineParam("timpi_sync");
323 
324  // Options for debugging
325  params.addCommandLineParam<std::string>("start_in_debugger",
326  "--start-in-debugger <debugger>",
327  "Start the application and attach a debugger; this will "
328  "launch xterm windows using <debugger>");
329 
330  params.addCommandLineParam<unsigned int>(
331  "stop_for_debugger",
332  "--stop-for-debugger <seconds>",
333  "Pauses the application during startup for <seconds> to allow for connection of debuggers");
334 
335  params.addCommandLineParam<bool>(
336  "perf_graph_live_all", "--perf-graph-live-all", "Forces printing of ALL progress messages");
337  params.setGlobalCommandLineParam("perf_graph_live_all");
338 
339  params.addCommandLineParam<bool>(
340  "disable_perf_graph_live", "--disable-perf-graph-live", "Disables PerfGraph live printing");
341  params.setGlobalCommandLineParam("disable_perf_graph_live");
342 
343  params.addParam<bool>(
344  "automatic_automatic_scaling", false, "Whether to turn on automatic scaling by default");
345 
346  MooseEnum libtorch_device_type("cpu cuda mps", "cpu");
347  params.addCommandLineParam<MooseEnum>("libtorch_device",
348  "--libtorch-device",
349  libtorch_device_type,
350  "The device type we want to run libtorch on.");
351 
352 #ifdef HAVE_GPERFTOOLS
353  params.addCommandLineParam<std::string>(
354  "gperf_profiler_on",
355  "--gperf-profiler-on <ranks>",
356  "To generate profiling report only on comma-separated list of MPI ranks");
357 #endif
358 
359  params.addCommandLineParam<bool>(
360  "show_data_params",
361  "--show-data-params",
362  false,
363  "Show found paths for all DataFileName parameters in the header");
364  params.addCommandLineParam<bool>("show_data_paths",
365  "--show-data-paths",
366  false,
367  "Show registered data paths for searching in the header");
368 
369  params.addPrivateParam<std::string>("_app_name"); // the name passed to AppFactory::create
370  params.addPrivateParam<std::string>("_type");
371  params.addPrivateParam<int>("_argc");
372  params.addPrivateParam<char **>("_argv");
373  params.addPrivateParam<std::shared_ptr<CommandLine>>("_command_line");
374  params.addPrivateParam<std::shared_ptr<Parallel::Communicator>>("_comm");
375  params.addPrivateParam<unsigned int>("_multiapp_level");
376  params.addPrivateParam<unsigned int>("_multiapp_number");
377  params.addPrivateParam<const MooseMesh *>("_master_mesh");
378  params.addPrivateParam<const MooseMesh *>("_master_displaced_mesh");
379  params.addPrivateParam<std::unique_ptr<Backup> *>("_initial_backup", nullptr);
380  params.addPrivateParam<std::shared_ptr<Parser>>("_parser");
381 
382  params.addParam<bool>(
383  "use_legacy_material_output",
384  true,
385  "Set false to allow material properties to be output on INITIAL, not just TIMESTEP_END.");
386  params.addParam<bool>(
387  "use_legacy_initial_residual_evaluation_behavior",
388  true,
389  "The legacy behavior performs an often times redundant residual evaluation before the "
390  "solution modifying objects are executed prior to the initial (0th nonlinear iteration) "
391  "residual evaluation. The new behavior skips that redundant residual evaluation unless the "
392  "parameter Executioner/use_pre_SMO_residual is set to true.");
393 
394  params.addParam<bool>(
396  false,
397  "Set true to enable data-driven mesh generation, which is an experimental feature");
398 
399  MooseApp::addAppParam(params);
400 
401  return params;
402 }
void setGlobalCommandLineParam(const std::string &name)
Sets the command line parameter with name as global.
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
static void addInputParam(InputParameters &params)
Definition: MooseApp.C:97
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
void addCommandLineParam(const std::string &name, const std::string &syntax, const std::string &doc_string)
static void addAppParam(InputParameters &params)
Definition: MooseApp.C:90
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
static const std::string allow_data_driven_param
The name of the boolean parameter on the MooseApp that will enable data driven generation.
void addOptionalValuedCommandLineParam(const std::string &name, const std::string &syntax, const T &value, const std::string &doc_string)
Add a command line parameter with an optional value.

◆ writeRestartableMetaData() [1/2]

std::vector< std::filesystem::path > MooseApp::writeRestartableMetaData ( const RestartableDataMapName name,
const std::filesystem::path &  folder_base 
)

Writes the restartable meta data for name with a folder base of folder_base.

Returns
The files that were written

Definition at line 1991 of file MooseApp.C.

Referenced by MeshOnlyAction::act(), SplitMeshAction::act(), Checkpoint::output(), and writeRestartableMetaData().

1993 {
1994  if (processor_id() != 0)
1995  mooseError("MooseApp::writeRestartableMetaData(): Should only run on processor 0");
1996 
1997  const auto & map_name = getRestartableDataMapName(name);
1998  const auto meta_data_folder_base = metaDataFolderBase(folder_base, map_name);
1999 
2001  return writer.write(meta_data_folder_base);
2002 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
static std::filesystem::path metaDataFolderBase(const std::filesystem::path &folder_base, const std::string &map_suffix)
The file suffix for meta data (header and data)
Definition: MooseApp.C:2485
Writer for restartable data, to be read by the RestartableDataReader.
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Definition: MooseApp.h:434
RestartableDataMap & getRestartableDataMap(const RestartableDataMapName &name)
Return a reference to restartable data for the specific type flag.
Definition: MooseApp.C:2863
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
const std::string & getRestartableDataMapName(const RestartableDataMapName &name) const
Definition: MooseApp.C:2890

◆ writeRestartableMetaData() [2/2]

std::vector< std::filesystem::path > MooseApp::writeRestartableMetaData ( const std::filesystem::path &  folder_base)

Writes all available restartable meta data with a file base of file_base.

Returns
The files that were written

Definition at line 2005 of file MooseApp.C.

2006 {
2007  std::vector<std::filesystem::path> paths;
2008 
2009  if (processor_id() == 0)
2010  for (const auto & name_map_pair : _restartable_meta_data)
2011  {
2012  const auto map_paths = writeRestartableMetaData(name_map_pair.first, folder_base);
2013  paths.insert(paths.end(), map_paths.begin(), map_paths.end());
2014  }
2015 
2016  return paths;
2017 }
std::unordered_map< RestartableDataMapName, std::pair< RestartableDataMap, std::string > > _restartable_meta_data
General storage for custom RestartableData that can be added to from outside applications.
Definition: MooseApp.h:1442
std::vector< std::filesystem::path > writeRestartableMetaData(const RestartableDataMapName &name, const std::filesystem::path &folder_base)
Writes the restartable meta data for name with a folder base of folder_base.
Definition: MooseApp.C:1991
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Definition: MooseApp.h:434

Friends And Related Function Documentation

◆ FEProblemBase

friend class FEProblemBase
friend

Definition at line 1516 of file MooseApp.h.

◆ Restartable

friend class Restartable
friend

Definition at line 1517 of file MooseApp.h.

◆ SubProblem

friend class SubProblem
friend

Definition at line 1518 of file MooseApp.h.

Member Data Documentation

◆ _action_factory

ActionFactory MooseApp::_action_factory
protected

The Factory responsible for building Actions.

Definition at line 1176 of file MooseApp.h.

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

◆ _action_warehouse

ActionWarehouse MooseApp::_action_warehouse
protected

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 84 of file MooseBase.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), FEProblemBase::acceptInvalidSolution(), ElementIDOutputAction::act(), CreateExecutionerAction::act(), DeclareLateReportersAction::act(), AddExecutorAction::act(), AddMeshGeneratorAction::act(), AutoCheckpointAction::act(), ExecuteMeshGenerators::act(), CheckIntegrityAction::act(), ReadExecutorParamsAction::act(), CopyNodalVarsAction::act(), SetupMeshCompleteAction::act(), CreateProblemDefaultAction::act(), CreateProblemAction::act(), MeshOnlyAction::act(), SetupMeshAction::act(), SplitMeshAction::act(), AdaptivityAction::act(), CombineComponentsMeshes::act(), AddTimeStepperAction::act(), SetupDebugAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), ComposeTimeStepperAction::act(), SetupRecoverFileBaseAction::act(), CouplingFunctorCheckAction::act(), AddRelationshipManager::act(), SetAdaptivityOptionsAction::act(), CreateAddedMeshGenerators::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), ResolveOptionalMaterialPropertiesAction::act(), CommonOutputAction::act(), AddPeriodicBCAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), MeshGenerator::addChildMeshGenerator(), FEProblemBase::addMaterialHelper(), CylinderComponent::addMeshGenerators(), BatchMeshGeneratorAction::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), FEProblemBase::addMultiApp(), FEProblemBase::addOutput(), MeshGenerator::addParentMeshGenerator(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FVFluxKernel::adjustRMGhostLayers(), FEProblemBase::allowOutput(), AStableDirk4::AStableDirk4(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), FileMesh::buildMesh(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), MooseBase::callMooseError(), CheckOutputAction::checkConsoleOutput(), DefaultNonlinearConvergence::checkConvergence(), MeshGenerator::checkGetMesh(), FEProblemBase::checkICRestartError(), CheckOutputAction::checkMaterialOutput(), CheckOutputAction::checkPerfLogOutput(), CheckOutputAction::checkVariableOutput(), SingleRankPartitioner::clone(), RandomPartitioner::clone(), BlockWeightedPartitioner::clone(), GhostEverything::clone(), GhostHigherDLowerDPointNeighbors::clone(), GhostLowerDElems::clone(), LibmeshPartitioner::clone(), PetscExternalPartitioner::clone(), HierarchicalGridPartitioner::clone(), GridPartitioner::clone(), ElementSideNeighborLayers::clone(), ElementPointNeighborLayers::clone(), RedistributeProperties::clone(), GhostBoundary::clone(), ProxyRelationshipManager::clone(), OversampleOutput::cloneMesh(), FEProblemBase::computeJacobianTags(), FEProblemBase::computeLinearSystemTags(), FEProblemBase::computeResidualAndJacobian(), FEProblemBase::computeResidualTags(), Console::Console(), TimeStepper::constrainStep(), MultiApp::createApp(), MultiApp::createApps(), FEProblemBase::customSetup(), MeshGenerator::declareMeshProperty(), MeshGenerator::declareNullMeshName(), MooseMesh::determineUseDistributedMesh(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), DumpObjectsProblem::dumpVariableHelper(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenExecutionerBase::EigenExecutionerBase(), EigenKernel::EigenKernel(), InversePowerMethod::execute(), NonlinearEigen::execute(), PseudoTimestep::execute(), IterationInfo::execute(), PIDTransientControl::execute(), TransientBase::execute(), SteadyBase::execute(), Eigenvalue::execute(), EigenProblem::execute(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase::FEProblemBase(), FileOutput::FileOutput(), ChangeOverFixedPointPostprocessor::finalize(), RadialAverage::finalize(), FixedPointSolve::FixedPointSolve(), FEProblemBase::forceOutput(), FullSolveMultiApp::FullSolveMultiApp(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVAdvection::FVAdvection(), ExtraNodesetGenerator::generate(), SideSetsFromNormalsGenerator::generate(), FileMeshGenerator::generate(), MeshGenerator::generateInternal(), FEProblemBase::getExecutor(), MeshGenerator::getMeshByName(), MooseBase::getMooseApp(), NumRelationshipManagers::getValue(), NumFixedPointIterations::getValue(), GhostingUserObject::GhostingUserObject(), InversePowerMethod::init(), NonlinearEigen::init(), TransientBase::init(), Eigenvalue::init(), MooseMesh::init(), FEProblemBase::init(), TimePeriod::initialSetup(), Console::initialSetup(), FEProblemBase::initialSetup(), AdvancedOutput::initOutputList(), EigenProblem::initPetscOutputAndSomeSolverSettings(), FEProblemBase::initPetscOutputAndSomeSolverSettings(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MeshGenerator::MeshGenerator(), MooseObject::MooseObject(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), EigenExecutionerBase::normalizeSolution(), NumFailedTimeSteps::NumFailedTimeSteps(), PerfGraphOutput::output(), Tecplot::output(), Exodus::output(), Checkpoint::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Exodus::outputEmptyTimestep(), Console::outputInput(), Exodus::outputInput(), Exodus::outputNodalVariables(), OversampleOutput::outputStep(), Output::outputStep(), FEProblemBase::outputStep(), JSONOutput::outputSystemInformation(), Console::outputSystemInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), MultiApp::parentOutputPositionChanged(), TransientBase::preExecute(), PhysicsBase::prepareCopyVariablesFromMesh(), Eigenvalue::prepareSolverOptions(), FEProblemBase::projectSolution(), TiledMesh::safeClone(), FileMesh::safeClone(), ImageMesh::safeClone(), RinglebMesh::safeClone(), AnnularMesh::safeClone(), GeneratedMesh::safeClone(), SpiralAnnularMesh::safeClone(), ConcentricCircleMesh::safeClone(), MeshGeneratorMesh::safeClone(), StitchedMesh::safeClone(), PatternedMesh::safeClone(), MultiApp::setAppOutputFileBase(), FileOutput::setFileBaseInternal(), MeshGenerator::setMeshProperty(), MeshGenerator::setMeshPropertyHelper(), FEProblemBase::setRestartFile(), TransientMultiApp::setupApp(), MeshGeneratorComponent::setupComponent(), SetupMeshAction::setupMesh(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), Output::setWallTimeIntervalFromCommandLineParam(), SideSetExtruderGenerator::SideSetExtruderGenerator(), SolutionInvalidityReporter::SolutionInvalidityReporter(), EigenProblem::solve(), FEProblemBase::solve(), FEProblemBase::solveLinearSystem(), PetscOutput::solveSetup(), TransientMultiApp::solveStep(), FEProblemBase::subdomainSetup(), FEProblemBase::theWarehouse(), TimeExtremeValue::TimeExtremeValue(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), FEProblemBase::timestepSetup(), TransientBase::TransientBase(), FEProblemBase::updateMortarMesh(), Console::write(), and FEProblemBase::~FEProblemBase().

◆ _attached_relationship_managers

std::map<Moose::RelationshipManagerType, std::set<const RelationshipManager *> > MooseApp::_attached_relationship_managers
protected

The relationship managers that have been attached (type -> RMs)

Definition at line 1301 of file MooseApp.h.

Referenced by attachRelationshipManagers().

◆ _automatic_automatic_scaling

const bool MooseApp::_automatic_automatic_scaling
private

Whether to turn on automatic scaling by default.

Definition at line 1487 of file MooseApp.h.

Referenced by defaultAutomaticScaling().

◆ _builder

Moose::Builder MooseApp::_builder
protected

Builder for building app related parser tree.

Definition at line 1188 of file MooseApp.h.

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

◆ _chain_control_system

ChainControlDataSystem MooseApp::_chain_control_system
private

The system that manages the ChainControls.

Definition at line 1470 of file MooseApp.h.

Referenced by getChainControlDataSystem().

◆ _check_input

bool MooseApp::_check_input
protected

true if we want to just check the input file

Definition at line 1294 of file MooseApp.h.

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

◆ _comm

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

The MPI communicator this App is going to use.

Definition at line 1142 of file MooseApp.h.

Referenced by errorCheck(), getCommunicator(), MooseApp(), and processor_id().

◆ _command_line

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

Command line object.

Definition at line 1166 of file MooseApp.h.

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

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), FixedPointSolve::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MessageFromInput::execute(), SteadyBase::execute(), Eigenvalue::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), NonlinearEigen::init(), InversePowerMethod::init(), FEProblemBase::initialAdaptMesh(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), MooseBaseErrorInterface::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), SolutionInvalidityOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SteffensenSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), NonlinearSystemBase::setInitialSolution(), setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FixedPointSolve::solve(), FEProblemSolve::solve(), EigenProblem::solve(), NonlinearSystem::solve(), LinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), TerminateChainControl::terminate(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _cpu_profiling

bool MooseApp::_cpu_profiling = false
private

CPU profiling.

Definition at line 1490 of file MooseApp.h.

Referenced by MooseApp().

◆ _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 1267 of file MooseApp.h.

Referenced by getDistributedMeshOnCommandLine(), and setupOptions().

◆ _early_exit_param

std::string MooseApp::_early_exit_param
protected

Indicates if simulation is ready to exit, and keeps track of which param caused it to exit.

Definition at line 1255 of file MooseApp.h.

Referenced by errorCheck(), run(), runInputFile(), 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 1253 of file MooseApp.h.

Referenced by setErrorOverridden().

◆ _ex_reader

std::shared_ptr<libMesh::ExodusII_IO> MooseApp::_ex_reader
protected

The Exodus reader when _initial_from_file is set to true.

Definition at line 1264 of file MooseApp.h.

Referenced by getExReaderForRestart(), and setExReaderForRestart().

◆ _execute_flags

const ExecFlagEnum MooseApp::_execute_flags
private

Execution flags for this App.

Note: These are copied on purpose instead of maintaining a reference to the ExecFlagRegistry registry. In the Multiapp case, the registry may be augmented, changing the flags "known" to the application in the middle of executing the setup. This causes issues with the application having to process flags that aren't specifically registered.

Definition at line 1481 of file MooseApp.h.

Referenced by getExecuteOnEnum().

◆ _executioner

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

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

Definition at line 1209 of file MooseApp.h.

Referenced by attachRelationshipManagers(), errorCheck(), executeExecutioner(), feProblem(), getExecutioner(), removeRelationshipManager(), setExecutioner(), and setOutputPosition().

◆ _executor

std::shared_ptr<Executor> MooseApp::_executor
protected

◆ _executor_params

std::unordered_map<std::string, std::pair<std::string, std::unique_ptr<InputParameters> > > MooseApp::_executor_params
protected

Used in building the Executors Maps the name of the Executor block to the <type, params>

Definition at line 1220 of file MooseApp.h.

Referenced by addExecutorParams(), createExecutors(), and recursivelyCreateExecutors().

◆ _executors

std::map<std::string, std::shared_ptr<Executor> > MooseApp::_executors
protected

Pointers to all of the Executors for this run.

Definition at line 1215 of file MooseApp.h.

Referenced by addExecutor(), createExecutors(), getExecutor(), and recursivelyCreateExecutors().

◆ _exit_code

int MooseApp::_exit_code
protected

The exit code.

Definition at line 1258 of file MooseApp.h.

Referenced by exitCode(), setExitCode(), and setupOptions().

◆ _factory

Factory MooseApp::_factory
protected

◆ _file_base_set_by_user

bool MooseApp::_file_base_set_by_user
protected

Whether or not file base is set through input or setOutputFileBase by MultiApp.

Definition at line 1148 of file MooseApp.h.

Referenced by getCheckpointDirectories(), getOutputFileBase(), setOutputFileBase(), and setupOptions().

◆ _fixed_point_config

FixedPointConfig MooseApp::_fixed_point_config
protected

Multiapp-related fixed point algorithm configuration details primarily intended to be passed to and used by the executioner/executor system.

Definition at line 1224 of file MooseApp.h.

Referenced by fixedPointConfig().

◆ _global_time_offset

Real MooseApp::_global_time_offset
protected

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

Definition at line 1163 of file MooseApp.h.

Referenced by getGlobalTimeOffset(), and setGlobalTimeOffset().

◆ _heap_profiling

bool MooseApp::_heap_profiling = false
private

Memory profiling.

Definition at line 1493 of file MooseApp.h.

Referenced by MooseApp().

◆ _initial_backup

std::unique_ptr<Backup>* const MooseApp::_initial_backup
private

The backup for use in initial setup; this will get set from the _initial_backup input parameter that typically gets set from a MultiApp that has a backup This is a pointer to a pointer because at the time of construction of the app, the backup will not be filled yet.

Definition at line 1508 of file MooseApp.h.

Referenced by hasInitialBackup(), and restoreFromInitialBackup().

◆ _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 1261 of file MooseApp.h.

Referenced by getExodusFileRestart(), and setExodusFileRestart().

◆ _input_parameter_warehouse

std::unique_ptr<InputParameterWarehouse> MooseApp::_input_parameter_warehouse
protected

Input parameter storage structure; unique_ptr so we can control its destruction order.

Definition at line 1173 of file MooseApp.h.

Referenced by getInputParameterWarehouse().

◆ _interface_registry

std::map<std::type_index, std::unique_ptr<InterfaceRegistryObjectsBase> > MooseApp::_interface_registry
private

Registration for interface objects.

Definition at line 1502 of file MooseApp.h.

Referenced by getInterfaceObjects(), and registerInterfaceObject().

◆ _lib_handles

std::unordered_map<std::string, DynamicLibraryInfo> MooseApp::_lib_handles
protected

The library archive (name only), registration method and the handle to the method.

Definition at line 1318 of file MooseApp.h.

Referenced by getLoadedLibraryPaths(), and loadLibraryAndDependencies().

◆ _libtorch_device

const torch::DeviceType MooseApp::_libtorch_device
private

The libtorch device this app is using.

Definition at line 1512 of file MooseApp.h.

◆ _master_displaced_mesh

const MooseMesh* const MooseApp::_master_displaced_mesh
private

The displaced mesh from master app.

Definition at line 1464 of file MooseApp.h.

Referenced by masterDisplacedMesh(), and MooseApp().

◆ _master_mesh

const MooseMesh* const MooseApp::_master_mesh
private

The mesh from master app.

Definition at line 1461 of file MooseApp.h.

Referenced by masterMesh(), and MooseApp().

◆ _mesh_generator_system

MeshGeneratorSystem MooseApp::_mesh_generator_system
private

◆ _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 1455 of file MooseApp.h.

Referenced by getOutputFileBase(), isUltimateMaster(), MooseApp(), and multiAppLevel().

◆ _multiapp_number

unsigned int MooseApp::_multiapp_number
private

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

Definition at line 1458 of file MooseApp.h.

Referenced by multiAppNumber().

◆ _name

const std::string MooseBase::_name
protectedinherited

The name of this class.

Definition at line 90 of file MooseBase.h.

Referenced by AddBCAction::act(), AddDGKernelAction::act(), AddPostprocessorAction::act(), AddConstraintAction::act(), AddUserObjectAction::act(), AddIndicatorAction::act(), AddMarkerAction::act(), AddDiracKernelAction::act(), AddInterfaceKernelAction::act(), PartitionerAction::act(), AddFVInitialConditionAction::act(), AddMultiAppAction::act(), AddVectorPostprocessorAction::act(), ReadExecutorParamsAction::act(), AddScalarKernelAction::act(), AddTransferAction::act(), AddFunctorMaterialAction::act(), AddFVInterfaceKernelAction::act(), AddMaterialAction::act(), AddKernelAction::act(), AddDamperAction::act(), AddInitialConditionAction::act(), AddNodalKernelAction::act(), AddMeshGeneratorAction::act(), AddPositionsAction::act(), AddReporterAction::act(), AddTimesAction::act(), AddFieldSplitAction::act(), AddFVKernelAction::act(), AddFVBCAction::act(), AddConvergenceAction::act(), AddHDGKernelAction::act(), AddTimeStepperAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddFunctionAction::act(), AddMeshDivisionAction::act(), AddHDGBCAction::act(), AddOutputAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddCorrectorAction::act(), AddMeshModifiersAction::act(), AddSamplerAction::act(), AddControlAction::act(), AddPeriodicBCAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), PiecewiseTabularBase::buildFromFile(), PiecewiseTabularBase::buildFromXY(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), MultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenPointVectorsGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::name(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), and PiecewiseBase::setData().

◆ _null_executor

std::shared_ptr<NullExecutor> MooseApp::_null_executor
protected

Used to return an executor that does nothing.

Definition at line 1231 of file MooseApp.h.

Referenced by createExecutors(), getExecutor(), and getNullExecutor().

◆ _output_buffer_cache

std::streambuf* MooseApp::_output_buffer_cache
private

Cache output buffer so the language server can turn it off then back on.

Definition at line 1484 of file MooseApp.h.

Referenced by MooseApp(), and setupOptions().

◆ _output_file_base

std::string MooseApp::_output_file_base
protected

The output file basename.

Definition at line 1145 of file MooseApp.h.

Referenced by getOutputFileBase(), setOutputFileBase(), and setupOptions().

◆ _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 1291 of file MooseApp.h.

Referenced by getOutputFileNumbers(), and setOutputFileNumbers().

◆ _output_position

Point MooseApp::_output_position
protected

The output position.

Definition at line 1154 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 1151 of file MooseApp.h.

Referenced by hasOutputPosition(), and setOutputPosition().

◆ _output_warehouse

OutputWarehouse MooseApp::_output_warehouse
protected

OutputWarehouse object for this App.

Definition at line 1182 of file MooseApp.h.

Referenced by getOutputWarehouse(), setOutputFileBase(), and setOutputPosition().

◆ _pars

InputParameters MooseApp::_pars
protected

Parameters of this object.

Definition at line 1136 of file MooseApp.h.

Referenced by copyInputs(), getParam(), getRenamedParam(), isParamSetByUser(), isParamValid(), parameters(), setupOptions(), and showInputs().

◆ _parser

const std::shared_ptr<Parser> MooseApp::_parser
protected

Parser for parsing the input file.

Definition at line 1185 of file MooseApp.h.

Referenced by getInputFileNames(), getLastInputFileName(), parser(), and setupOptions().

◆ _perf_graph

PerfGraph& MooseApp::_perf_graph
protected

The PerfGraph object for this application (recoverable)

Definition at line 1200 of file MooseApp.h.

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

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 124 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 127 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _rank_map

const RankMap MooseApp::_rank_map
protected

The RankMap is a useful object for determining how the processes are laid out on the physical hardware.

Definition at line 1206 of file MooseApp.h.

Referenced by rankMap().

◆ _rd_reader

RestartableDataReader MooseApp::_rd_reader
private

Definition at line 1472 of file MooseApp.h.

Referenced by finalizeRestore(), and restore().

◆ _ready_to_exit

bool MooseApp::_ready_to_exit
protected

Definition at line 1256 of file MooseApp.h.

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

◆ _recover

bool MooseApp::_recover
protected

Whether or not this is a recovery run.

Definition at line 1270 of file MooseApp.h.

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

◆ _recoverable_data_names

DataNames MooseApp::_recoverable_data_names
protected

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

e.g. these names are excluded during restart.

Definition at line 1197 of file MooseApp.h.

Referenced by getRecoverableData(), and registerRestartableNameWithFilter().

◆ _relationship_managers

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

◆ _restart

bool MooseApp::_restart
protected

Whether or not this is a restart run.

Definition at line 1273 of file MooseApp.h.

Referenced by isRestarting(), and setRestart().

◆ _restart_recover_base

std::string MooseApp::_restart_recover_base
protected

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

Definition at line 1285 of file MooseApp.h.

Referenced by getRecoverFileBase(), getRestartRecoverFileBase(), hasRecoverFileBase(), hasRestartRecoverFileBase(), setRestartRecoverFileBase(), and setupOptions().

◆ _restartable_data

std::vector<RestartableDataMap> MooseApp::_restartable_data
protected

Where the restartable data is held (indexed on tid)

Definition at line 1191 of file MooseApp.h.

Referenced by backup(), getRestartableData(), and registerRestartableData().

◆ _restartable_meta_data

std::unordered_map<RestartableDataMapName, std::pair<RestartableDataMap, std::string> > MooseApp::_restartable_meta_data
private

◆ _solution_invalidity

SolutionInvalidity& MooseApp::_solution_invalidity
protected

The SolutionInvalidity object for this application.

Definition at line 1203 of file MooseApp.h.

Referenced by solutionInvalidity().

◆ _split_mesh

bool MooseApp::_split_mesh
protected

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

Definition at line 1276 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 1160 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 1157 of file MooseApp.h.

Referenced by hasStartTime(), and setStartTime().

◆ _syntax

Syntax MooseApp::_syntax
protected

Syntax of the input file.

Definition at line 1169 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 1240 of file MooseApp.h.

Referenced by getSystemInfo(), and MooseApp().

◆ _template_to_clones

std::map<const RelationshipManager *, std::map<const MeshBase *, std::unique_ptr<RelationshipManager> > > MooseApp::_template_to_clones
private

Map from a template relationship manager to a map in which the key-value pairs represent the MeshBase object and the clone of the template relationship manager, e.g.

the top-level map key

Definition at line 1499 of file MooseApp.h.

Referenced by createRMFromTemplateAndInit(), getRMClone(), and hasRMClone().

◆ _test_checkpoint_half_transient

bool MooseApp::_test_checkpoint_half_transient
protected

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

Definition at line 1288 of file MooseApp.h.

Referenced by setupOptions(), and testCheckpointHalfTransient().

◆ _the_warehouse

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

The combined warehouse for storing any MooseObject based object.

Definition at line 1452 of file MooseApp.h.

Referenced by MooseApp(), and theWarehouse().

◆ _trap_fpe

bool MooseApp::_trap_fpe
protected

Whether or not FPE trapping should be turned on.

Definition at line 1282 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 1139 of file MooseApp.h.

Referenced by MooseApp().

◆ _undisp_to_disp_rms

std::unordered_map<RelationshipManager *, std::shared_ptr<libMesh::GhostingFunctor> > MooseApp::_undisp_to_disp_rms
protected

A map from undisplaced relationship managers to their displaced clone (stored as the base GhostingFunctor).

Anytime we clone in attachRelationshipManagers we create a map entry from the cloned undisplaced relationship manager to its displaced clone counterpart. We leverage this map when removing relationship managers/ghosting functors

Definition at line 1308 of file MooseApp.h.

◆ _use_eigen_value

bool MooseApp::_use_eigen_value
protected

Boolean to indicate whether to use an eigenvalue executioner.

Definition at line 1237 of file MooseApp.h.

Referenced by useEigenvalue().

◆ _use_executor

const bool MooseApp::_use_executor
protected

Indicates whether we are operating in the new/experimental executor mode instead of using the legacy executioner system.

Definition at line 1228 of file MooseApp.h.

Referenced by executeExecutioner(), and useExecutor().

◆ _use_nonlinear

bool MooseApp::_use_nonlinear
protected

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

Definition at line 1234 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 1279 of file MooseApp.h.

◆ MESH_META_DATA

const RestartableDataMapName MooseApp::MESH_META_DATA = "MeshMetaData"
static

◆ MESH_META_DATA_SUFFIX

const RestartableDataMapName MooseApp::MESH_META_DATA_SUFFIX = "mesh"
static

Definition at line 110 of file MooseApp.h.

Referenced by MooseApp().


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