https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static 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

std::optional< MooseEnumgetComputeDevice () const
 Get the device accelerated computations are supposed to be running on.
 
torch::DeviceType getLibtorchDevice () const
 Get the device torch is supposed to be running on.
 
virtual ~MooseApp ()
 
TheWarehousetheWarehouse ()
 
virtual std::string getPrintableName () const
 Get printable name of the application.
 
virtual std::string appBinaryName () const
 
int exitCode () const
 Get the shell exit code for the application.
 
void setExitCode (const int exit_code)
 Sets the exit code that the application will exit with.
 
const RankMaprankMap ()
 The RankMap is a useful object for determining how the processes are laid out on the physical nodes of the cluster.
 
PerfGraphperfGraph ()
 Get the PerfGraph for this app.
 
virtual void run ()
 Run the application.
 
std::string getFrameworkVersion () const
 Returns the framework version.
 
virtual std::string getVersion () const
 Returns the current version of the framework or application (default: framework version).
 
std::string getPrintableVersion () const
 Non-virtual method for printing out the version string in a consistent format.
 
virtual void setupOptions ()
 Setup options based on InputParameters.
 
ActionWarehouseactionWarehouse ()
 Return a writable reference to the ActionWarehouse associated with this app.
 
const ActionWarehouseactionWarehouse () const
 Return a const reference to the ActionWarehouse associated with this app.
 
Moose::Builderbuilder ()
 Returns a writable reference to the builder.
 
Syntaxsyntax ()
 Returns a writable reference to the syntax object.
 
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.
 
std::string getOutputFileBase (bool for_non_moose_build_output=false) const
 Get the output file base name.
 
void setOutputPosition (const Point &p)
 Tell the app to output in a specific position.
 
std::list< std::string > getCheckpointDirectories () const
 Get all checkpoint directories.
 
std::list< std::string > getCheckpointFiles () const
 Extract all possible checkpoint file names.
 
bool hasOutputPosition () const
 Whether or not an output position has been set.
 
Point getOutputPosition () const
 Get the output position.
 
void setStartTime (Real time)
 Set the starting time for the simulation.
 
bool hasStartTime () const
 
Real getStartTime () const
 
void setGlobalTimeOffset (Real offset)
 Each App has it's own local time.
 
Real getGlobalTimeOffset () const
 Each App has it's own local time.
 
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.
 
void setErrorOverridden ()
 Set a flag so that the parser will throw an error if overridden parameters are detected.
 
void disableCheckUnusedFlag ()
 Removes warnings and error checks for unrecognized variables in the input file.
 
ExecutionergetExecutioner () const
 Retrieve the Executioner for this App.
 
ExecutorgetExecutor () const
 
NullExecutorgetNullExecutor () const
 
bool useExecutor () const
 
FEProblemBasefeProblem () const
 
void setExecutioner (std::shared_ptr< Executioner > &&executioner)
 Set the Executioner for this App.
 
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.
 
void createExecutors ()
 After adding all of the Executor Params - this function will actually cause all of them to be built.
 
ExecutorgetExecutor (const std::string &name, bool fail_if_not_found=true)
 Get an Executor.
 
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.
 
bool & useNonlinear ()
 Returns a writable Boolean indicating whether this app will use a Nonlinear or Eigen System.
 
bool & useEigenvalue ()
 Returns a writable Boolean indicating whether this app will use an eigenvalue executioner.
 
FactorygetFactory ()
 Retrieve a writable reference to the Factory associated with this App.
 
ActionFactorygetActionFactory ()
 Retrieve a writable reference to the ActionFactory associated with this App.
 
processor_id_type processor_id () const
 Returns the MPI processor ID of the current processor.
 
std::shared_ptr< CommandLinecommandLine () const
 Get the command line.
 
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.
 
bool getExodusFileRestart () const
 Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh.
 
void setExReaderForRestart (std::shared_ptr< libMesh::ExodusII_IO > &&exreader)
 Set the Exodus reader to restart variables from an Exodus mesh file.
 
libMesh::ExodusII_IOgetExReaderForRestart () const
 Get the Exodus reader to restart variables from an Exodus mesh file.
 
virtual void runInputFile ()
 Actually build everything in the input file.
 
virtual void executeExecutioner ()
 Execute the Executioner that was built.
 
bool getDistributedMeshOnCommandLine () const
 Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibility) on the command line and false otherwise.
 
bool isRecovering () const
 Whether or not this is a "recover" calculation.
 
bool isRestarting () const
 Whether or not this is a "restart" calculation.
 
bool isSplitMesh () const
 Whether or not this is a split mesh operation.
 
void setRestartRecoverFileBase (const std::string &file_base)
 mutator for recover_base (set by RecoverBaseAction)
 
bool testCheckpointHalfTransient () const
 Whether or not this simulation should only run half its transient (useful for testing recovery)
 
bool testReStep () const
 Whether or not this simulation should fail a timestep and repeat (for testing).
 
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.
 
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.
 
OutputWarehousegetOutputWarehouse ()
 Get the OutputWarehouse objects.
 
const OutputWarehousegetOutputWarehouse () const
 
const SystemInfogetSystemInfo () const
 Get SystemInfo object.
 
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)
 
std::string libNameToAppName (const std::string &library_name) const
 Converts a library name to an application name:
 
std::set< std::string > getLoadedLibraryPaths () const
 Return the paths of loaded libraries.
 
std::set< std::string > getLibrarySearchPaths (const std::string &library_path_from_param) const
 Return the paths searched by MOOSE when loading libraries.
 
InputParameterWarehousegetInputParameterWarehouse ()
 Get the InputParameterWarehouse for MooseObjects.
 
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.
 
void loadRestartableMetaData (const std::filesystem::path &folder_base)
 Loads all available restartable meta data if it is available with the folder base folder_base.
 
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.
 
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.
 
RestartableDataMapgetRestartableDataMap (const RestartableDataMapName &name)
 Return a reference to restartable data for the specific type flag.
 
bool hasRestartableDataMap (const RestartableDataMapName &name) const
 
void registerRestartableDataMapName (const RestartableDataMapName &name, std::string suffix="")
 Reserve a location for storing custom RestartableDataMap objects.
 
const std::string & getRestartableDataMapName (const RestartableDataMapName &name) const
 
const DataNamesgetRecoverableData () const
 Return a reference to the recoverable data object.
 
std::vector< std::filesystem::path > backup (const std::filesystem::path &folder_base)
 Backs up the application to the folder folder_base.
 
std::unique_ptr< Backupbackup ()
 Backs up the application memory in a Backup.
 
bool hasInitialBackupMesh () const
 Whether this app has an initial Backup object with mesh checkpoint entries.
 
bool restoredInitialBackupMesh () const
 Whether this app has restored mesh topology from its initial Backup object.
 
void markMeshChangedForBackup ()
 Mark this app as requiring mesh topology data in its next Backup object.
 
bool meshChangedForBackup () const
 Whether this app requires mesh topology data in its next Backup object.
 
void restoreMeshFromInitialBackup (MooseMesh &mesh)
 Restore mesh from this app's initial Backup object and consume the mesh checkpoint entries.
 
virtual void preBackup ()
 Insertion point for other apps that is called before backup()
 
void restore (const std::filesystem::path &folder_base, const bool for_restart)
 Restore an application from file.
 
void restore (std::unique_ptr< Backup > backup, const bool for_restart)
 Restore an application from the backup backup.
 
virtual void postRestore (const bool)
 Insertion point for other apps that is called after restore()
 
void restoreFromInitialBackup (const bool for_restart)
 Restores from a "initial" backup, that is, one set in _initial_backup.
 
std::unique_ptr< BackupfinalizeRestore ()
 Finalizes (closes) the restoration process done in restore().
 
bool restoreDataIfAvailable (RestartableDataValue &value, const THREAD_ID tid, Moose::PassKey< ReporterData >)
 Restores value in place from the checkpoint reader if it is present in the checkpoint and has not yet been loaded.
 
virtual std::string header () const
 Returns a string to be printed at the beginning of a simulation.
 
unsigned int multiAppLevel () const
 The MultiApp Level.
 
unsigned int multiAppNumber () const
 The MultiApp number.
 
bool isUltimateMaster () const
 Whether or not this app is the ultimate master app.
 
bool useMasterMesh () const
 Returns whether to use the parent app mesh as the mesh for this app.
 
const MooseMeshmasterMesh () const
 Returns a pointer to the master mesh.
 
const MooseMeshmasterDisplacedMesh () const
 Returns a pointer to the master displaced mesh.
 
MeshGeneratorSystemgetMeshGeneratorSystem ()
 Gets the system that manages the MeshGenerators.
 
ChainControlDataSystemgetChainControlDataSystem ()
 Gets the system that manages the ChainControls.
 
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.
 
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.
 
virtual bool constructingMeshGenerators () const
 Whether this app is constructing mesh generators.
 
bool checkInput () const
 Returns whether the Application is running in check input mode.
 
bool getFPTrapFlag () const
 Returns whether FPE trapping is turned on (either because of debug or user requested)
 
bool hasRelationshipManager (const std::string &name) const
 Returns a Boolean indicating whether a RelationshipManater exists with the same name.
 
bool addRelationshipManager (std::shared_ptr< RelationshipManager > relationship_manager)
 Transfers ownership of a RelationshipManager to the application for lifetime management.
 
std::filesystem::path restartFolderBase (const std::filesystem::path &folder_base) const
 The file suffix for restartable data.
 
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.
 
void attachRelationshipManagers (MeshBase &mesh, MooseMesh &moose_mesh)
 Attach geometric relationship managers to the given MeshBase object.
 
const std::vector< std::shared_ptr< RelationshipManager > > & getReleationshipManagers ()
 Retrieve the relationship managers.
 
std::vector< std::pair< std::string, std::string > > getRelationshipManagerInfo () const
 Returns the Relationship managers info suitable for printing.
 
const ExecFlagEnumgetExecuteOnEnum () const
 Return the app level ExecFlagEnum, this contains all the available flags for the app.
 
bool hasInitialBackup () const
 
bool defaultAutomaticScaling () const
 Whether to enable automatic scaling by default.
 
const std::shared_ptr< libMesh::Parallel::CommunicatorgetCommunicator () const
 
const std::set< std::shared_ptr< RelationshipManager > > & relationshipManagers () const
 Return the container of relationship managers.
 
void checkMetaDataIntegrity () const
 Function to check the integrity of the restartable meta data structure.
 
virtual bool errorOnJacobianNonzeroReallocation () const
 Whether this application should by default error on Jacobian nonzero reallocations.
 
template<class T >
void registerInterfaceObject (T &interface)
 Registers an interface object for accessing with getInterfaceObjects.
 
template<class T >
const std::vector< T * > & getInterfaceObjects () const
 Gets the registered interface objects for a given interface.
 
bool forceRestart () const
 Whether or not we are forcefully restarting (allowing the load of potentially incompatibie checkpoints); used within RestartableDataReader.
 
bool unusedFlagIsWarning () const
 Returns whether the flag for unused parameters is set to throw a warning only.
 
bool unusedFlagIsError () const
 Returns whether the flag for unused parameters is set to throw an error.
 
void setMFEMDevice (const std::string &device_string, bool gpu_aware_mpi, Moose::PassKey< MFEMProblemSolve >)
 Create/configure the MFEM device with the provided device_string.
 
std::shared_ptr< mfem::Device > getMFEMDevice (Moose::PassKey< MultiApp >)
 Get the MFEM device object.
 
const std::set< std::string > & getMFEMDevices (Moose::PassKey< MultiApp >) const
 Get the configured MFEM devices.
 
bool isKokkosAvailable () const
 Get whether Kokkos is available.
 
void allocateKokkosMemoryPool (std::size_t size, unsigned int ways) const
 Allocate Kokkos memory pool.
 
const Moose::Kokkos::MemoryPoolgetKokkosMemoryPool () const
 Get Kokkos memory pool.
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
MooseAppgetMooseApp () const
 Get the MooseApp this class is associated with.
 
const std::string & type () const
 Get the type of this class.
 
const std::string & name () const
 Get the name of the class.
 
std::string typeAndName () const
 Get the class's combined type and name; useful in error handling.
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 Get the parameters of the object.
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object.
 
template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 Retrieve two parameters and provide pair of parameters for the object.
 
template<typename T >
const T * queryParam (const std::string &name) const
 Query a parameter for the object.
 
template<typename T >
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 Retrieve a renamed parameter for the object.
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller.
 
bool isParamValid (const std::string &name) const
 Test if the supplied parameter is valid.
 
bool isParamSetByUser (const std::string &name) const
 Test if the supplied parameter is set by a user, as opposed to not set or set to default.
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 Connect controllable parameter of this action with the controllable parameters of the objects added by this action.
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args) const
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args) const
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 Deprecated message prefix; the error type is no longer used.
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.
 
template<typename... Args>
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
template<typename... Args>
void mooseErrorNonPrefixed (Args &&... args) const
 Emits an error without the prefixing included in mooseError().
 
template<typename... Args>
void mooseWarning (Args &&... args) const
 Emits a warning prefixed with object name and type.
 
template<typename... Args>
void mooseWarningNonPrefixed (Args &&... args) const
 Emits a warning without the prefixing included in mooseWarning().
 
template<typename... Args>
void mooseDeprecated (Args &&... args) const
 Emits a deprecation warning prefixed with the object name and type, and a stack trace.
 
template<typename... Args>
void mooseDeprecatedNoTrace (Args &&... args) const
 Emits a deprecation warning prefixed with the object name and type, and no stack trace.
 
template<typename... Args>
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 External method for calling moose error with added object context.
 
SolutionInvaliditysolutionInvalidity ()
 Get the SolutionInvalidity for this app.
 
const SolutionInvaliditysolutionInvalidity () const
 
const Parserparser () const
 
Parserparser ()
 
bool hasRestartRecoverFileBase () const
 Return true if the recovery file base is set.
 
bool hasRecoverFileBase () const
 
std::string getRestartRecoverFileBase () const
 The file_base for the recovery file.
 
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.
 
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.
 
std::vector< RestartableDataMap > & getRestartableData ()
 
void setRestart (bool value)
 Sets the restart/recover flags.
 
void setRecover (bool value)
 
auto getRestartableDataMapBegin ()
 Iterator based access to the extra RestartableDataMap objects; see Checkpoint.C for use case.
 
auto getRestartableDataMapEnd ()
 

Static Public Member Functions

static InputParameters validParams ()
 
static const std::string & checkpointSuffix ()
 The file suffix for the checkpoint mesh.
 
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)
 
static void addAppParam (InputParameters &params)
 
static void addInputParam (InputParameters &params)
 
static bool isRelocated ()
 
static bool isInTree ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 External method for calling moose error with added object context.
 

Public Attributes

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

Static Public Attributes

static const RestartableDataMapName MESH_META_DATA = "MeshMetaData"
 
static const std::string MESH_META_DATA_SUFFIX = "mesh"
 
static const std::string type_param = "_type"
 The name of the parameter that contains the object type.
 
static const std::string name_param = "_object_name"
 The name of the parameter that contains the object name.
 
static const std::string unique_name_param = "_unique_name"
 The name of the parameter that contains the unique object name.
 
static const std::string app_param = "_moose_app"
 The name of the parameter that contains the MooseApp.
 
static const std::string moose_base_param = "_moose_base"
 The name of the parameter that contains the moose system base.
 
static const std::string kokkos_object_param = "_kokkos_object"
 The name of the parameter that indicates an object is a Kokkos functor.
 

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

 FRIEND_TEST (::CapabilitiesTest, mooseAppAddBoolCapability)
 
 FRIEND_TEST (::CapabilitiesTest, mooseAppAddIntCapability)
 
 FRIEND_TEST (::CapabilitiesTest, mooseAppAddStringCapability)
 
 FRIEND_TEST (::CapabilitiesTest, mooseAppAddCapability)
 
void dynamicRegistration (const libMesh::Parameters &params)
 Helper method for dynamic loading of objects.
 
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.
 
 MooseApp (const InputParameters &parameters)
 Constructor is protected so that this object is constructed through the AppFactory object.
 
void registerRestartableNameWithFilter (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 NOTE: This is an internal function meant for MOOSE use only!
 
void errorCheck ()
 Runs post-initialization error checking that cannot be run correctly unless the simulation has been fully set up and initialized.
 
void outputMachineReadableData (const std::string &param, const std::string &start_marker, const std::string &end_marker, const std::string &data) const
 Outputs machine readable data (JSON, YAML, etc.) either to the screen (if no filename was provided as an argument to the parameter param) or to a file (if a filename was provided).
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing.
 
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.
 
std::string timedSectionName (const std::string &section_name) const
 

Static Protected Member Functions

static Moose::CapabilityaddBoolCapability (const std::string_view capability, const bool value, const std::string_view doc)
 Register a boolean capability.
 
static Moose::CapabilityaddIntCapability (const std::string_view capability, const int value, const std::string_view doc)
 Register an integer capability.
 
static Moose::CapabilityaddStringCapability (const std::string_view capability, const std::string_view value, const std::string_view doc)
 Register a string capability.
 
static Moose::CapabilityaddCapability (const std::string_view capability, const Moose::Capability::Value &value, const std::string_view doc)
 Deprecated method for adding a capability.
 

Protected Attributes

const std::string _type
 The string representation of the type of this object as registered (see registerApp(AppName))
 
const std::shared_ptr< libMesh::Parallel::Communicator_comm
 The MPI communicator this App is going to use.
 
std::string _output_file_base
 The output file basename.
 
bool _file_base_set_by_user
 Whether or not file base is set through input or setOutputFileBase by MultiApp.
 
bool _output_position_set
 Whether or not an output position has been set for this app.
 
Point _output_position
 The output position.
 
bool _start_time_set
 Whether or not an start time has been set.
 
Real _start_time
 The time at which to start the simulation.
 
Real _global_time_offset
 Offset of the local App time to the "global" problem time.
 
Syntax _syntax
 Syntax of the input file.
 
std::unique_ptr< InputParameterWarehouse_input_parameter_warehouse
 Input parameter storage structure; unique_ptr so we can control its destruction order.
 
ActionFactory _action_factory
 The Factory responsible for building Actions.
 
ActionWarehouse _action_warehouse
 Where built actions are stored.
 
OutputWarehouse _output_warehouse
 OutputWarehouse object for this App.
 
const std::shared_ptr< Parser_parser
 Parser for parsing the input file (owns the root hit node)
 
const std::shared_ptr< CommandLine_command_line
 The CommandLine object.
 
SystemInfo _sys_info
 System Information.
 
Moose::Builder _builder
 Builder for building app related parser tree.
 
std::vector< RestartableDataMap_restartable_data
 Where the restartable data is held (indexed on tid)
 
DataNames _recoverable_data_names
 Data names that will only be read from the restart file during RECOVERY.
 
PerfGraph_perf_graph
 The PerfGraph object for this application (recoverable)
 
SolutionInvalidity_solution_invalidity
 The SolutionInvalidity object for this application.
 
const RankMap _rank_map
 The RankMap is a useful object for determining how the processes are laid out on the physical hardware.
 
std::shared_ptr< Executioner_executioner
 Pointer to the executioner of this run (typically build by actions)
 
std::shared_ptr< Executor_executor
 Pointer to the Executor of this run.
 
std::map< std::string, std::shared_ptr< Executor > > _executors
 Pointers to all of the Executors for this run.
 
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>
 
FixedPointConfig _fixed_point_config
 Multiapp-related fixed point algorithm configuration details primarily intended to be passed to and used by the executioner/executor system.
 
const bool _use_executor
 Indicates whether we are operating in the new/experimental executor mode instead of using the legacy executioner system.
 
std::shared_ptr< NullExecutor_null_executor
 Used to return an executor that does nothing.
 
bool _use_nonlinear
 Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions)
 
bool _use_eigen_value
 Boolean to indicate whether to use an eigenvalue executioner.
 
enum MooseApp::UNUSED_CHECK _enable_unused_check
 
Factory _factory
 
bool _error_overridden
 Indicates whether warnings or errors are displayed when overridden parameters are detected.
 
std::string _early_exit_param
 Indicates if simulation is ready to exit, and keeps track of which param caused it to exit.
 
bool _ready_to_exit
 
int _exit_code
 The exit code.
 
bool _initial_from_file
 This variable indicates when a request has been made to restart from an Exodus file.
 
std::shared_ptr< libMesh::ExodusII_IO_ex_reader
 The Exodus reader when _initial_from_file is set to true.
 
const bool _distributed_mesh_on_command_line
 This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh.
 
bool _recover
 Whether or not this is a recovery run.
 
bool _restart
 Whether or not this is a restart run.
 
bool _split_mesh
 Whether or not we are performing a split mesh operation (–split-mesh)
 
const bool _use_split
 Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
 
const bool _force_restart
 Whether or not we are forcefully attempting to load checkpoints (–force-restart)
 
bool _trap_fpe
 Whether or not FPE trapping should be turned on.
 
std::string _restart_recover_base
 The base name to restart/recover from. If blank then we will find the newest checkpoint file.
 
const bool _test_checkpoint_half_transient
 Whether or not this simulation should only run half its transient (useful for testing recovery)
 
const bool _test_restep
 Whether or not this simulation should fail its middle timestep and repeat (for testing)
 
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)
 
const bool _check_input
 true if we want to just check the input file
 
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
 The relationship managers that have been added.
 
std::map< Moose::RelationshipManagerType, std::set< const RelationshipManager * > > _attached_relationship_managers
 The relationship managers that have been attached (type -> RMs)
 
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).
 
std::unordered_map< std::string, DynamicLibraryInfo_lib_handles
 The library archive (name only), registration method and the handle to the method.
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph.
 
const std::string _prefix
 A prefix to use for all sections.
 
const Parallel::Communicator_communicator
 
MooseApp_app
 The MOOSE application this is associated with.
 
const std::string & _name
 The name of this class.
 
const InputParameters_pars
 The object's parameters.
 

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.
 
void removeRelationshipManager (std::shared_ptr< RelationshipManager > relationship_manager)
 Purge this relationship manager from meshes and DofMaps and finally from us.
 
torch::DeviceType determineLibtorchDeviceType (const MooseEnum &device) const
 Function to determine the device which should be used by libtorch on this application.
 
void createMinimalApp ()
 Method for creating the minimum required actions for an application (no input file)
 
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.
 
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.
 
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.
 
PerfGraphcreateRecoverablePerfGraph ()
 Creates a recoverable PerfGraph.
 
SolutionInvaliditycreateRecoverableSolutionInvalidity ()
 Creates a recoverable SolutionInvalidity.
 
bool showInputs () const
 Prints a message showing the installable inputs for a given application (if getInstallableInputs has been overridden for an application).
 
virtual std::string getInstallableInputs () const
 Method to retrieve the installable inputs from a given applications <app>Revision.h file.
 
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.
 
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.
 
void requestCitations ()
 Handles the –citations command-line option: registers with PETSc the BibTeX entries that should be cited for the framework and the modules/objects used in this simulation, and enables PETSc's -citations option.
 
void collectCitations (std::map< std::string, std::string > &citations) const
 Collects the BibTeX citations for the modules/objects constructed in this app and the finite element backend it uses, then recurses into every MultiApp subapp to do the same.
 
void queryKokkosGPUs ()
 Query the Kokkos GPUs in the system and check whether every process has an associated GPU.
 
void deallocateKokkosMemoryPool ()
 Deallocate Kokkos memory pool.
 

Static Private Member Functions

static Moose::CapabilityaddCapabilityInternal (const std::string_view capability, const Moose::Capability::Value &value, const std::string_view doc)
 Internal method for adding a capability.
 
static const hit::Node * getHitNode (const InputParameters &params)
 Internal method for getting a hit node (if available) given a set of parameters.
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 Internal method for getting the message prefix for an object (object type, name, etc).
 

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.
 
std::unique_ptr< TheWarehouse_the_warehouse
 The combined warehouse for storing any MooseObject based object.
 
const unsigned int _multiapp_level
 Level of multiapp, the master is level 0. This used by the Console to indent output.
 
const unsigned int _multiapp_number
 Numbering in all the sub-apps on the same level.
 
const bool _use_master_mesh
 Whether to use the parent app mesh for this app.
 
const MooseMesh *const _master_mesh
 The mesh from master app.
 
const MooseMesh *const _master_displaced_mesh
 The displaced mesh from master app.
 
MeshGeneratorSystem _mesh_generator_system
 The system that manages the MeshGenerators.
 
ChainControlDataSystem _chain_control_system
 The system that manages the ChainControls.
 
RestartableDataReader _rd_reader
 
const ExecFlagEnum _execute_flags
 Execution flags for this App.
 
std::streambuf * _output_buffer_cache
 Cache output buffer so the language server can turn it off then back on.
 
const bool _automatic_automatic_scaling
 Whether to turn on automatic scaling by default.
 
bool _cpu_profiling = false
 CPU profiling.
 
bool _heap_profiling = false
 Memory profiling.
 
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.
 
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
 Registration for interface objects.
 
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.
 
bool _restored_initial_backup_mesh = false
 Whether mesh topology has been restored from the initial Backup object.
 
bool _mesh_changed_for_backup = false
 Whether mesh topology has changed and should be included in Backup objects.
 
const torch::DeviceType _libtorch_device
 The libtorch device this app is using (converted from compute_device)
 
std::shared_ptr< mfem::Device > _mfem_device
 The MFEM Device object.
 
std::set< std::string > _mfem_devices
 MFEM supported devices based on user-provided config.
 
bool _has_kokkos_gpus = false
 Flag whether every process has an associated Kokkos GPU.
 

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

Member Enumeration Documentation

◆ RegistrationType

Enumeration for holding the valid types of dynamic registrations allowed.

Enumerator
APPLICATION 
REGALL 

Definition at line 1667 of file MooseApp.h.

1668 {
1670 REGALL
1671 };
@ APPLICATION
Definition MooseApp.h:1669

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

1396 {
1397 OFF,
@ WARN_UNUSED
Definition MooseApp.h:1398
@ ERROR_UNUSED
Definition MooseApp.h:1399
enum MooseApp::UNUSED_CHECK _enable_unused_check

Constructor & Destructor Documentation

◆ ~MooseApp()

virtual MooseApp::~MooseApp ( )
virtual

◆ MooseApp()

MooseApp::MooseApp ( const InputParameters parameters)
protected

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

Definition at line 626 of file MooseApp.C.

627 : PerfGraphInterface(*this, "MooseApp"),
628 ParallelObject(*parameters.get<std::shared_ptr<Parallel::Communicator>>(
629 "_comm")), // Can't call getParam() before pars is set
630 // The use of AppFactory::getAppParams() is atrocious. However, a long time ago
631 // we decided to copy construct parameters in each derived application...
632 // which means that the "parameters" we get if someone derives from MooseApp are
633 // actually a copy of the ones built by the factory. Because we have unique
634 // application names, this allows us to reference (using _pars and MooseBase)
635 // the actual const parameters that the AppFactory made for this application
636 MooseBase(*this, AppFactory::instance().getAppParams(parameters)),
637 _comm(getParam<std::shared_ptr<Parallel::Communicator>>("_comm")),
640 _start_time_set(false),
641 _start_time(0.0),
643 _input_parameter_warehouse(std::make_unique<InputParameterWarehouse>()),
644 _action_factory(*this),
646 _output_warehouse(*this),
647 _parser(getCheckedPointerParam<std::shared_ptr<Parser>>("_parser")),
648 _command_line(getCheckedPointerParam<std::shared_ptr<CommandLine>>("_command_line")),
654 _use_executor(getParam<bool>("use_executor")),
655 _null_executor(NULL),
656 _use_nonlinear(true),
657 _use_eigen_value(false),
659 _factory(*this),
660 _error_overridden(false),
662 _ready_to_exit(false),
663 _exit_code(0),
664 _initial_from_file(false),
665 _distributed_mesh_on_command_line(getParam<bool>("distributed_mesh")),
666 _recover(false),
667 _restart(false),
668 _split_mesh(false),
669 _use_split(getParam<bool>("use_split")),
670 _force_restart(getParam<bool>("force_restart")),
671#ifdef DEBUG
672 _trap_fpe(true),
673#else
674 _trap_fpe(false),
675#endif
676 _test_checkpoint_half_transient(parameters.get<bool>("test_checkpoint_half_transient")),
677 _test_restep(parameters.get<bool>("test_restep")),
678 _check_input(getParam<bool>("check_input")),
679 _multiapp_level(isParamValid("_multiapp_level") ? getParam<unsigned int>("_multiapp_level")
680 : 0),
681 _multiapp_number(isParamValid("_multiapp_number") ? getParam<unsigned int>("_multiapp_number")
682 : 0),
683 _use_master_mesh(getParam<bool>("_use_master_mesh")),
684 _master_mesh(isParamValid("_master_mesh") ? getParam<const MooseMesh *>("_master_mesh")
685 : nullptr),
686 _master_displaced_mesh(isParamValid("_master_displaced_mesh")
687 ? getParam<const MooseMesh *>("_master_displaced_mesh")
688 : nullptr),
692 _execute_flags(moose::internal::ExecFlagRegistry::getExecFlagRegistry().getFlags()),
693 _output_buffer_cache(nullptr),
694 _automatic_automatic_scaling(getParam<bool>("automatic_automatic_scaling")),
695 _initial_backup(getParam<std::unique_ptr<Backup> *>("_initial_backup"))
696#ifdef MOOSE_LIBTORCH_ENABLED
697 ,
699#endif
700#ifdef MOOSE_MFEM_ENABLED
701 ,
702 _mfem_device(isParamValid("_mfem_device")
703 ? getParam<std::shared_ptr<mfem::Device>>("_mfem_device")
704 : nullptr),
705 _mfem_devices(isParamValid("_mfem_devices") ? getParam<std::set<std::string>>("_mfem_devices")
706 : std::set<std::string>{})
707#endif
708{
709 if (&parameters != &_pars)
710 {
711 const std::string bad_params = "(InputParameters parameters)";
712 const std::string good_params = "(const InputParameters & parameters)";
713 const std::string source_constructor = type() + "::" + type();
714 mooseDoOnce(
716 " copy-constructs its input parameters.\n\n",
717 "This is deprecated and will not be allowed in the future.\n\n",
718 "In ",
719 type(),
720 ".C, change:\n ",
721 source_constructor,
722 bad_params,
723 " -> ",
724 source_constructor,
725 good_params,
726 "\n\n",
727 "In ",
728 type(),
729 ".h, change:\n ",
730 type(),
731 bad_params,
732 "; -> ",
733 type(),
734 good_params,
735 ";"));
736 }
737
738 mooseAssert(_command_line->hasParsed(), "Command line has not parsed");
739 mooseAssert(_parser->queryRoot(), "Parser has not parsed");
740
741 // Set the TIMPI sync type via --timpi-sync
742 const auto & timpi_sync = getParam<std::string>("timpi_sync");
743 const_cast<Parallel::Communicator &>(comm()).sync_type(timpi_sync);
744
745#ifdef HAVE_GPERFTOOLS
746 if (isUltimateMaster())
747 {
748 bool has_cpu_profiling = false;
749 bool has_heap_profiling = false;
750 static std::string cpu_profile_file;
751 static std::string heap_profile_file;
752
753 // For CPU profiling, users need to have environment 'MOOSE_PROFILE_BASE'
754 if (std::getenv("MOOSE_PROFILE_BASE"))
755 {
756 has_cpu_profiling = true;
757 cpu_profile_file =
758 std::getenv("MOOSE_PROFILE_BASE") + std::to_string(_comm->rank()) + ".prof";
759 // create directory if needed
760 auto name = MooseUtils::splitFileName(cpu_profile_file);
761 if (!name.first.empty())
762 {
763 if (processor_id() == 0)
764 MooseUtils::makedirs(name.first.c_str());
765 _comm->barrier();
766 }
767 }
768
769 // For Heap profiling, users need to have 'MOOSE_HEAP_BASE'
770 if (std::getenv("MOOSE_HEAP_BASE"))
771 {
772 has_heap_profiling = true;
773 heap_profile_file = std::getenv("MOOSE_HEAP_BASE") + std::to_string(_comm->rank());
774 // create directory if needed
775 auto name = MooseUtils::splitFileName(heap_profile_file);
776 if (!name.first.empty())
777 {
778 if (processor_id() == 0)
779 MooseUtils::makedirs(name.first.c_str());
780 _comm->barrier();
781 }
782 }
783
784 // turn on profiling only on selected ranks
785 if (isParamSetByUser("gperf_profiler_on"))
786 {
787 auto rankstr = getParam<std::string>("gperf_profiler_on");
788 std::vector<processor_id_type> ranks;
789 bool success = MooseUtils::tokenizeAndConvert(rankstr, ranks, ", ");
790 if (!success)
791 mooseError("Invalid argument for --gperf-profiler-on: '", rankstr, "'");
792 for (auto & rank : ranks)
793 {
794 if (rank >= _comm->size())
795 mooseError("Invalid argument for --gperf-profiler-on: ",
796 rank,
797 " is greater than or equal to ",
798 _comm->size());
799 if (rank == _comm->rank())
800 {
801 _cpu_profiling = has_cpu_profiling;
802 _heap_profiling = has_heap_profiling;
803 }
804 }
805 }
806 else
807 {
808 _cpu_profiling = has_cpu_profiling;
809 _heap_profiling = has_heap_profiling;
810 }
811
812 if (_cpu_profiling)
813 if (!ProfilerStart(cpu_profile_file.c_str()))
814 mooseError("CPU profiler is not started properly");
815
816 if (_heap_profiling)
817 {
818 HeapProfilerStart(heap_profile_file.c_str());
819 if (!IsHeapProfilerRunning())
820 mooseError("Heap profiler is not started properly");
821 }
822 }
823#else
824 if (std::getenv("MOOSE_PROFILE_BASE") || std::getenv("MOOSE_HEAP_BASE"))
825 mooseError("gperftool is not available for CPU or heap profiling");
826#endif
827
828 // If this will be a language server then turn off output until that starts
829 if (isParamValid("language_server") && getParam<bool>("language_server"))
830 _output_buffer_cache = Moose::out.rdbuf(nullptr);
831
834
835 _the_warehouse = std::make_unique<TheWarehouse>();
836 _the_warehouse->registerAttribute<AttribMatrixTags>("matrix_tags", 0);
837 _the_warehouse->registerAttribute<AttribVectorTags>("vector_tags", 0);
838 _the_warehouse->registerAttribute<AttribExecOns>("exec_ons", 0);
839 _the_warehouse->registerAttribute<AttribSubdomains>("subdomains", 0);
840 _the_warehouse->registerAttribute<AttribBoundaries>("boundaries", 0);
841 _the_warehouse->registerAttribute<AttribThread>("thread", 0);
842 _the_warehouse->registerAttribute<AttribExecutionOrderGroup>("execution_order_group", 0);
843 _the_warehouse->registerAttribute<AttribPreIC>("pre_ic", 0);
844 _the_warehouse->registerAttribute<AttribPreAux>("pre_aux");
845 _the_warehouse->registerAttribute<AttribPostAux>("post_aux");
846 _the_warehouse->registerAttribute<AttribName>("name", "dummy");
847 _the_warehouse->registerAttribute<AttribSystem>("system", "dummy");
848 _the_warehouse->registerAttribute<AttribKokkos>("kokkos", false);
849 _the_warehouse->registerAttribute<AttribVar>("variable", -1);
850 _the_warehouse->registerAttribute<AttribInterfaces>("interfaces", 0);
851 _the_warehouse->registerAttribute<AttribSysNum>("sys_num", libMesh::invalid_uint);
852 _the_warehouse->registerAttribute<AttribResidualObject>("residual_object");
853 _the_warehouse->registerAttribute<AttribSorted>("sorted");
854 _the_warehouse->registerAttribute<AttribDisplaced>("displaced", -1);
855
857
858 if (_check_input && isParamSetByUser("recover"))
859 mooseError("Cannot run --check-input with --recover. Recover files might not exist");
860
861 if (isParamSetByUser("start_in_debugger") && isUltimateMaster())
862 {
863 auto command = getParam<std::string>("start_in_debugger");
864
865 Moose::out << "Starting in debugger using: " << command << std::endl;
866
868
869 std::stringstream command_stream;
870
871 // This will start XTerm and print out some info first... then run the debugger
872 command_stream << "xterm -e \"echo 'Rank: " << processor_id() << " Hostname: " << hostname
873 << " PID: " << getpid() << "'; echo ''; ";
874
875 // Figure out how to run the debugger
876 if (command.find("lldb") != std::string::npos || command.find("gdb") != std::string::npos)
877 command_stream << command << " -p " << getpid();
878 else
879 mooseError("Unknown debugger: ",
880 command,
881 "\nIf this is truly what you meant then contact moose-users to have a discussion "
882 "about adding your debugger.");
883
884 // Finish up the command
885 command_stream << "\"" << " & ";
886 std::string command_string = command_stream.str();
887 Moose::out << "Running: " << command_string << std::endl;
888
889 int ret = std::system(command_string.c_str());
890 libmesh_ignore(ret);
891
892 // Sleep to allow time for the debugger to attach
893 std::this_thread::sleep_for(std::chrono::seconds(10));
894 }
895
896 if (isParamSetByUser("stop_for_debugger") && isUltimateMaster())
897 {
898 Moose::out << "\nStopping for " << getParam<unsigned int>("stop_for_debugger")
899 << " seconds to allow attachment from a debugger.\n";
900
901 Moose::out << "\nAll of the processes you can connect to:\n";
902 Moose::out << "rank - hostname - pid\n";
903
905
906 {
907 // The 'false' turns off the serialization warning
908 SerializerGuard sg(_communicator, false); // Guarantees that the processors print in order
909 Moose::err << processor_id() << " - " << hostname << " - " << getpid() << "\n";
910 }
911
912 Moose::out << "\nWaiting...\n" << std::endl;
913
914 // Sleep to allow time for the debugger to attach
915 std::this_thread::sleep_for(std::chrono::seconds(getParam<unsigned int>("stop_for_debugger")));
916 }
917
918 if (isParamSetByUser("show_actions"))
920
922 mooseError("Mesh can be passed in only for sub-apps");
923
925 mooseError("_master_mesh should have been set when _master_displaced_mesh is set");
926
927#ifdef MOOSE_MFEM_ENABLED
928 if (_mfem_device)
929 {
930 mooseAssert(!isUltimateMaster(),
931 "The MFEM device should only be auto-set for sub-applications");
932 mooseAssert(!_mfem_devices.empty(),
933 "If we are a sub-application and we have an MFEM device object, then we must know "
934 "its configuration string");
935 }
936#endif
937
938 // Data specifically associated with the mesh (meta-data) that will read from the restart
939 // file early during the simulation setup so that they are available to Actions and other objects
940 // that need them during the setup process. Most of the restartable data isn't made available
941 // until all objects have been created and all Actions have been executed (i.e. initialSetup).
943
944 if (_pars.have_parameter<bool>("use_legacy_dirichlet_bc"))
945 mooseDeprecated("The parameter 'use_legacy_dirichlet_bc' is no longer valid.\n\n",
946 "All Dirichlet boundary conditions are preset by default.\n\n",
947 "Remove said parameter in ",
948 name(),
949 " to remove this deprecation warning.");
950
952 mooseError("Cannot use --test-restep and --test-checkpoint-half-transient together");
953
954 Moose::out << std::flush;
955
956#ifdef MOOSE_KOKKOS_ENABLED
957#ifdef MOOSE_ENABLE_KOKKOS_GPU
959#endif
960#endif
961}
962
963std::optional<MooseEnum>
965{
966 if (isParamSetByUser("compute_device"))
967 return getParam<MooseEnum>("compute_device");
968 return {};
969}
970
972{
973#ifdef HAVE_GPERFTOOLS
974 // CPU profiling stop
975 if (_cpu_profiling)
976 ProfilerStop();
977 // Heap profiling stop
978 if (_heap_profiling)
979 HeapProfilerStop();
980#endif
982 _the_warehouse.reset();
983 _executioner.reset();
984
985 // Don't wait for implicit destruction of input parameter storage
987
988 // This is dirty, but I don't know what else to do. Obviously, others
989 // have had similar problems if you look above. In specific, the
990 // dlclose below on macs is destructing some data that does not
991 // belong to it in garbage collection. So... don't even give
992 // dlclose an option
993 _restartable_data.clear();
994
995 // Remove this app's parameters from the AppFactory. This allows
996 // for creating an app with this name again in the same execution,
997 // which needs to be done when resetting applications in MultiApp
999
1000#ifdef LIBMESH_HAVE_DLOPEN
1001 // Close any open dynamic libraries
1002 for (const auto & lib_pair : _lib_handles)
1003 dlclose(lib_pair.second.library_handle);
1004#endif
1005
1006#ifdef MOOSE_KOKKOS_ENABLED
1008#endif
1009}
void ErrorVector unsigned int
void clear()
This method deletes all of the Actions in the warehouse.
void showActions(bool state=true)
This method sets a Boolean which is used to show information about action execution of various wareho...
static AppFactory & instance()
Get the instance of the AppFactory.
Definition AppFactory.C:20
void clearAppParams(const InputParameters &params, const ClearAppParamsKey)
Clears the stored parameters for the given application parameteres.
Definition AppFactory.C:53
AttribBoundaries tracks all boundary IDs associated with an object.
Definition Attributes.h:190
Tracks whether the object is on the displaced mesh.
Definition Attributes.h:501
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition Attributes.h:346
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition Attributes.h:315
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
Definition Attributes.h:296
Residual objects have this attribute.
Definition Attributes.h:431
This attribute describes sorting state.
Tracks the libmesh system number that a MooseObject is associated with.
Definition Attributes.h:277
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 have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
const bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition MooseApp.h:1419
bool _heap_profiling
Memory profiling.
Definition MooseApp.h:1718
const bool _use_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition MooseApp.h:1431
const MooseMesh *const _master_mesh
The mesh from master app.
Definition MooseApp.h:1686
const torch::DeviceType _libtorch_device
The libtorch device this app is using (converted from compute_device)
Definition MooseApp.h:1743
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Definition MooseApp.h:417
const std::shared_ptr< CommandLine > _command_line
The CommandLine object.
Definition MooseApp.h:1337
void registerRestartableDataMapName(const RestartableDataMapName &name, std::string suffix="")
Reserve a location for storing custom RestartableDataMap objects.
Definition MooseApp.C:3449
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition MooseApp.h:1692
void queryKokkosGPUs()
Query the Kokkos GPUs in the system and check whether every process has an associated GPU.
SolutionInvalidity & _solution_invalidity
The SolutionInvalidity object for this application.
Definition MooseApp.h:1358
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition MooseApp.h:1364
bool forceRestart() const
Whether or not we are forcefully restarting (allowing the load of potentially incompatibie checkpoint...
Definition MooseApp.h:1114
bool _start_time_set
Whether or not an start time has been set.
Definition MooseApp.h:1309
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition MooseApp.h:1346
const std::shared_ptr< libMesh::Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition MooseApp.h:1294
std::unique_ptr< TheWarehouse > _the_warehouse
The combined warehouse for storing any MooseObject based object.
Definition MooseApp.h:1674
torch::DeviceType determineLibtorchDeviceType(const MooseEnum &device) const
Function to determine the device which should be used by libtorch on this application.
Definition MooseApp.C:3507
std::unordered_map< std::string, DynamicLibraryInfo > _lib_handles
The library archive (name only), registration method and the handle to the method.
Definition MooseApp.h:1475
const unsigned int _multiapp_number
Numbering in all the sub-apps on the same level.
Definition MooseApp.h:1680
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition MooseApp.h:1325
SolutionInvalidity & createRecoverableSolutionInvalidity()
Creates a recoverable SolutionInvalidity.
Definition MooseApp.C:3486
const std::string _type
The string representation of the type of this object as registered (see registerApp(AppName))
Definition MooseApp.h:1291
virtual ~MooseApp()
bool _output_position_set
Whether or not an output position has been set for this app.
Definition MooseApp.h:1303
Real _start_time
The time at which to start the simulation.
Definition MooseApp.h:1312
Real _global_time_offset
Offset of the local App time to the "global" problem time.
Definition MooseApp.h:1315
bool _recover
Whether or not this is a recovery run.
Definition MooseApp.h:1422
std::shared_ptr< mfem::Device > _mfem_device
The MFEM Device object.
Definition MooseApp.h:1748
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition MooseApp.h:1328
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Definition MooseApp.h:1413
bool _use_nonlinear
Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions)
Definition MooseApp.h:1389
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition MooseApp.h:866
bool _ready_to_exit
Definition MooseApp.h:1408
std::unique_ptr< InputParameterWarehouse > _input_parameter_warehouse
Input parameter storage structure; unique_ptr so we can control its destruction order.
Definition MooseApp.h:1322
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition MooseApp.h:1331
ChainControlDataSystem _chain_control_system
The system that manages the ChainControls.
Definition MooseApp.h:1695
Factory _factory
Definition MooseApp.h:1402
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
Definition MooseApp.h:1386
PerfGraph & createRecoverablePerfGraph()
Creates a recoverable PerfGraph.
Definition MooseApp.C:3468
void deallocateKokkosMemoryPool()
Deallocate Kokkos memory pool.
bool _restart
Whether or not this is a restart run.
Definition MooseApp.h:1425
const MooseMesh *const _master_displaced_mesh
The displaced mesh from master app.
Definition MooseApp.h:1689
const bool _use_master_mesh
Whether to use the parent app mesh for this app.
Definition MooseApp.h:1683
const unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition MooseApp.h:1677
Moose::Builder _builder
Builder for building app related parser tree.
Definition MooseApp.h:1343
bool _cpu_profiling
CPU profiling.
Definition MooseApp.h:1715
std::set< std::string > _mfem_devices
MFEM supported devices based on user-provided config.
Definition MooseApp.h:1751
const bool _test_restep
Whether or not this simulation should fail its middle timestep and repeat (for testing)
Definition MooseApp.h:1445
const ExecFlagEnum _execute_flags
Execution flags for this App.
Definition MooseApp.h:1706
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition MooseApp.h:1437
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected.
Definition MooseApp.h:1405
const bool _check_input
true if we want to just check the input file
Definition MooseApp.h:1451
const bool _test_checkpoint_half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery)
Definition MooseApp.h:1443
PerfGraph & _perf_graph
The PerfGraph object for this application (recoverable)
Definition MooseApp.h:1355
static const std::string MESH_META_DATA_SUFFIX
Definition MooseApp.h:137
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition MooseApp.h:1300
const std::shared_ptr< Parser > _parser
Parser for parsing the input file (owns the root hit node)
Definition MooseApp.h:1334
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition MooseApp.h:1428
std::streambuf * _output_buffer_cache
Cache output buffer so the language server can turn it off then back on.
Definition MooseApp.h:1709
Syntax _syntax
Syntax of the input file.
Definition MooseApp.h:1318
RestartableDataReader _rd_reader
Definition MooseApp.h:1697
const bool _force_restart
Whether or not we are forcefully attempting to load checkpoints (–force-restart)
Definition MooseApp.h:1434
std::optional< MooseEnum > getComputeDevice() const
Get the device accelerated computations are supposed to be running on.
const bool _automatic_automatic_scaling
Whether to turn on automatic scaling by default.
Definition MooseApp.h:1712
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:1733
static const RestartableDataMapName MESH_META_DATA
Definition MooseApp.h:136
bool _use_eigen_value
Boolean to indicate whether to use an eigenvalue executioner.
Definition MooseApp.h:1392
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:1407
int _exit_code
The exit code.
Definition MooseApp.h:1410
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:1361
const bool _use_executor
Indicates whether we are operating in the new/experimental executor mode instead of using the legacy ...
Definition MooseApp.h:1383
Base class for everything in MOOSE with a name and a type.
Definition MooseBase.h:50
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & type() const
Get the type of this class.
Definition MooseBase.h:93
void mooseDeprecated(Args &&... args) const
Emits a deprecation warning prefixed with the object name and type, and a stack trace.
Definition MooseBase.h:317
void mooseDeprecatedNoTrace(Args &&... args) const
Emits a deprecation warning prefixed with the object name and type, and no stack trace.
Definition MooseBase.h:327
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
bool isParamSetByUser(const std::string &name) const
Test if the supplied parameter is set by a user, as opposed to not set or set to default.
Definition MooseBase.h:205
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271
const InputParameters & _pars
The object's parameters.
Definition MooseBase.h:384
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller.
Definition MooseBase.h:450
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:406
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition MooseBase.h:199
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Interface for objects interacting with the PerfGraph.
void enableLivePrint()
Enables Live Print.
Definition PerfGraph.C:58
static char addKnownLabel(const std::string &label)
addKnownLabel whitelists a label as valid for purposes of the checkLabels function.
Definition Registry.C:85
A scope guard that guarantees that whatever happens between when it gets created and when it is destr...
const Parallel::Communicator & _communicator
ParallelObject(const Parallel::Communicator &comm_in)
const Parallel::Communicator & comm() const
std::string hostname()
Definition MooseUtils.C:635
bool tokenizeAndConvert(const std::string &str, std::vector< T > &tokenized_vector, const std::string &delimiter=" \t\n\v\f\r")
tokenizeAndConvert splits a string using delimiter and then converts to type T.
void makedirs(const std::string &dir_name, bool throw_on_failure)
Definition MooseUtils.C:460
void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Register objects that are in MOOSE.
Definition Moose.C:76
void libmesh_ignore(const Args &...)
const unsigned int invalid_uint
unsigned int n_threads()
Helper class to hold streams for Backup and Restore operations.
Definition Backup.h:26

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

221{ return _action_warehouse; }

◆ addAppParam()

void MooseApp::addAppParam ( InputParameters params)
static

Definition at line 261 of file MooseApp.C.

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

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

◆ addBoolCapability()

Moose::Capability & MooseApp::addBoolCapability ( const std::string_view  capability,
const bool  value,
const std::string_view  doc 
)
staticprotected

Register a boolean capability.

Parameters
capabilityThe name of the capability
valueThe value of the boolean capability
docThe documentation string
Returns
The capability

Definition at line 3576 of file MooseApp.C.

3579{
3580 return addCapabilityInternal(capability, value, doc);
3581}
static Moose::Capability & addCapabilityInternal(const std::string_view capability, const Moose::Capability::Value &value, const std::string_view doc)
Internal method for adding a capability.
Definition MooseApp.C:2336

◆ addCapability()

Moose::Capability & MooseApp::addCapability ( const std::string_view  capability,
const Moose::Capability::Value value,
const std::string_view  doc 
)
staticprotected

Deprecated method for adding a capability.

It is deprecated due to ambiguity between compilers with an implicit conversion for CapabilityValue (a variant).

Use one of add[Bool,Int,String]Capability instead.

Parameters
capabilityThe name of the capability
valueThe value of the capability
docThe documentation string
Returns
The capability

Definition at line 3600 of file MooseApp.C.

3603{
3604
3605 // Warn deprecation on the first time this is added so that we
3606 // don't get multiple warnings if the app is registered more
3607 // than once
3608 if (!Moose::internal::Capabilities::getCapabilities({}).query(std::string(capability)))
3609 ::mooseDeprecated("MooseApp::addCapability() is deprecated (adding capability '",
3610 capability,
3611 "'); use one of MooseApp::add[Bool,Int,String]Capability instead.");
3612
3613 return addCapabilityInternal(capability, value, doc);
3614}
static Capabilities & getCapabilities(const GetCapabilitiesPassKey)
Get the singleton Capabilities.
query_obj query

◆ addCapabilityInternal()

Moose::Capability & MooseApp::addCapabilityInternal ( const std::string_view  capability,
const Moose::Capability::Value value,
const std::string_view  doc 
)
staticprivate

Internal method for adding a capability.

Used to catch exceptions and report them as a mooseError.

Parameters
capabilityThe name of the capability
valueThe value of the capability
docThe documentation string
Returns
The capability

Definition at line 2336 of file MooseApp.C.

2339{
2340 try
2341 {
2342 return Moose::internal::Capabilities::getCapabilities({}).add(capability, value, doc);
2343 }
2344 catch (const std::exception & e)
2345 {
2346 ::mooseError(e.what());
2347 }
2348}

Referenced by addBoolCapability(), addCapability(), addIntCapability(), and addStringCapability().

◆ addExecutor()

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

Definition at line 1864 of file MooseApp.C.

1867{
1868 std::shared_ptr<Executor> executor = _factory.create<Executor>(type, name, params);
1869
1870 if (_executors.count(executor->name()) > 0)
1871 mooseError("an executor with name '", executor->name(), "' already exists");
1872 _executors[executor->name()] = executor;
1873}
The Executor class directs the execution flow of simulations.
Definition Executor.h:27
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition Factory.C:142
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
Definition MooseApp.h:1370

Referenced by recursivelyCreateExecutors().

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

1879{
1880 _executor_params[name] = std::make_pair(type, std::make_unique<InputParameters>(params));
1881}
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:1375

Referenced by ReadExecutorParamsAction::act().

◆ addInputParam()

void MooseApp::addInputParam ( InputParameters params)
static

Definition at line 268 of file MooseApp.C.

269{
270 params.addCommandLineParam<std::vector<std::string>>(
271 "input_file", "-i <input file(s)>", "Specify input file(s); multiple files are merged");
272}

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

◆ addIntCapability()

Moose::Capability & MooseApp::addIntCapability ( const std::string_view  capability,
const int  value,
const std::string_view  doc 
)
staticprotected

Register an integer capability.

Parameters
capabilityThe name of the capability
valueThe value of the integer capability
docThe documentation string
Returns
The capability

Definition at line 3584 of file MooseApp.C.

3587{
3588 return addCapabilityInternal(capability, value, doc);
3589}

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

905 {
907 }
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.

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

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

2997{
2998 // We prefer to always add geometric RMs. There is no hurt to add RMs for replicated mesh
2999 // since MeshBase::delete_remote_elements{} is a no-op (empty) for replicated mesh.
3000 // The motivation here is that MooseMesh::_use_distributed_mesh may not be properly set
3001 // at the time we are adding geometric relationship managers. We deleted the following
3002 // old logic to add all geometric RMs regardless of there is a distributed mesh or not.
3003 // Otherwise, all geometric RMs will be improperly ignored for a distributed mesh generator.
3004
3005 // if (!_action_warehouse.mesh()->isDistributedMesh() && !_split_mesh &&
3006 // (relationship_manager->isType(Moose::RelationshipManagerType::GEOMETRIC) &&
3007 // !(relationship_manager->isType(Moose::RelationshipManagerType::ALGEBRAIC) ||
3008 // relationship_manager->isType(Moose::RelationshipManagerType::COUPLING))))
3009 // return false;
3010
3011 bool add = true;
3012
3013 std::set<std::shared_ptr<RelationshipManager>> rms_to_erase;
3014
3015 for (const auto & existing_rm : _relationship_managers)
3016 {
3017 if (*existing_rm >= *new_rm)
3018 {
3019 add = false;
3020 donateForWhom(*new_rm, *existing_rm);
3021 break;
3022 }
3023 // The new rm did not provide less or the same amount/type of ghosting as the existing rm, but
3024 // what about the other way around?
3025 else if (*new_rm >= *existing_rm)
3026 rms_to_erase.emplace(existing_rm);
3027 }
3028
3029 if (add)
3030 {
3031 _relationship_managers.emplace(new_rm);
3032 for (const auto & rm_to_erase : rms_to_erase)
3033 {
3034 donateForWhom(*rm_to_erase, *new_rm);
3035 removeRelationshipManager(rm_to_erase);
3036 }
3037 }
3038
3039 // Inform the caller whether the object was added or not
3040 return add;
3041}
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition MooseApp.h:1454
void removeRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Purge this relationship manager from meshes and DofMaps and finally from us.
Definition MooseApp.C:3098

Referenced by AdaptivityAction::act(), AddPeriodicBCAction::act(), SetAdaptivityOptionsAction::act(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), AddActionComponentAction::addRelationshipManagers(), and FunctorSmootherTempl< T >::FunctorSmootherTempl().

◆ addStringCapability()

Moose::Capability & MooseApp::addStringCapability ( const std::string_view  capability,
const std::string_view  value,
const std::string_view  doc 
)
staticprotected

Register a string capability.

Parameters
capabilityThe name of the capability
valueThe value of the string capability
docThe documentation string
Returns
The capability

Definition at line 3592 of file MooseApp.C.

3595{
3596 return addCapabilityInternal(capability, std::string(value), doc);
3597}

◆ allocateKokkosMemoryPool()

void MooseApp::allocateKokkosMemoryPool ( std::size_t  size,
unsigned int  ways 
) const

Allocate Kokkos memory pool.

Parameters
sizeThe memory pool size in the number of bytes
waysThe number of parallel ways

◆ appBinaryName()

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

Definition at line 150 of file MooseApp.h.

151 {
153 name = name.substr(0, name.find_last_of("-"));
154 if (name.find_first_of("/") != std::string::npos)
155 name = name.substr(name.find_first_of("/") + 1, std::string::npos);
156 return name;
157 }
std::string getExecutableName()
Gets the name of the running executable on Mac OS X and linux.

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

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

954 {
956 }
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.

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

2427{
2428 std::string library_name(app_name);
2429
2430 // Strip off the App part (should always be the last 3 letters of the name)
2431 size_t pos = library_name.find("App");
2432 if (pos != library_name.length() - 3)
2433 mooseError("Invalid application name: ", library_name);
2434 library_name.erase(pos);
2435
2436 // Now get rid of the camel case, prepend lib, and append the method and suffix
2437 return std::string("lib") + MooseUtils::camelCaseToUnderscore(library_name) + '-' +
2438 QUOTE(METHOD) + ".la";
2439}
std::string camelCaseToUnderscore(const std::string &camel_case_name)
Definition MooseUtils.C:579

Referenced by dynamicAllRegistration(), and dynamicAppRegistration().

◆ attachRelationshipManagers() [1/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.

Definition at line 3176 of file MooseApp.C.

3177{
3178 for (auto & rm : _relationship_managers)
3179 {
3181 {
3182 if (rm->attachGeometricEarly())
3183 {
3184 mesh.add_ghosting_functor(createRMFromTemplateAndInit(*rm, moose_mesh, mesh));
3186 }
3187 else
3188 {
3189 // If we have a geometric ghosting functor that can't be attached early, then we have to
3190 // prevent the mesh from deleting remote elements
3191 moose_mesh.allowRemoteElementRemoval(false);
3192
3193 if (const MeshBase * const moose_mesh_base = moose_mesh.getMeshPtr())
3194 {
3195 if (moose_mesh_base != &mesh)
3196 mooseError("The MooseMesh MeshBase and the MeshBase we're trying to attach "
3197 "relationship managers to are different");
3198 }
3199 else
3200 // The MeshBase isn't attached to the MooseMesh yet, so have to tell it not to remove
3201 // remote elements independently
3202 mesh.allow_remote_element_removal(false);
3203 }
3204 }
3205 }
3206}
std::map< Moose::RelationshipManagerType, std::set< const RelationshipManager * > > _attached_relationship_managers
The relationship managers that have been attached (type -> RMs)
Definition MooseApp.h:1458
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:3140
const MeshBase * getMeshPtr() const
Definition MooseMesh.C:3551
void allowRemoteElementRemoval(bool allow_removal)
Set whether to allow remote element removal.
Definition MooseMesh.C:4044
MeshBase & mesh

◆ attachRelationshipManagers() [2/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 3209 of file MooseApp.C.

3211{
3212 for (auto & rm : _relationship_managers)
3213 {
3214 if (!rm->isType(rm_type))
3215 continue;
3216
3217 // RM is already attached (this also handles the geometric early case)
3218 if (_attached_relationship_managers[rm_type].count(rm.get()))
3219 continue;
3220
3222 {
3223 // The problem is not built yet - so the ActionWarehouse currently owns the mesh
3224 MooseMesh * const mesh = _action_warehouse.mesh().get();
3225
3226 // "attach_geometric_rm_final = true" inidicate that it is the last chance to attach
3227 // geometric RMs. Therefore, we need to attach them.
3228 if (!rm->attachGeometricEarly() && !attach_geometric_rm_final)
3229 // Will attach them later (during algebraic). But also, we need to tell the mesh that we
3230 // shouldn't be deleting remote elements yet
3231 mesh->allowRemoteElementRemoval(false);
3232 else
3233 {
3234 MeshBase & undisp_mesh_base = mesh->getMesh();
3235 const DofMap * const undisp_sys_dof_map =
3236 _executioner ? &feProblem().getSolverSystem(0).dofMap() : nullptr;
3237 undisp_mesh_base.add_ghosting_functor(
3238 createRMFromTemplateAndInit(*rm, *mesh, undisp_mesh_base, undisp_sys_dof_map));
3239
3240 // In the final stage, if there is a displaced mesh, we need to
3241 // clone ghosting functors for displacedMesh
3242 if (auto & disp_moose_mesh = _action_warehouse.displacedMesh();
3243 attach_geometric_rm_final && disp_moose_mesh)
3244 {
3245 MeshBase & disp_mesh_base = _action_warehouse.displacedMesh()->getMesh();
3246 const DofMap * disp_sys_dof_map = nullptr;
3248 disp_sys_dof_map = &feProblem().getDisplacedProblem()->solverSys(0).dofMap();
3249 disp_mesh_base.add_ghosting_functor(
3250 createRMFromTemplateAndInit(*rm, *disp_moose_mesh, disp_mesh_base, disp_sys_dof_map));
3251 }
3253 mooseError("The displaced mesh should not yet exist at the time that we are attaching "
3254 "early geometric relationship managers.");
3255
3256 // Mark this RM as attached
3257 mooseAssert(!_attached_relationship_managers[rm_type].count(rm.get()), "Already attached");
3258 _attached_relationship_managers[rm_type].insert(rm.get());
3259 }
3260 }
3261 else // rm_type is algebraic or coupling
3262 {
3263 if (!_executioner && !_executor)
3264 mooseError("We must have an executioner by now or else we do not have to data to add "
3265 "algebraic or coupling functors to in MooseApp::attachRelationshipManagers");
3266
3267 // Now we've built the problem, so we can use it
3268 auto & problem = feProblem();
3269 auto & undisp_moose_mesh = problem.mesh();
3270 auto & undisp_sys = feProblem().getSolverSystem(0);
3271 auto & undisp_sys_dof_map = undisp_sys.dofMap();
3272 auto & undisp_mesh = undisp_moose_mesh.getMesh();
3273
3274 if (rm->useDisplacedMesh() && problem.getDisplacedProblem())
3275 {
3277 // We actually need to add this to the FEProblemBase NonlinearSystemBase's DofMap
3278 // because the DisplacedProblem "nonlinear" DisplacedSystem doesn't have any matrices
3279 // for which to do coupling. It's actually horrifying to me that we are adding a
3280 // coupling functor, that is going to determine its couplings based on a displaced
3281 // MeshBase object, to a System associated with the undisplaced MeshBase object (there
3282 // is only ever one EquationSystems object per MeshBase object and visa versa). So here
3283 // I'm left with the choice of whether to pass in a MeshBase object that is *not* the
3284 // MeshBase object that will actually determine the couplings or to pass in the MeshBase
3285 // object that is inconsistent with the System DofMap that we are adding the coupling
3286 // functor for! Let's err on the side of *libMesh* consistency and pass properly paired
3287 // MeshBase-DofMap
3288 problem.addCouplingGhostingFunctor(
3289 createRMFromTemplateAndInit(*rm, undisp_moose_mesh, undisp_mesh, &undisp_sys_dof_map),
3290 /*to_mesh = */ false);
3291
3293 {
3294 auto & displaced_problem = *problem.getDisplacedProblem();
3295 auto & disp_moose_mesh = displaced_problem.mesh();
3296 auto & disp_mesh = disp_moose_mesh.getMesh();
3297 const DofMap * const disp_nl_dof_map = &displaced_problem.solverSys(0).dofMap();
3298 displaced_problem.addAlgebraicGhostingFunctor(
3299 createRMFromTemplateAndInit(*rm, disp_moose_mesh, disp_mesh, disp_nl_dof_map),
3300 /*to_mesh = */ false);
3301 }
3302 }
3303 else // undisplaced
3304 {
3306 problem.addCouplingGhostingFunctor(
3307 createRMFromTemplateAndInit(*rm, undisp_moose_mesh, undisp_mesh, &undisp_sys_dof_map),
3308 /*to_mesh = */ false);
3309
3311 problem.addAlgebraicGhostingFunctor(
3312 createRMFromTemplateAndInit(*rm, undisp_moose_mesh, undisp_mesh, &undisp_sys_dof_map),
3313 /*to_mesh = */ false);
3314 }
3315
3316 // Mark this RM as attached
3317 mooseAssert(!_attached_relationship_managers[rm_type].count(rm.get()), "Already attached");
3318 _attached_relationship_managers[rm_type].insert(rm.get());
3319 }
3320 }
3321}
unsigned int count
Definition MortarUtils.C:53
std::shared_ptr< DisplacedProblem > displaced_problem
std::shared_ptr< MooseMesh > & mesh()
std::shared_ptr< MooseMesh > & displacedMesh()
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
FEProblemBase & feProblem() const
Definition MooseApp.C:1857
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition MooseApp.h:1367
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.

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

◆ backup() [1/2]

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

Backs up the application memory in a Backup.

Returns
The backup

Definition at line 1732 of file MooseApp.C.

1733{
1734 TIME_SECTION("backup", 2, "Backing Up Application");
1735
1737
1738 preBackup();
1739
1740 auto backup = std::make_unique<Backup>();
1741 packMeshBackup(*this, *backup);
1742 writer.write(*backup->header, *backup->data);
1743
1744 return backup;
1745}
std::unique_ptr< Backup > backup()
Backs up the application memory in a Backup.
Definition MooseApp.C:1732
virtual void preBackup()
Insertion point for other apps that is called before backup()
Definition MooseApp.h:770
Writer for restartable data, to be read by the RestartableDataReader.

Referenced by backup(), finalizeRestore(), and restore().

◆ backup() [2/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 1721 of file MooseApp.C.

1722{
1723 TIME_SECTION("backup", 2, "Backing Up Application to File");
1724
1725 preBackup();
1726
1728 return writer.write(folder_base);
1729}

Referenced by Checkpoint::output().

◆ builder()

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

Returns a writable reference to the builder.

Definition at line 226 of file MooseApp.h.

226{ return _builder; }

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

◆ callMooseError() [1/2]

void MooseBase::callMooseError ( MooseApp *const  app,
const InputParameters params,
std::string  msg,
const bool  with_prefix,
const hit::Node *  node,
const bool  show_trace = true 
)
staticinherited

External method for calling moose error with added object context.

Needed so that objects without the MooseBase context (InputParameters) can call errors with context

Parameters
appThe app pointer (if available); adds multiapp context and clears the console
paramsThe parameters, needed to obtain object information
msgThe message
with_prefixIf true, add the prefix from messagePrefix(), which is the object information (type, name, etc)
nodeOptional hit node to add file path context as a prefix
show_traceWhether or not to show a stack trace, defaults to true

Definition at line 114 of file MooseBase.C.

120{
121 if (!node)
122 node = MooseBase::getHitNode(params);
123
124 std::string multiapp_prefix = "";
125 if (app)
126 {
127 if (!app->isUltimateMaster())
128 multiapp_prefix = app->name();
130 }
131
132 if (with_prefix)
133 // False here because the hit context will get processed by the node
134 msg = messagePrefix(params, false) + msg;
135
136 moose::internal::mooseErrorRaw(msg, multiapp_prefix, node, show_trace);
137}
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition MooseApp.C:2414
const hit::Node * getHitNode() const
Definition MooseBase.h:136
std::string messagePrefix(const bool hit_prefix=true) const
Definition MooseBase.h:256
void mooseConsole()
Send current output buffer to Console output objects.
void mooseErrorRaw(std::string msg, const std::string &prefix="", const hit::Node *node=nullptr, const bool show_trace=true)
Main callback for emitting a moose error.
Definition MooseError.C:51

◆ callMooseError() [2/2]

void MooseBase::callMooseError ( std::string  msg,
const bool  with_prefix,
const hit::Node *  node = nullptr,
const bool  show_trace = true 
) const
inherited

External method for calling moose error with added object context.

Parameters
msgThe message
with_prefixIf true, add the prefix from messagePrefix(), which is the object information (type, name, etc)
nodeOptional hit node to add file path context as a prefix
show_traceWhether or not to show a stack trace, defaults to true

Definition at line 105 of file MooseBase.C.

109{
110 callMooseError(&_app, _pars, msg, with_prefix, node, show_trace);
111}
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
External method for calling moose error with added object context.
Definition MooseBase.C:105

Referenced by MooseBase::callMooseError(), InputParameters::callMooseError(), MooseBase::mooseDocumentedError(), MooseBase::mooseError(), and MooseBase::mooseErrorNonPrefixed().

◆ checkInput()

bool MooseApp::checkInput ( ) const
inline

Returns whether the Application is running in check input mode.

Definition at line 976 of file MooseApp.h.

976{ return _check_input; }

◆ checkMetaDataIntegrity()

void MooseApp::checkMetaDataIntegrity ( ) const

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

Definition at line 3400 of file MooseApp.C.

3401{
3402 for (auto map_iter = _restartable_meta_data.begin(); map_iter != _restartable_meta_data.end();
3403 ++map_iter)
3404 {
3405 const RestartableDataMapName & name = map_iter->first;
3406 const RestartableDataMap & meta_data = map_iter->second.first;
3407
3408 std::vector<std::string> not_declared;
3409
3410 for (const auto & data : meta_data)
3411 if (!data.declared())
3412 not_declared.push_back(data.name());
3413
3414 if (!not_declared.empty())
3415 {
3416 std::ostringstream oss;
3417 std::copy(
3418 not_declared.begin(), not_declared.end(), infix_ostream_iterator<std::string>(oss, ", "));
3419
3420 mooseError("The following '",
3421 name,
3422 "' meta-data properties were retrieved but never declared: ",
3423 oss.str());
3424 }
3425 }
3426}
std::string RestartableDataMapName
Definition MooseTypes.h:242
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
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:1664
Storage for restartable data that is ordered based on insertion order.
GCC9 currently hits a "no type named 'value_type'" error during build if this is removed and iterator...

Referenced by SetupRecoverFileBaseAction::act().

◆ checkpointSuffix()

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

The file suffix for the checkpoint mesh.

Definition at line 3044 of file MooseApp.C.

3045{
3046 static const std::string suffix = "-mesh.cpa.gz";
3047 return suffix;
3048}

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

◆ collectCitations()

void MooseApp::collectCitations ( std::map< std::string, std::string > &  citations) const
private

Collects the BibTeX citations for the modules/objects constructed in this app and the finite element backend it uses, then recurses into every MultiApp subapp to do the same.

The map is keyed by BibTeX key so a citation shared across apps is folded in only once.

Definition at line 2106 of file MooseApp.C.

2107{
2108 // Gather the citations that apply to this app: for every object type actually constructed, the
2109 // citations registered for its owning app/module. The framework paper is tied to "MooseApp", so
2110 // it is gathered whenever a MooseApp object is used; apps composed of MooseApp inherit it. The
2111 // map is keyed by BibTeX key so a citation shared across apps is folded in only once.
2112 for (const auto & objname : _factory.getConstructedObjects())
2113 {
2114 mooseAssert(Registry::isRegisteredObj(objname),
2115 "Constructed object '" + objname + "' is not registered");
2116 const auto & app_citations = Registry::getCitations(Registry::objData(objname)._label);
2117 citations.insert(app_citations.begin(), app_citations.end());
2118 }
2119
2120 // Credit the finite element backend actually used in the run. These are mutually exclusive, so
2121 // only the backend in use is cited.
2122 std::string backend = "libMesh";
2123#ifdef MOOSE_MFEM_ENABLED
2124 if ((_executor || _executioner) && feProblem().feBackend() == Moose::FEBackend::MFEM)
2125 backend = "MFEM";
2126#endif
2127 const auto & backend_citations = Registry::getCitations(backend);
2128 citations.insert(backend_citations.begin(), backend_citations.end());
2129
2130 // Recurse into the MultiApp subapps so that objects/modules used only inside subapps are still
2131 // attributed. Each subapp is a separate MooseApp whose run() (and thus requestCitations()) is
2132 // never called, so the master gathers their citations here. feProblem() asserts when there is no
2133 // executioner, so only descend once one exists; nested MultiApps are handled by the recursion.
2134 if (_executor || _executioner)
2135 for (const auto & multi_app : feProblem().getMultiAppWarehouse().getObjects())
2136 for (const auto i : make_range(multi_app->numLocalApps()))
2137 multi_app->localApp(i)->collectCitations(citations);
2138}
for(PetscInt i=0;i< nvars;++i)
void collectCitations(std::map< std::string, std::string > &citations) const
Collects the BibTeX citations for the modules/objects constructed in this app and the finite element ...
Definition MooseApp.C:2106
static const RegistryEntryBase & objData(const std::string &name)
Definition Registry.C:58
static bool isRegisteredObj(const std::string &name)
Definition Registry.h:265
static const std::map< std::string, std::map< std::string, std::string > > & getCitations()
Returns the registered citations, keyed by app/module name and then by BibTeX key (app/module name ->...
Definition Registry.h:291
IntRange< T > make_range(T beg, T end)

Referenced by requestCitations().

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

424{ return _command_line; }

Referenced by MultiApp::createApp(), Moose::Builder::errorCheck(), ConsoleUtils::outputExecutionInformation(), ConsoleUtils::outputFrameworkInformation(), and MooseServer::parseDocumentForDiagnostics().

◆ connectControllableParams()

void MooseBase::connectControllableParams ( const std::string &  parameter,
const std::string &  object_type,
const std::string &  object_name,
const std::string &  object_parameter 
) const
inherited

Connect controllable parameter of this action with the controllable parameters of the objects added by this action.

Parameters
parameterName of the controllable parameter of this action
object_typeType of the object added by this action.
object_nameName of the object added by this action.
object_parameterName of the parameter of the object.

Definition at line 77 of file MooseBase.C.

81{
82 auto & factory = _app.getFactory();
83 auto & ip_warehouse = _app.getInputParameterWarehouse();
84
85 MooseObjectParameterName primary_name(uniqueName(), parameter);
86 const auto base_type = factory.getValidParams(object_type).getBase();
87 MooseObjectParameterName secondary_name(base_type, object_name, object_parameter);
88 ip_warehouse.addControllableParameterConnection(primary_name, secondary_name);
89
90 const auto & tags = _pars.get<std::vector<std::string>>("control_tags");
91 for (const auto & tag : tags)
92 {
93 if (!tag.empty())
94 {
95 // Only adds the parameter with the different control tags if the derived class
96 // properly registers the parameter to its own syntax
97 MooseObjectParameterName tagged_name(tag, name(), parameter);
98 ip_warehouse.addControllableParameterConnection(
99 tagged_name, secondary_name, /*error_on_empty=*/false);
100 }
101 }
102}
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition MooseApp.h:407
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition MooseApp.C:2872
MooseObjectName uniqueName() const
Definition MooseBase.C:69
A class for storing an input parameter name.

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

3500{
3501 return _action_warehouse.getCurrentTaskName() == "create_added_mesh_generators" ||
3503}
const std::string & getCurrentTaskName() const
bool appendingMeshGenerators() const
Whether or not mesh generators are currently being appended (append_mesh_generator task)

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

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

2215{
2216 if (isParamSetByUser("copy_inputs"))
2217 {
2218 if (comm().size() > 1)
2219 mooseError("The --copy-inputs option should not be ran in parallel");
2220
2221 // Get command line argument following --copy-inputs on command line
2222 auto dir_to_copy = getParam<std::string>("copy_inputs");
2223
2224 if (dir_to_copy.empty())
2225 mooseError("Error retrieving directory to copy");
2226 if (dir_to_copy.back() != '/')
2227 dir_to_copy += '/';
2228
2229 // This binary name is the actual binary. That is, if we called a symlink it'll
2230 // be the name of what the symlink points to
2231 auto binname = appBinaryName();
2232 if (binname == "")
2233 mooseError("could not locate installed tests to run (unresolved binary/app name)");
2234
2235 auto src_dir = MooseUtils::installedInputsDir(
2236 binname,
2237 dir_to_copy,
2238 "Rerun binary with " + _pars.getCommandLineMetadata("show_inputs").switches[0] +
2239 " to get a list of installable directories.");
2240
2241 // Use the command line here because if we have a symlink to another binary,
2242 // we want to dump into a directory that is named after the symlink not the true binary
2243 auto dst_dir = _command_line->getExecutableNameBase() + "/" + dir_to_copy;
2244 auto cmdname = _command_line->getExecutableName();
2245 if (cmdname.find_first_of("/") != std::string::npos)
2246 cmdname = cmdname.substr(cmdname.find_first_of("/") + 1, std::string::npos);
2247
2248 if (MooseUtils::pathExists(dst_dir))
2249 mooseError(
2250 "The directory \"./",
2251 dst_dir,
2252 "\" already exists.\nTo update/recopy the contents of this directory, rename (\"mv ",
2253 dst_dir,
2254 " new_dir_name\") or remove (\"rm -r ",
2255 dst_dir,
2256 "\") the existing directory.\nThen re-run \"",
2257 cmdname,
2258 " --copy-inputs ",
2259 dir_to_copy,
2260 "\".");
2261
2262 std::string cmd = "mkdir -p " + dst_dir + "; rsync -av " + src_dir + " " + dst_dir;
2263
2264 TIME_SECTION("copy_inputs", 2, "Copying Inputs");
2265
2266 mooseAssert(comm().size() == 1, "Should be run in serial");
2267 const auto return_value = system(cmd.c_str());
2268 if (!WIFEXITED(return_value))
2269 mooseError("Process exited unexpectedly");
2270 setExitCode(WEXITSTATUS(return_value));
2271 if (exitCode() == 0)
2272 Moose::out << "Directory successfully copied into ./" << dst_dir << '\n';
2273 return true;
2274 }
2275 return false;
2276}
const InputParameters::CommandLineMetadata & getCommandLineMetadata(const std::string &name) const
virtual std::string appBinaryName() const
Definition MooseApp.h:150
void setExitCode(const int exit_code)
Sets the exit code that the application will exit with.
Definition MooseApp.h:168
int exitCode() const
Get the shell exit code for the application.
Definition MooseApp.h:163
std::string installedInputsDir(const std::string &app_name, const std::string &dir_name, const std::string &extra_error_msg)
Definition MooseUtils.C:114
bool pathExists(const std::string &path)
Definition MooseUtils.C:258
std::vector< std::string > switches
The switches for the parameter (i.e., [-t, –timing])

Referenced by run().

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

1950{
1951 // Do we have any?
1952 if (_executor_params.empty())
1953 return;
1954
1955 // Holds the names of Executors that may be the root executor
1956 std::list<std::string> possibly_root;
1957
1958 // What is already built
1959 std::map<std::string, bool> already_built;
1960
1961 // The Executors that are currently candidates for being roots
1962 std::list<std::string> possible_roots;
1963
1964 // The current line of dependencies - used for finding cycles
1965 std::list<std::string> current_branch;
1966
1967 // Build the NullExecutor
1968 {
1969 auto params = _factory.getValidParams("NullExecutor");
1970 _null_executor = _factory.create<NullExecutor>("NullExecutor", "_null_executor", params);
1971 }
1972
1973 for (const auto & params_entry : _executor_params)
1974 {
1975 const auto & name = params_entry.first;
1976
1977 // Did we already make this one?
1978 if (_executors.find(name) != _executors.end())
1979 continue;
1980
1981 possible_roots.emplace_back(name);
1982
1983 recursivelyCreateExecutors(name, possible_roots, current_branch);
1984 }
1985
1986 // If there is more than one possible root - error
1987 if (possible_roots.size() > 1)
1988 {
1989 auto root_string_it = possible_roots.begin();
1990
1991 std::stringstream roots_string;
1992
1993 roots_string << *root_string_it++;
1994
1995 for (; root_string_it != possible_roots.end(); ++root_string_it)
1996 roots_string << ", " << *root_string_it;
1997
1998 mooseError("Multiple Executor roots found: ", roots_string.str());
1999 }
2000
2001 // Set the root executor
2002 _executor = _executors[possible_roots.front()];
2003}
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Definition Factory.C:68
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:1897

Referenced by AddExecutorAction::act().

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

2897{
2898 TIME_SECTION("createMinimalApp", 3, "Creating Minimal App");
2899
2900 // SetupMeshAction
2901 {
2902 // Build the Action parameters
2903 InputParameters action_params = _action_factory.getValidParams("SetupMeshAction");
2904 action_params.set<std::string>("type") = "GeneratedMesh";
2905
2906 // Create The Action
2907 std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
2908 _action_factory.create("SetupMeshAction", "Mesh", action_params));
2909
2910 // Set the object parameters
2911 InputParameters & params = action->getObjectParams();
2912 params.set<MooseEnum>("dim") = "1";
2913 params.set<unsigned int>("nx") = 1;
2914
2915 // Add Action to the warehouse
2917 }
2918
2919 // Executioner
2920 {
2921 // Build the Action parameters
2922 InputParameters action_params = _action_factory.getValidParams("CreateExecutionerAction");
2923 action_params.set<std::string>("type") = "Transient";
2924
2925 // Create the action
2926 std::shared_ptr<MooseObjectAction> action = std::static_pointer_cast<MooseObjectAction>(
2927 _action_factory.create("CreateExecutionerAction", "Executioner", action_params));
2928
2929 // Set the object parameters
2930 InputParameters & params = action->getObjectParams();
2931 params.set<unsigned int>("num_steps") = 1;
2932 params.set<Real>("dt") = 1;
2933
2934 // Add Action to the warehouse
2936 }
2937
2938 // Problem
2939 {
2940 // Build the Action parameters
2941 InputParameters action_params = _action_factory.getValidParams("CreateProblemDefaultAction");
2942 action_params.set<bool>("_solve") = false;
2943
2944 // Create the action
2945 std::shared_ptr<Action> action = std::static_pointer_cast<Action>(
2946 _action_factory.create("CreateProblemDefaultAction", "Problem", action_params));
2947
2948 // Add Action to the warehouse
2950 }
2951
2952 // Outputs
2953 {
2954 // Build the Action parameters
2955 InputParameters action_params = _action_factory.getValidParams("CommonOutputAction");
2956 action_params.set<bool>("console") = false;
2957
2958 // Create action
2959 std::shared_ptr<Action> action =
2960 _action_factory.create("CommonOutputAction", "Outputs", action_params);
2961
2962 // Add Action to the warehouse
2964 }
2965
2967}
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name)
void build()
Builds all auto-buildable tasks.
void addActionBlock(std::shared_ptr< Action > blk)
This method add an Action instance to the warehouse.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by setupOptions().

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

3469{
3471
3472 auto perf_graph =
3473 std::make_unique<RestartableData<PerfGraph>>("perf_graph",
3474 this,
3475 type() + " (" + name() + ')',
3476 *this,
3477 getParam<bool>("perf_graph_live_all"),
3478 !getParam<bool>("disable_perf_graph_live"));
3479
3480 return dynamic_cast<RestartableData<PerfGraph> &>(
3481 registerRestartableData(std::move(perf_graph), 0, false))
3482 .set();
3483}
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition MooseApp.C:1706
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition MooseApp.C:2454
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 3486 of file MooseApp.C.

3487{
3489
3490 auto solution_invalidity =
3491 std::make_unique<RestartableData<SolutionInvalidity>>("solution_invalidity", nullptr, *this);
3492
3493 return dynamic_cast<RestartableData<SolutionInvalidity> &>(
3494 registerRestartableData(std::move(solution_invalidity), 0, false))
3495 .set();
3496}

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

3144{
3145 auto & mesh_to_clone = _template_to_clones[&template_rm];
3146 auto it = mesh_to_clone.find(&mesh);
3147 if (it != mesh_to_clone.end())
3148 {
3149 // We've already created a clone for this mesh
3150 auto & clone_rm = *it->second;
3151 if (!clone_rm.dofMap() && dof_map)
3152 // We didn't have a DofMap before, but now we do, so we should re-init
3153 clone_rm.init(moose_mesh, mesh, dof_map);
3154 else if (clone_rm.dofMap() && dof_map && (clone_rm.dofMap() != dof_map))
3155 mooseError("Attempting to create and initialize an existing clone with a different DofMap. "
3156 "This should not happen.");
3157
3158 return clone_rm;
3159 }
3160
3161 // It's possible that this method is going to get called for multiple different MeshBase
3162 // objects. If that happens, then we *cannot* risk having a MeshBase object with a ghosting
3163 // functor that is init'd with another MeshBase object. So the safe thing to do is to make a
3164 // different RM for every MeshBase object that gets called here. Then the
3165 // RelationshipManagers stored here in MooseApp are serving as a template only
3166 auto pr = mesh_to_clone.emplace(
3167 std::make_pair(&const_cast<const MeshBase &>(mesh),
3168 dynamic_pointer_cast<RelationshipManager>(template_rm.clone())));
3169 mooseAssert(pr.second, "An insertion should have happened");
3170 auto & clone_rm = *pr.first->second;
3171 clone_rm.init(moose_mesh, mesh, dof_map);
3172 return clone_rm;
3173}
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:1724
virtual std::unique_ptr< GhostingFunctor > clone() const=0

Referenced by attachRelationshipManagers(), and attachRelationshipManagers().

◆ deallocateKokkosMemoryPool()

void MooseApp::deallocateKokkosMemoryPool ( )
private

Deallocate Kokkos memory pool.

◆ defaultAutomaticScaling()

bool MooseApp::defaultAutomaticScaling ( ) const
inline

Whether to enable automatic scaling by default.

Definition at line 1055 of file MooseApp.h.

Referenced by FEProblemSolve::FEProblemSolve().

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

3508{
3509 const auto pname = "--compute-device";
3510 if (device_enum == "cuda")
3511 {
3512#ifdef __linux__
3513 if (!torch::cuda::is_available())
3514 mooseError(pname, "=cuda: CUDA support is not available in the linked libtorch library");
3515 return torch::kCUDA;
3516#else
3517 mooseError(pname, "=cuda: CUDA is not supported on your platform");
3518#endif
3519 }
3520 else if (device_enum == "mps")
3521 {
3522#ifdef __APPLE__
3523 if (!torch::mps::is_available())
3524 mooseError(pname, "=mps: MPS support is not available in the linked libtorch library");
3525 return torch::kMPS;
3526#else
3527 mooseError(pname, "=mps: MPS is not supported on your platform");
3528#endif
3529 }
3530 else if (device_enum == "xpu")
3531 {
3532#ifdef MOOSE_HAVE_XPU
3533 if (!torch::xpu::is_available())
3534 mooseError(pname, "=xpu: XPU support is not available in the linked libtorch library");
3535 return torch::kXPU;
3536#else
3537 mooseError(pname, "=xpu: XPU is not supported in the current application");
3538#endif
3539 }
3540 else if (device_enum != "cpu")
3541 mooseError("The device '",
3542 device_enum,
3543 "' is not currently supported by the MOOSE libtorch integration.");
3544 return torch::kCPU;
3545}

◆ disableCheckUnusedFlag()

void MooseApp::disableCheckUnusedFlag ( )

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

Definition at line 1851 of file MooseApp.C.

1852{
1854}

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

2649{
2650#ifdef LIBMESH_HAVE_DLOPEN
2651 libMesh::Parameters params;
2652 params.set<std::string>("app_name") = app_name;
2653 params.set<RegistrationType>("reg_type") = REGALL;
2654 params.set<std::string>("registration_method") = app_name + "__registerAll";
2655 params.set<std::string>("library_path") = library_path;
2656 params.set<std::string>("library_name") =
2657 library_name.empty() ? appNameToLibName(app_name) : library_name;
2658
2659 params.set<Factory *>("factory") = factory;
2660 params.set<Syntax *>("syntax") = syntax;
2661 params.set<ActionFactory *>("action_factory") = action_factory;
2662 params.set<bool>("library_load_dependencies") = false;
2663
2664 dynamicRegistration(params);
2665#else
2666 libmesh_ignore(app_name, factory, action_factory, syntax, library_path, library_name);
2667 mooseError("Dynamic Loading is either not supported or was not detected by libMesh configure.");
2668#endif
2669}
Specialized factory for generic Action System objects.
Generic factory class for build all sorts of objects.
Definition Factory.h:29
Syntax & syntax()
Returns a writable reference to the syntax object.
Definition MooseApp.h:231
void dynamicRegistration(const libMesh::Parameters &params)
Helper method for dynamic loading of objects.
Definition MooseApp.C:2672
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition MooseApp.h:1668
std::string appNameToLibName(const std::string &app_name) const
Converts an application name to a library name: Examples: AnimalApp -> libanimal-oprof....
Definition MooseApp.C:2426
Holding syntax for parsing input files.
Definition Syntax.h:22
T & set(const std::string &)

Referenced by DynamicObjectRegistrationAction::DynamicObjectRegistrationAction().

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

2590{
2591#ifdef LIBMESH_HAVE_DLOPEN
2592 libMesh::Parameters params;
2593 params.set<std::string>("app_name") = app_name;
2594 params.set<RegistrationType>("reg_type") = APPLICATION;
2595 params.set<std::string>("registration_method") = app_name + "__registerApps";
2596 params.set<std::string>("library_path") = library_path;
2597
2598 const auto effective_library_name =
2599 library_name.empty() ? appNameToLibName(app_name) : library_name;
2600 params.set<std::string>("library_name") = effective_library_name;
2601 params.set<bool>("library_load_dependencies") = lib_load_deps;
2602
2603 const auto paths = getLibrarySearchPaths(library_path);
2604 std::ostringstream oss;
2605
2606 auto successfully_loaded = false;
2607 if (paths.empty())
2608 oss << '"' << app_name << "\" is not a registered application name.\n"
2609 << "No search paths were set. We made no attempts to locate the corresponding library "
2610 "file.\n";
2611 else
2612 {
2613 dynamicRegistration(params);
2614
2615 // At this point the application should be registered so check it
2616 if (!AppFactory::instance().isRegistered(app_name))
2617 {
2618 oss << '"' << app_name << "\" is not a registered application name.\n"
2619 << "Unable to locate library archive for \"" << app_name
2620 << "\".\nWe attempted to locate the library archive \"" << effective_library_name
2621 << "\" in the following paths:\n\t";
2622 std::copy(paths.begin(), paths.end(), infix_ostream_iterator<std::string>(oss, "\n\t"));
2623 }
2624 else
2625 successfully_loaded = true;
2626 }
2627
2628 if (!successfully_loaded)
2629 {
2630 oss << "\nMake sure you have compiled the library and either set the \"library_path\" "
2631 "variable in your input file or exported \"MOOSE_LIBRARY_PATH\".\n";
2632
2633 mooseError(oss.str());
2634 }
2635
2636#else
2637 libmesh_ignore(app_name, library_path, library_name, lib_load_deps);
2638 mooseError("Dynamic Loading is either not supported or was not detected by libMesh configure.");
2639#endif
2640}
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:2846

Referenced by MultiApp::createApps().

◆ dynamicRegistration()

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

Helper method for dynamic loading of objects.

Definition at line 2672 of file MooseApp.C.

2673{
2674 const auto paths = getLibrarySearchPaths(params.get<std::string>("library_path"));
2675 const auto library_name = params.get<std::string>("library_name");
2676
2677 // Attempt to dynamically load the library
2678 for (const auto & path : paths)
2679 if (MooseUtils::checkFileReadable(path + '/' + library_name, false, false))
2681 path + '/' + library_name, params, params.get<bool>("library_load_dependencies"));
2682}
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:2685
const T & get(std::string_view) const
bool checkFileReadable(const std::string &filename, bool check_line_endings, bool throw_on_unreadable, bool check_for_git_lfs_pointer)
Definition MooseUtils.C:265
const Elem & get(const ElemType type_in)

Referenced by dynamicAllRegistration(), and dynamicAppRegistration().

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

1607{
1608 bool warn = _enable_unused_check == WARN_UNUSED;
1610
1611 _builder.errorCheck(*_comm, warn, err);
1612
1613 // Return early for mesh only mode, since we want error checking to run even though
1614 // an executor is not created for this case
1615 if (isParamSetByUser("mesh_only"))
1616 return;
1617
1618 if (!_executor.get() && !_executioner.get())
1619 {
1620 if (!_early_exit_param.empty())
1621 {
1622 mooseAssert(_check_input,
1623 "Something went wrong, we should only get here if _check_input is true.");
1624 mooseError(
1625 "Incompatible command line arguments provided. --check-input cannot be called with ",
1627 ".");
1628 }
1629 // We should never get here
1630 mooseError("The Executor is being called without being initialized. This is likely "
1631 "caused by "
1632 "incompatible command line arguments");
1633 }
1634
1635 auto apps = feProblem().getMultiAppWarehouse().getObjects();
1636 for (auto app : apps)
1637 for (unsigned int i = 0; i < app->numLocalApps(); i++)
1638 app->localApp(i)->errorCheck();
1639}
ExecuteMooseObjectWarehouse< MultiApp > & getMultiAppWarehouse()
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.
void errorCheck(const libMesh::Parallel::Communicator &comm, bool warn_unused, bool err_unused)
Definition Builder.C:358
OStreamProxy err(std::cerr)

Referenced by errorCheck(), executeExecutioner(), and run().

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

1089{ return false; }

◆ errorPrefix()

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

Deprecated message prefix; the error type is no longer used.

Definition at line 264 of file MooseBase.h.

264{ return messagePrefix(); }

◆ executeExecutioner()

void MooseApp::executeExecutioner ( )
virtual

Execute the Executioner that was built.

Definition at line 1642 of file MooseApp.C.

1643{
1644 TIME_SECTION("executeExecutioner", 3);
1645
1646 // If ready to exit has been set, then just return
1647 if (_ready_to_exit)
1648 return;
1649
1650 // run the simulation
1651 if (_use_executor && _executor)
1652 {
1654 _executor->init();
1655 errorCheck();
1656 auto result = _executor->exec();
1657 if (!result.convergedAll())
1658 mooseError(result.str());
1659 }
1660 else if (_executioner)
1661 {
1663 _executioner->init();
1664 errorCheck();
1665 _executioner->execute();
1666 if (!_executioner->lastSolveConverged())
1667 setExitCode(1);
1668 }
1669 else
1670 mooseError("No executioner was specified (go fix your input file)");
1671}
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
Definition MooseApp.C:1606
PetscErrorCode petscSetupOutput(CommandLine *cmd_line)

Referenced by run().

◆ exitCode()

int MooseApp::exitCode ( ) const
inline

Get the shell exit code for the application.

Returns
The shell exit code

Definition at line 163 of file MooseApp.h.

163{ return _exit_code; }

Referenced by copyInputs().

◆ feProblem()

FEProblemBase & MooseApp::feProblem ( ) const

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

1813{
1814 if (!_rd_reader.isRestoring())
1815 mooseError("MooseApp::finalizeRestore(): Not currently restoring");
1816
1817 // This gives us access to the underlying streams so that we can return it if needed
1818 auto input_streams = _rd_reader.clear();
1819
1820 std::unique_ptr<Backup> backup;
1821
1822 // Give them back a backup if this restore started from a Backup, in which case
1823 // the two streams in the Backup are formed into StringInputStreams
1824 if (auto header_string_input = dynamic_cast<StringInputStream *>(input_streams.header.get()))
1825 {
1826 auto data_string_input = dynamic_cast<StringInputStream *>(input_streams.data.get());
1827 mooseAssert(data_string_input, "Should also be a string input");
1828
1829 auto header_sstream = header_string_input->release();
1830 mooseAssert(header_sstream, "Header not available");
1831
1832 auto data_sstream = data_string_input->release();
1833 mooseAssert(data_sstream, "Data not available");
1834
1835 backup = std::make_unique<Backup>();
1836 backup->header = std::move(header_sstream);
1837 backup->data = std::move(data_sstream);
1838 packMeshBackup(*this, *backup);
1839 }
1840
1841 return backup;
1842}
InputStreams clear()
Clears the contents of the reader (header stream, data stream, header)
Helper class that hands out input streams to a stringstream.

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

392{ 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:1379

Referenced by FixedPointSolve::FixedPointSolve().

◆ forceRestart()

bool MooseApp::forceRestart ( ) const
inline

Whether or not we are forcefully restarting (allowing the load of potentially incompatibie checkpoints); used within RestartableDataReader.

Definition at line 1114 of file MooseApp.h.

1114{ return _force_restart; }

Referenced by possiblyLoadRestartableMetaData().

◆ FRIEND_TEST() [1/4]

MooseApp::FRIEND_TEST ( ::CapabilitiesTest  ,
mooseAppAddBoolCapability   
)
protected

◆ FRIEND_TEST() [2/4]

MooseApp::FRIEND_TEST ( ::CapabilitiesTest  ,
mooseAppAddCapability   
)
protected

◆ FRIEND_TEST() [3/4]

MooseApp::FRIEND_TEST ( ::CapabilitiesTest  ,
mooseAppAddIntCapability   
)
protected

◆ FRIEND_TEST() [4/4]

MooseApp::FRIEND_TEST ( ::CapabilitiesTest  ,
mooseAppAddStringCapability   
)
protected

◆ getActionFactory()

ActionFactory & MooseApp::getActionFactory ( )
inline

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

Definition at line 412 of file MooseApp.h.

412{ return _action_factory; }

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

◆ getBase()

const std::string & MooseBase::getBase ( ) const
inlineinherited
Returns
The registered base for this object (set via InputParameters::registerBase())

Definition at line 147 of file MooseBase.h.

147{ return _pars.getBase(); }
const std::string & getBase() const

Referenced by MooseBase::uniqueParameterName().

◆ getChainControlDataSystem()

ChainControlDataSystem & MooseApp::getChainControlDataSystem ( )
inline

◆ getCheckedPointerParam()

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

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

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

Definition at line 450 of file MooseBase.h.

451{
452 return _pars.getCheckedPointerParam<T>(name, error_string);
453}
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller.

◆ getCheckpointDirectories()

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

Get all checkpoint directories.

Returns
A Set of checkpoint directories

Definition at line 2362 of file MooseApp.C.

2363{
2364 // Storage for the directory names
2365 std::list<std::string> checkpoint_dirs;
2366
2367 // Add the directories added with Outputs/checkpoint=true input syntax
2368 checkpoint_dirs.push_back(getOutputFileBase() + "_cp");
2369
2370 // Add the directories from any existing checkpoint output objects
2371 const auto & actions = _action_warehouse.getActionListByName("add_output");
2372 for (const auto & action : actions)
2373 {
2374 // Get the parameters from the MooseObjectAction
2375 MooseObjectAction * moose_object_action = dynamic_cast<MooseObjectAction *>(action);
2376 if (!moose_object_action)
2377 continue;
2378
2379 const InputParameters & params = moose_object_action->getObjectParams();
2380 if (moose_object_action->getParam<std::string>("type") == "Checkpoint")
2381 {
2382 // Unless file_base was explicitly set by user, we cannot rely on it, as it will be changed
2383 // later
2384 const std::string cp_dir =
2385 _file_base_set_by_user ? params.get<std::string>("file_base")
2386 : (getOutputFileBase(true) + "_" + moose_object_action->name());
2387 checkpoint_dirs.push_back(cp_dir + "_cp");
2388 }
2389 }
2390 return checkpoint_dirs;
2391}
const std::list< Action * > & getActionListByName(const std::string &task) const
Retrieve a constant list of Action pointers associated with the passed in task.
std::string getOutputFileBase(bool for_non_moose_build_output=false) const
Get the output file base name.
Definition MooseApp.C:1537
InputParameters & getObjectParams()
Retrieve the parameters of the object to be created by this action.

Referenced by getCheckpointFiles().

◆ getCheckpointFiles()

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

Extract all possible checkpoint file names.

Returns
A Set of checkpoint filenames

Definition at line 2394 of file MooseApp.C.

2395{
2396 auto checkpoint_dirs = getCheckpointDirectories();
2397 return MooseUtils::getFilesInDirs(checkpoint_dirs, false);
2398}
std::list< std::string > getCheckpointDirectories() const
Get all checkpoint directories.
Definition MooseApp.C:2362
std::list< std::string > getFilesInDirs(const std::list< std::string > &directory_list, const bool files_only)
Definition MooseUtils.C:819

Referenced by setRestartRecoverFileBase().

◆ getCommunicator()

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

Definition at line 1058 of file MooseApp.h.

1058{ return _comm; }

Referenced by MooseServer::parseDocumentForDiagnostics().

◆ getComputeDevice()

std::optional< MooseEnum > MooseApp::getComputeDevice ( ) const

Get the device accelerated computations are supposed to be running on.

Referenced by MFEMProblemSolve::MFEMProblemSolve().

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

3068{
3069 if (const auto action = _action_warehouse.getCurrentAction())
3070 return action->parameters().getHitNode();
3071 return nullptr;
3072}
const Action * getCurrentAction() const

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

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

Referenced by MooseMesh::determineUseDistributedMesh().

◆ getExecuteOnEnum()

const ExecFlagEnum & MooseApp::getExecuteOnEnum ( ) const
inline

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

Definition at line 1040 of file MooseApp.h.

1040{ return _execute_flags; }

Referenced by EigenExecutionerBase::normalizeSolution().

◆ getExecutioner()

Executioner * MooseApp::getExecutioner ( ) const

◆ getExecutor() [1/2]

Executor * MooseApp::getExecutor ( ) const
inline

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

2007{
2008 auto it = _executors.find(name);
2009
2010 if (it != _executors.end())
2011 return *it->second;
2012
2013 if (fail_if_not_found)
2014 mooseError("Executor not found: ", name);
2015
2016 return *_null_executor;
2017}

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

436{ return _initial_from_file; }

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

◆ getExReaderForRestart()

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

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

Definition at line 449 of file MooseApp.h.

449{ 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:1416

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

◆ getFactory()

Factory & MooseApp::getFactory ( )
inline

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

Definition at line 407 of file MooseApp.h.

407{ return _factory; }

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), BatchMeshGeneratorAction::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MooseServer::addValuesToList(), AStableDirk4::AStableDirk4(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), LibmeshPartitioner::clone(), BlockWeightedPartitioner::clone(), CopyMeshPartitioner::clone(), GridPartitioner::clone(), HierarchicalGridPartitioner::clone(), PetscExternalPartitioner::clone(), RandomPartitioner::clone(), SingleRankPartitioner::clone(), ElementPointNeighborLayers::clone(), ElementSideNeighborLayers::clone(), GhostAllPointNeighbors::clone(), GhostBoundary::clone(), GhostEverything::clone(), GhostHigherDLowerDPointNeighbors::clone(), GhostLowerDElems::clone(), GhostPrimaryFace::clone(), ProxyRelationshipManager::clone(), RedistributeProperties::clone(), SampledOutput::cloneMesh(), MooseBase::connectControllableParams(), MeshGeneratorSystem::createMeshGenerator(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), MooseServer::gatherDocumentDefinitionLocations(), MooseServer::getHoverDisplayText(), MooseServer::getObjectParameters(), MooseObject::MooseObject(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), OverlayMeshGenerator::OverlayMeshGenerator(), AuxiliarySystem::registerFVGradient(), AnnularMesh::safeClone(), ConcentricCircleMesh::safeClone(), FileMesh::safeClone(), GeneratedMesh::safeClone(), ImageMesh::safeClone(), MeshGeneratorMesh::safeClone(), PatternedMesh::safeClone(), RinglebMesh::safeClone(), SpiralAnnularMesh::safeClone(), StitchedMesh::safeClone(), TiledMesh::safeClone(), MFEMFileMesh::safeClone(), MFEMMeshGeneratorMesh::safeClone(), TransientBase::setupTimeIntegrator(), and SideSetExtruderGenerator::SideSetExtruderGenerator().

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

2409{
2410 return _builder.getPrimaryFileName(stripLeadingPath);
2411}
std::string getPrimaryFileName(bool stripLeadingPath=true) const
Return the primary (first) filename that was parsed.
Definition Builder.C:179

Referenced by ProgressOutput::output().

◆ getFPTrapFlag()

bool MooseApp::getFPTrapFlag ( ) const
inline

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

Definition at line 979 of file MooseApp.h.

979{ return _trap_fpe; }

◆ getFrameworkVersion()

std::string MooseApp::getFrameworkVersion ( ) const

Returns the framework version.

Definition at line 1012 of file MooseApp.C.

1013{
1014 return MOOSE_VERSION;
1015}

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

318{ return _global_time_offset; }

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

◆ getHitNode() [1/2]

const hit::Node * MooseBase::getHitNode ( ) const
inlineinherited
Returns
The block-level hit node for this object, if any

Definition at line 136 of file MooseBase.h.

136{ return getHitNode(_pars); }

Referenced by MooseBase::callMooseError(), MooseBase::getHitNode(), and MooseBase::messagePrefix().

◆ getHitNode() [2/2]

const hit::Node * MooseBase::getHitNode ( const InputParameters params)
staticprivateinherited

Internal method for getting a hit node (if available) given a set of parameters.

Needs to be static so that we can call it externally from InputParameters for errors that do not have context of the MooseBase

Definition at line 167 of file MooseBase.C.

168{
169 if (const auto hit_node = params.getHitNode())
170 if (!hit_node->isRoot())
171 return hit_node;
172 return nullptr;
173}
const hit::Node * getHitNode(const std::string &param) const

◆ getInputFileNames()

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

Definition at line 1523 of file MooseApp.C.

1524{
1525 mooseAssert(_parser, "Parser is not set");
1526 return _parser->getInputFileNames();
1527}

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

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

2209{
2210 return "tests";
2211}

Referenced by showInputs().

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

1802{
1803 static_assert(!std::is_base_of<MooseObject, T>::value, "T is not an interface");
1804
1805 const auto it = _interface_registry.find(typeid(T));
1806 if (it != _interface_registry.end())
1807 return cast_ptr<InterfaceRegistryObjects<T> *>(it->second.get())->_objects;
1808 const static std::vector<T *> empty;
1809 return empty;
1810}
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
Registration for interface objects.
Definition MooseApp.h:1727

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

◆ getKokkosMemoryPool()

const Moose::Kokkos::MemoryPool & MooseApp::getKokkosMemoryPool ( ) const

Get Kokkos memory pool.

Returns
The Kokkos memory pool

◆ getLastInputFileName()

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

Definition at line 1530 of file MooseApp.C.

1531{
1532 mooseAssert(_parser, "Parser is not set");
1533 return _parser->getLastInputFileName();
1534}

Referenced by setupOptions().

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

2847{
2848 std::set<std::string> paths;
2849
2850 if (!library_path.empty())
2851 {
2852 std::vector<std::string> tmp_paths;
2853 MooseUtils::tokenize(library_path, tmp_paths, 1, ":");
2854
2855 paths.insert(tmp_paths.begin(), tmp_paths.end());
2856 }
2857
2858 char * moose_lib_path_env = std::getenv("MOOSE_LIBRARY_PATH");
2859 if (moose_lib_path_env)
2860 {
2861 std::string moose_lib_path(moose_lib_path_env);
2862 std::vector<std::string> tmp_paths;
2863 MooseUtils::tokenize(moose_lib_path, tmp_paths, 1, ":");
2864
2865 paths.insert(tmp_paths.begin(), tmp_paths.end());
2866 }
2867
2868 return paths;
2869}
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 ...

Referenced by dynamicAppRegistration(), and dynamicRegistration().

◆ getLibtorchDevice()

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

◆ getLoadedLibraryPaths()

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

Return the paths of loaded libraries.

Definition at line 2835 of file MooseApp.C.

2836{
2837 // Return the paths but not the open file handles
2838 std::set<std::string> paths;
2839 for (const auto & it : _lib_handles)
2840 paths.insert(it.first);
2841
2842 return paths;
2843}

Referenced by Factory::reportUnregisteredError().

◆ getMeshGenerator()

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

Definition at line 920 of file MooseApp.h.

921 {
923 }
const MeshGenerator & getMeshGenerator(const std::string &name) const

Referenced by MeshGenerator::generateInternal(), and MeshGenerator::generateInternalCSG().

◆ getMeshGeneratorMesh()

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

Definition at line 928 of file MooseApp.h.

929 {
931 }
static std::string mainMeshGeneratorName()
The name reserved for the "main" mesh generator which is the one used for the numerical solver downst...
std::unique_ptr< libMesh::MeshBase > getSavedMesh(const std::string &name)
Get the saved mesh by name.

◆ getMeshGeneratorNames()

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

See MeshGeneratorSystem::getMeshGeneratorNames()

Definition at line 938 of file MooseApp.h.

939 {
941 }
std::vector< std::string > getMeshGeneratorNames() const
Get names of all mesh generators Note: This function should be called after all mesh generators are a...

Referenced by SetupMeshAction::act().

◆ getMeshGeneratorSystem()

MeshGeneratorSystem & MooseApp::getMeshGeneratorSystem ( )
inline

◆ getMFEMDevice()

std::shared_ptr< mfem::Device > MooseApp::getMFEMDevice ( Moose::PassKey< MultiApp )
inline

Get the MFEM device object.

Definition at line 1134 of file MooseApp.h.

1134{ return _mfem_device; }

Referenced by MultiApp::createApp().

◆ getMFEMDevices()

const std::set< std::string > & MooseApp::getMFEMDevices ( Moose::PassKey< MultiApp ) const
inline

Get the configured MFEM devices.

Definition at line 1814 of file MooseApp.h.

1815{
1816 return _mfem_devices;
1817}

Referenced by MultiApp::createApp().

◆ getMooseApp()

MooseApp & MooseBase::getMooseApp ( ) const
inlineinherited

Get the MooseApp this class is associated with.

Definition at line 87 of file MooseBase.h.

87{ return _app; }

Referenced by ChainControlSetupAction::act(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::advanceState(), ParsedChainControl::buildFunction(), ReporterTransferInterface::checkHasReporterValue(), LinearFVGradientManager::checkRestartedGradientHistory(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Coupleable::checkWritableVar(), ComponentPhysicsInterface::ComponentPhysicsInterface(), Coupleable::Coupleable(), MortarInterfaceWarehouse::createMortarInterface(), EigenProblem::doFreeNonlinearPowerIterations(), Terminator::execute(), FEProblemSolve::FEProblemSolve(), SolutionInvalidInterface::flagInvalidSolutionInternal(), ChainControl::getChainControlDataSystem(), FEProblemBase::getDistribution(), FEProblemBase::getFunction(), FEProblemBase::getFVInterpolationMethod(), FEProblemBase::getMultiApp(), FEProblemBase::getSampler(), DefaultConvergenceBase::getSharedExecutionerParam(), FEProblemBase::getUserObjectBase(), FEProblemBase::getVectorPostprocessorObjectByName(), ChainControlDataPostprocessor::initialSetup(), MaterialPropertyInterface::MaterialPropertyInterface(), MooseVariableDataFV< OutputType >::MooseVariableDataFV(), ProgressOutput::output(), PetscOutputInterface::petscLinearOutput(), PetscOutputInterface::petscNonlinearOutput(), Moose::PetscSupport::PetscOptionsScope::PetscOptionsScope(), PetscOutputInterface::PetscOutputInterface(), PostprocessorInterface::postprocessorsAdded(), MultiApp::preTransfer(), AuxiliarySystem::registerFVGradient(), Reporter::Reporter(), ReporterInterface::reportersAdded(), MultiApp::restore(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

◆ getNullExecutor()

NullExecutor * MooseApp::getNullExecutor ( ) const
inline

Definition at line 342 of file MooseApp.h.

342{ return _null_executor.get(); }

Referenced by ExecutorInterface::getExecutor().

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

1538{
1539 if (_file_base_set_by_user || for_non_moose_build_output || _multiapp_level)
1540 return _output_file_base;
1541 else
1542 return _output_file_base + "_out";
1543}
std::string _output_file_base
The output file basename.
Definition MooseApp.h:1297

Referenced by CSGOnlyAction::act(), getCheckpointDirectories(), AutomaticMortarGeneration::outputMortarMesh(), OutputWarehouse::resetFileBase(), and MultiApp::setAppOutputFileBase().

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

553 {
555 }
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:1448

Referenced by TransientMultiApp::setupApp().

◆ getOutputPosition()

Point MooseApp::getOutputPosition ( ) const
inline

Get the output position.

Returns
The position offset for the output.

Definition at line 288 of file MooseApp.h.

288{ return _output_position; }
Point _output_position
The output position.
Definition MooseApp.h:1306

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

◆ getOutputWarehouse() [1/2]

OutputWarehouse & MooseApp::getOutputWarehouse ( )

◆ getOutputWarehouse() [2/2]

const OutputWarehouse & MooseApp::getOutputWarehouse ( ) const

Definition at line 2420 of file MooseApp.C.

2421{
2422 return _output_warehouse;
2423}

◆ getParam() [1/2]

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

Retrieve a parameter for the object.

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

Definition at line 406 of file MooseBase.h.

407{
408 return InputParameters::getParamHelper<T>(name, _pars);
409}

Referenced by CommonOutputAction::act(), CreateDisplacedProblemAction::act(), CylinderComponent::addMeshGenerators(), FEProblemBase::addOutput(), ArrayParsedAux::ArrayParsedAux(), BicubicSplineFunction::BicubicSplineFunction(), Console::Console(), CutMeshByLevelSetGenerator::CutMeshByLevelSetGenerator(), DebugResidualAux::DebugResidualAux(), DerivativeParsedMaterialTempl< is_ad >::DerivativeParsedMaterialTempl(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenKernel::EigenKernel(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), MFEMEigenvaluesPostprocessor::execute(), FEProblemSolve::FEProblemSolve(), ParsedVectorReporter::finalize(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), ParsedSubdomainGeneratorBase::functionInitialize(), BlockDeletionGenerator::generate(), BoundaryLayerSubdomainGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenBlockGenerator::generate(), FileMeshGenerator::generate(), MeshExtruderGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), XYDelaunayGenerator::generate(), GenericConstantRankTwoTensorTempl< is_ad >::GenericConstantRankTwoTensorTempl(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), GeometricSearchInterface::GeometricSearchInterface(), getCheckpointDirectories(), DataFileInterface::getDataFileName(), ExecutorInterface::getExecutor(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), AdvancedOutput::init(), FixedPointIterationAdaptiveDT::init(), TimeSequenceStepper::init(), AdvancedOutput::initAvailableLists(), AttribThread::initFrom(), AttribExecutionOrderGroup::initFrom(), AttribSysNum::initFrom(), AttribResidualObject::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), Console::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MooseMesh::MooseMesh(), MooseVariableBase::MooseVariableBase(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiPostprocessorConvergence::MultiPostprocessorConvergence(), PerfGraphOutput::output(), Console::outputSystemInformation(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedElementDeletionGenerator::ParsedElementDeletionGenerator(), ParsedGenerateNodeset::ParsedGenerateNodeset(), ParsedGenerateSideset::ParsedGenerateSideset(), ParsedMaterialTempl< is_ad >::ParsedMaterialTempl(), ParsedNodeTransformGenerator::ParsedNodeTransformGenerator(), ParsedODEKernel::ParsedODEKernel(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedVectorReporter::ParsedVectorReporter(), ProjectSideSetOntoLevelSetGenerator::ProjectSideSetOntoLevelSetGenerator(), ReferenceResidualInterface::ReferenceResidualInterface(), Moose::FV::setInterpolationMethod(), SetupMeshAction::setupMesh(), setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), PetscOutput::solveSetup(), TimePeriod::TimePeriod(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), and VectorOfPostprocessors::VectorOfPostprocessors().

◆ getParam() [2/2]

template<typename T1 , typename T2 >
std::vector< std::pair< T1, T2 > > MooseBase::getParam ( const std::string &  param1,
const std::string &  param2 
) const
inherited

Retrieve two parameters and provide pair of parameters for the object.

Parameters
param1The name of first parameter
param2The name of second parameter
Returns
Vector of pairs of first and second parameters

Definition at line 443 of file MooseBase.h.

444{
445 return _pars.get<T1, T2>(param1, param2);
446}

◆ getPrintableName()

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

Get printable name of the application.

Definition at line 148 of file MooseApp.h.

148{ return "Application"; }

Referenced by getPrintableVersion().

◆ getPrintableVersion()

std::string MooseApp::getPrintableVersion ( ) const

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

Definition at line 1024 of file MooseApp.C.

1025{
1026 return getPrintableName() + " Version: " + getVersion();
1027}
virtual std::string getPrintableName() const
Get printable name of the application.
Definition MooseApp.h:148
virtual std::string getVersion() const
Returns the current version of the framework or application (default: framework version).
Definition MooseApp.C:1018

Referenced by setupOptions().

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

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

Referenced by restore(), and restore().

◆ getRecoverFileBase()

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

Definition at line 501 of file MooseApp.h.

502 {
503 mooseDeprecated("MooseApp::getRecoverFileBase is deprecated, use "
504 "MooseApp::getRestartRecoverFileBase() instead.");
506 }
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:1440

◆ getRelationshipManagerInfo()

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

Returns the Relationship managers info suitable for printing.

Definition at line 3324 of file MooseApp.C.

3325{
3326 std::vector<std::pair<std::string, std::string>> info_strings;
3327 info_strings.reserve(_relationship_managers.size());
3328
3329 for (const auto & rm : _relationship_managers)
3330 {
3331 std::stringstream oss;
3332 oss << rm->getInfo();
3333
3334 auto & for_whom = rm->forWhom();
3335
3336 if (!for_whom.empty())
3337 {
3338 oss << " for ";
3339
3340 std::copy(for_whom.begin(), for_whom.end(), infix_ostream_iterator<std::string>(oss, ", "));
3341 }
3342
3343 info_strings.emplace_back(std::make_pair(Moose::stringify(rm->getType()), oss.str()));
3344 }
3345
3346 // List the libMesh GhostingFunctors - Not that in libMesh all of the algebraic and coupling
3347 // Ghosting Functors are also attached to the mesh. This should catch them all.
3348 const auto & mesh = _action_warehouse.getMesh();
3349 if (mesh)
3350 {
3351 // Let us use an ordered map to avoid stochastic console behaviors.
3352 // I believe we won't have many RMs, and there is no performance issue.
3353 // Deterministic behaviors are good for setting up regression tests
3354 std::map<std::string, unsigned int> counts;
3355
3356 for (auto & gf : as_range(mesh->getMesh().ghosting_functors_begin(),
3357 mesh->getMesh().ghosting_functors_end()))
3358 {
3359 const auto * gf_ptr = dynamic_cast<const RelationshipManager *>(gf);
3360 if (!gf_ptr)
3361 // Count how many occurences of the same Ghosting Functor types we are encountering
3362 counts[demangle(typeid(*gf).name())]++;
3363 }
3364
3365 for (const auto & pair : counts)
3366 info_strings.emplace_back(std::make_pair(
3367 "Default", pair.first + (pair.second > 1 ? " x " + std::to_string(pair.second) : "")));
3368 }
3369
3370 // List the libMesh GhostingFunctors - Not that in libMesh all of the algebraic and coupling
3371 // Ghosting Functors are also attached to the mesh. This should catch them all.
3372 const auto & d_mesh = _action_warehouse.getDisplacedMesh();
3373 if (d_mesh)
3374 {
3375 // Let us use an ordered map to avoid stochastic console behaviors.
3376 // I believe we won't have many RMs, and there is no performance issue.
3377 // Deterministic behaviors are good for setting up regression tests
3378 std::map<std::string, unsigned int> counts;
3379
3380 for (auto & gf : as_range(d_mesh->getMesh().ghosting_functors_begin(),
3381 d_mesh->getMesh().ghosting_functors_end()))
3382 {
3383 const auto * gf_ptr = dynamic_cast<const RelationshipManager *>(gf);
3384 if (!gf_ptr)
3385 // Count how many occurences of the same Ghosting Functor types we are encountering
3386 counts[demangle(typeid(*gf).name())]++;
3387 }
3388
3389 for (const auto & pair : counts)
3390 info_strings.emplace_back(
3391 std::make_pair("Default",
3392 pair.first + (pair.second > 1 ? " x " + std::to_string(pair.second) : "") +
3393 " for DisplacedMesh"));
3394 }
3395
3396 return info_strings;
3397}
const std::shared_ptr< MooseMesh > & getDisplacedMesh() const
const std::shared_ptr< MooseMesh > & getMesh() const
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:64
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::string demangle(const char *name)

Referenced by ConsoleUtils::outputRelationshipManagerInformation().

◆ getReleationshipManagers()

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

Retrieve the relationship managers.

◆ getRenamedParam()

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

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 420 of file MooseBase.h.

421{
422 // Most important: accept new parameter
423 if (isParamSetByUser(new_name) && !isParamValid(old_name))
424 return getParam<T>(new_name);
425 // Second most: accept old parameter
426 if (isParamValid(old_name) && !isParamSetByUser(new_name))
427 return getParam<T>(old_name);
428 // Third most: accept default for new parameter
429 if (isParamValid(new_name) && !isParamValid(old_name))
430 return getParam<T>(new_name);
431 // Refuse: no default, no value passed
432 if (!isParamValid(old_name) && !isParamValid(new_name))
433 mooseError("parameter '" + new_name +
434 "' is being retrieved without being set.\nDid you misspell it?");
435 // Refuse: both old and new parameters set by user
436 else
437 mooseError("Parameter '" + new_name + "' may not be provided alongside former parameter '" +
438 old_name + "'");
439}

◆ getRestartableData() [1/2]

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

Definition at line 694 of file MooseApp.h.

694{ return _restartable_data; }

◆ getRestartableData() [2/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 693 of file MooseApp.h.

693{ return _restartable_data; }

◆ getRestartableDataMap()

RestartableDataMap & MooseApp::getRestartableDataMap ( const RestartableDataMapName name)

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

Definition at line 3432 of file MooseApp.C.

3433{
3434 auto iter = _restartable_meta_data.find(name);
3435 if (iter == _restartable_meta_data.end())
3436 mooseError("Unable to find RestartableDataMap object for the supplied name '",
3437 name,
3438 "', did you call registerRestartableDataMapName in the application constructor?");
3439 return iter->second.first;
3440}

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

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

1079{ return _restartable_meta_data.begin(); }

Referenced by SetupDebugAction::act().

◆ getRestartableDataMapEnd()

auto MooseApp::getRestartableDataMapEnd ( )
inline

Definition at line 1081 of file MooseApp.h.

1081{ return _restartable_meta_data.end(); }

Referenced by SetupDebugAction::act().

◆ getRestartableDataMapName()

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

Definition at line 3459 of file MooseApp.C.

3460{
3461 const auto it = _restartable_meta_data.find(name);
3462 if (it == _restartable_meta_data.end())
3463 mooseError("MooseApp::getRestartableDataMapName: The name '", name, "' is not registered");
3464 return it->second.second;
3465}

Referenced by possiblyLoadRestartableMetaData(), and writeRestartableMetaData().

◆ getRestartableMetaData()

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

Definition at line 2516 of file MooseApp.C.

2519{
2520 if (tid != 0)
2521 mooseError(
2522 "The meta data storage for '", metaname, "' is not threaded, so the tid must be zero.");
2523
2524 // Get metadata reference from RestartableDataMap and return a (non-const) reference to its value
2525 auto & restartable_data_map = getRestartableDataMap(metaname);
2526 RestartableDataValue * const data = restartable_data_map.findData(name);
2527 if (!data)
2528 mooseError("Unable to find RestartableDataValue object with name " + name +
2529 " in RestartableDataMap");
2530
2531 return *data;
2532}
RestartableDataMap & getRestartableDataMap(const RestartableDataMapName &name)
Return a reference to restartable data for the specific type flag.
Definition MooseApp.C:3432
Abstract definition of a RestartableData value.

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

◆ getRestartRecoverFileBase()

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

The file_base for the recovery file.

Definition at line 500 of file MooseApp.h.

500{ return _restart_recover_base; }

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

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

3084{
3085 auto outer_it = _template_to_clones.find(&template_rm);
3086 if (outer_it == _template_to_clones.end())
3087 mooseError("The template rm does not exist in our _template_to_clones map");
3088
3089 auto & mesh_to_clone_map = outer_it->second;
3090 auto inner_it = mesh_to_clone_map.find(&mesh);
3091 if (inner_it == mesh_to_clone_map.end())
3092 mooseError("We should have the mesh key in our mesh");
3093
3094 return *inner_it->second;
3095}

Referenced by removeRelationshipManager().

◆ getStartTime()

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

Definition at line 306 of file MooseApp.h.

306{ return _start_time; }

Referenced by TransientBase::TransientBase().

◆ getSystemInfo()

const SystemInfo & MooseApp::getSystemInfo ( ) const
inline

Get SystemInfo object.

Returns
A pointer to the SystemInformation object

Definition at line 567 of file MooseApp.h.

567{ return _sys_info; }
SystemInfo _sys_info
System Information.
Definition MooseApp.h:1340

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

◆ getVersion()

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

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

Definition at line 1018 of file MooseApp.C.

1019{
1020 return MOOSE_VERSION;
1021}

Referenced by getPrintableVersion().

◆ hasBase()

bool MooseBase::hasBase ( ) const
inlineinherited
Returns
Whether or not this object has a registered base (set via InputParameters::registerBase())

Definition at line 142 of file MooseBase.h.

142{ return _pars.hasBase(); }
bool hasBase() const

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

1048 {
1049 return _initial_backup != nullptr && *_initial_backup != nullptr;
1050 }

Referenced by hasInitialBackupMesh(), restoreFromInitialBackup(), and restoreMeshFromInitialBackup().

◆ hasInitialBackupMesh()

bool MooseApp::hasInitialBackupMesh ( ) const

Whether this app has an initial Backup object with mesh checkpoint entries.

Definition at line 1748 of file MooseApp.C.

1749{
1750 return hasInitialBackup() && !(*_initial_backup)->mesh_files.empty();
1751}
bool hasInitialBackup() const
Definition MooseApp.h:1047

◆ hasMeshGenerator()

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

Definition at line 912 of file MooseApp.h.

913 {
915 }
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 282 of file MooseApp.h.

282{ return _output_position_set; }

Referenced by Exodus::output().

◆ hasRecoverFileBase()

bool MooseApp::hasRecoverFileBase ( ) const

Definition at line 1698 of file MooseApp.C.

1699{
1700 mooseDeprecated("MooseApp::hasRecoverFileBase is deprecated, use "
1701 "MooseApp::hasRestartRecoverFileBase() instead.");
1702 return !_restart_recover_base.empty();
1703}

◆ hasRelationshipManager()

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

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

Definition at line 2970 of file MooseApp.C.

2971{
2972 return std::find_if(_relationship_managers.begin(),
2974 [&name](const std::shared_ptr<RelationshipManager> & rm)
2975 { return rm->name() == name; }) != _relationship_managers.end();
2976}

◆ hasRestartableDataMap()

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

Definition at line 3443 of file MooseApp.C.

3444{
3445 return _restartable_meta_data.count(name);
3446}

◆ hasRestartableMetaData()

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

Definition at line 2506 of file MooseApp.C.

2508{
2509 auto it = _restartable_meta_data.find(metaname);
2510 if (it == _restartable_meta_data.end())
2511 return false;
2512 return it->second.first.hasData(name);
2513}

Referenced by MeshMetaDataInterface::hasMeshProperty().

◆ hasRestartRecoverFileBase()

bool MooseApp::hasRestartRecoverFileBase ( ) const

Return true if the recovery file base is set.

Definition at line 1692 of file MooseApp.C.

1693{
1694 return !_restart_recover_base.empty();
1695}

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

3076{
3077 auto it = _template_to_clones.find(&template_rm);
3078 // C++ does short circuiting so we're safe here
3079 return (it != _template_to_clones.end()) && (it->second.find(&mesh) != it->second.end());
3080}

Referenced by removeRelationshipManager().

◆ hasStartTime()

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

Definition at line 301 of file MooseApp.h.

301{ return _start_time_set; }

Referenced by TransientBase::TransientBase().

◆ header()

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

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

Definition at line 2878 of file MooseApp.C.

2879{
2880 return std::string("");
2881}

Referenced by restore(), and setupOptions().

◆ isInTree()

bool MooseApp::isInTree ( )
static
Returns
Whether or not the application is in-tree

Definition at line 3623 of file MooseApp.C.

3624{
3626}
static bool isInTree()
Definition MooseApp.C:3623

Referenced by isInTree().

◆ isKokkosAvailable()

bool MooseApp::isKokkosAvailable ( ) const
inline

Get whether Kokkos is available.

Returns
1) True if MOOSE is configured with Kokkos and every process has an associated GPU, 2) True if MOOSE is configured with Kokkos and GPU capablities are disabled, 3) False otherwise.

Definition at line 1149 of file MooseApp.h.

1150 {
1151#ifdef MOOSE_KOKKOS_ENABLED
1152#ifdef MOOSE_ENABLE_KOKKOS_GPU
1153 return _has_kokkos_gpus;
1154#else
1155 return true;
1156#endif
1157#else
1158 return false;
1159#endif
1160 }
bool _has_kokkos_gpus
Flag whether every process has an associated Kokkos GPU.
Definition MooseApp.h:1773

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

◆ isParamSetByUser()

bool MooseBase::isParamSetByUser ( const std::string &  name) const
inlineinherited

Test if the supplied parameter is set by a user, as opposed to not set or set to default.

Parameters
nameThe name of the parameter to test

Definition at line 205 of file MooseBase.h.

206 {
208 }
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was set by the user.

Referenced by DiffusionCG::addFEBCs(), DiffusionPhysicsBase::addInitialConditions(), CylinderComponent::addMeshGenerators(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), MFEMMesh::buildMesh(), MFEMBoundarySubMesh::buildSubMesh(), MFEMDomainSubMesh::buildSubMesh(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), copyInputs(), DiffusionPhysicsBase::DiffusionPhysicsBase(), errorCheck(), FileMesh::FileMesh(), FullSolveMultiApp::FullSolveMultiApp(), MeshDiagnosticsGenerator::generate(), OrientSurfaceMeshGenerator::generate(), SurfaceSubdomainsFromAllNormalsGenerator::generate(), MFEMVectorFESpace::getFECName(), MooseBase::getRenamedParam(), DefaultConvergenceBase::getSharedExecutionerParam(), AddVariableAction::init(), MFEMMesh::init(), PhysicsBase::initializePhysics(), ElementSubdomainModifierBase::initialSetup(), MatrixSymmetryCheck::MatrixSymmetryCheck(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MFEMGeneratedMeshGenerator::MFEMGeneratedMeshGenerator(), MFEMVariable::MFEMVariable(), MortarConstraintBase::MortarConstraintBase(), MoveNodesByParsedExpressionModifier::moveNodes(), MultiAppGeneralFieldFunctorTransfer::MultiAppGeneralFieldFunctorTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), SolutionInvalidityOutput::output(), Output::Output(), MultiAppGeneralFieldTransfer::outputValueConflicts(), PetscExternalPartitioner::partition(), PolyLineMeshFollowingNodeSetGenerator::PolyLineMeshFollowingNodeSetGenerator(), MooseMesh::prepare(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), PhysicsBase::reportPotentiallyMissedParameters(), run(), runInputFile(), runInputs(), Moose::MFEM::LinearSolverBase::SetPreconditioner(), SetupMeshAction::setupMesh(), setupOptions(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SmoothMeshGenerator::SmoothMeshGenerator(), SurfaceSubdomainsDelaunayRemesher::SurfaceSubdomainsDelaunayRemesher(), SurfaceSubdomainsFromAllNormalsGenerator::SurfaceSubdomainsFromAllNormalsGenerator(), TagVectorAux::TagVectorAux(), TimedSubdomainModifier::TimedSubdomainModifier(), TimeIntegratedPostprocessor::TimeIntegratedPostprocessor(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ isParamValid()

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

Test if the supplied parameter is valid.

Parameters
nameThe name of the parameter to test

Definition at line 199 of file MooseBase.h.

199{ return _pars.isParamValid(name); }
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...

Referenced by GridPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), AddVariableAction::act(), AutoCheckpointAction::act(), CommonOutputAction::act(), ComposeTimeStepperAction::act(), CopyNodalVarsAction::act(), CreateDisplacedProblemAction::act(), SetAdaptivityOptionsAction::act(), SetupDebugAction::act(), SetupMeshCompleteAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVBCs(), DiffusionFV::addFVKernels(), DiffusionPhysicsBase::addInitialConditions(), ComponentJunction::addMeshGenerators(), CylinderComponent::addMeshGenerators(), DiffusionPhysicsBase::addPostprocessors(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayVarReductionAux::ArrayVarReductionAux(), BicubicSplineFunction::BicubicSplineFunction(), BlockDeletionGenerator::BlockDeletionGenerator(), BSplineCurveGenerator::BSplineCurveGenerator(), TimedSubdomainModifier::buildFromFile(), ParsedChainControl::buildFunction(), GeneratedMesh::buildMesh(), MooseMesh::buildTypedMesh(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), LibmeshPartitioner::clone(), SampledOutput::cloneMesh(), CombinedVectorPostprocessor::CombinedVectorPostprocessor(), CombinerGenerator::CombinerGenerator(), ComponentJunction::ComponentJunction(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), FEProblemSolve::convergenceSetup(), CopyMeshPartitioner::CopyMeshPartitioner(), CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(), CutMeshByLevelSetGeneratorBase::CutMeshByLevelSetGeneratorBase(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), DGKernelBase::DGKernelBase(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), EigenProblemSolve::EigenProblemSolve(), ElementGenerator::ElementGenerator(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), PIDTransientControl::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), Exodus::Exodus(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileOutput::FileOutput(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), FiniteDifferencePreconditioner::FiniteDifferencePreconditioner(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FVInterfaceKernel::FVInterfaceKernel(), FVMassMatrix::FVMassMatrix(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AddMetaDataGenerator::generate(), BlockDeletionGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BSplineCurveGenerator::generate(), ConcentricCircleMeshGenerator::generate(), DistributedRectilinearMeshGenerator::generate(), ElementGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ManifoldSubdomainGenerator::generate(), MeshExtruderGenerator::generate(), OrientSurfaceMeshGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), SphereMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainPerElementGenerator::generate(), XYDelaunayGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PropertyReadFile::getFileNames(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getRenamedParam(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), AddPeriodicBCAction::getVariables(), Terminator::handleMessage(), HFEMDirichletBC::HFEMDirichletBC(), EigenExecutionerBase::init(), IterationAdaptiveDT::init(), AdvancedOutput::initAvailableLists(), AdvancedOutput::initExecutionTypes(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), SolutionAux::initialSetup(), SolutionScalarAux::initialSetup(), PIDTransientControl::initialSetup(), ParsedConvergence::initialSetup(), EigenProblemSolve::initialSetup(), MooseParsedFunction::initialSetup(), MooseParsedGradFunction::initialSetup(), MooseParsedVectorFunction::initialSetup(), PiecewiseTabularBase::initialSetup(), SolutionIC::initialSetup(), Console::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MultiAppVariableValueSampleTransfer::initialSetup(), SampledOutput::initSample(), IterationAdaptiveDT::IterationAdaptiveDT(), LeastSquaresFit::LeastSquaresFit(), LibmeshPartitioner::LibmeshPartitioner(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), PNGOutput::makePNG(), MassMatrix::MassMatrix(), MatCoupledForce::MatCoupledForce(), MeshGeneratorComponent::MeshGeneratorComponent(), MFEMProblemSolve::MFEMProblemSolve(), MooseMesh::MooseMesh(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldKDTreeTransferBase::MultiAppGeneralFieldKDTreeTransferBase(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiPostprocessorConvergence::MultiPostprocessorConvergence(), MultiSystemSolveObject::MultiSystemSolveObject(), NodeSetsGeneratorBase::NodeSetsGeneratorBase(), EigenExecutionerBase::normalizeSolution(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedSubdomainGeneratorBase::ParsedSubdomainGeneratorBase(), PetscOutput::PetscOutput(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), EqualValueBoundaryConstraint::pickPrimaryNode(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularBase::PiecewiseTabularBase(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), EqualValueBoundaryConstraint::populateSecondaryNodes(), MooseMesh::prepare(), MultiApp::readCommandLineArguments(), SolutionUserObjectBase::readExodusIIOrNemesis(), ReferenceResidualInterface::ReferenceResidualInterface(), RenameBlockGenerator::RenameBlockGenerator(), ReporterPointSource::ReporterPointSource(), PhysicsBase::reportPotentiallyMissedParameters(), ParsedSubdomainMeshGenerator::setBlockName(), MooseMesh::setCoordSystem(), FileOutput::setFileBaseInternal(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), Split::setup(), SetupMeshAction::setupMesh(), setupOptions(), Output::setWallTimeIntervalFromCommandLineParam(), SideDiffusiveFluxIntegralTempl< is_ad, T >::SideDiffusiveFluxIntegralTempl(), SideSetsGeneratorBase::SideSetsGeneratorBase(), SolutionUserObjectBase::SolutionUserObjectBase(), Terminator::Terminator(), TimeIntervalTimes::TimeIntervalTimes(), TimePeriod::TimePeriod(), PIDTransientControl::timestepSetup(), MultiAppDofCopyTransfer::transfer(), TransformGenerator::TransformGenerator(), TransientBase::TransientBase(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), XYDelaunayGenerator::XYDelaunayGenerator(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ isRecovering()

bool MooseApp::isRecovering ( ) const

◆ isRelocated()

bool MooseApp::isRelocated ( )
static
Returns
Whether or not the application is relocated

Definition at line 3617 of file MooseApp.C.

3618{
3620}
static bool isRelocated()
Definition MooseApp.C:3617

Referenced by isRelocated().

◆ 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 \emph checkpoint restart. This will be false if doing \emph exodus restart. Finally this will never return true when isRecovering is true

Definition at line 1680 of file MooseApp.C.

1681{
1682 return _restart;
1683}

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

◆ isSplitMesh()

bool MooseApp::isSplitMesh ( ) const

Whether or not this is a split mesh operation.

Definition at line 1686 of file MooseApp.C.

1687{
1688 return _split_mesh;
1689}

Referenced by MooseMesh::init().

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

2443{
2444 std::string app_name(library_name);
2445
2446 // Strip off the leading "lib" and trailing ".la"
2447 if (pcrecpp::RE("lib(.+?)(?:-\\w+)?\\.la").Replace("\\1", &app_name) == 0)
2448 mooseError("Invalid library name: ", app_name);
2449
2450 return MooseUtils::underscoreToCamelCase(app_name, true);
2451}
std::string underscoreToCamelCase(const std::string &underscore_name, bool leading_upper_case)
Definition MooseUtils.C:591

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

2688{
2689 std::string line;
2690 std::string dl_lib_filename;
2691
2692 // This RE looks for absolute path libtool filenames (i.e. begins with a slash and ends with a
2693 // .la)
2694 pcrecpp::RE re_deps("(/\\S*\\.la)");
2695
2696 std::ifstream la_handle(library_filename.c_str());
2697 if (la_handle.is_open())
2698 {
2699 while (std::getline(la_handle, line))
2700 {
2701 // Look for the system dependent dynamic library filename to open
2702 if (line.find("dlname=") != std::string::npos)
2703 // Magic numbers are computed from length of this string "dlname=' and line minus that
2704 // string plus quotes"
2705 dl_lib_filename = line.substr(8, line.size() - 9);
2706
2707 if (line.find("dependency_libs=") != std::string::npos)
2708 {
2709 if (load_dependencies)
2710 {
2711 pcrecpp::StringPiece input(line);
2712 pcrecpp::StringPiece depend_library;
2713 while (re_deps.FindAndConsume(&input, &depend_library))
2714 // Recurse here to load dependent libraries in depth-first order
2715 loadLibraryAndDependencies(depend_library.as_string(), params, load_dependencies);
2716 }
2717
2718 // There's only one line in the .la file containing the dependency libs so break after
2719 // finding it
2720 break;
2721 }
2722 }
2723 la_handle.close();
2724 }
2725
2726 // This should only occur if we have static linkage.
2727 if (dl_lib_filename.empty())
2728 return;
2729
2730 const auto & [dir, file_name] = MooseUtils::splitFileName(library_filename);
2731
2732 // Time to load the library, First see if we've already loaded this particular dynamic library
2733 // 1) make sure we haven't already loaded this library
2734 // AND 2) make sure we have a library name (we won't for static linkage)
2735 // Note: Here was are going to assume uniqueness based on the filename alone. This has significant
2736 // implications for applications that have "diamond" inheritance of libraries (usually
2737 // modules). We will only load one of those libraries, versions be damned.
2738 auto dyn_lib_it = _lib_handles.find(file_name);
2739 if (dyn_lib_it == _lib_handles.end())
2740 {
2741 // Assemble the actual filename using the base path of the *.la file and the dl_lib_filename
2742 const auto dl_lib_full_path = MooseUtils::pathjoin(dir, dl_lib_filename);
2743
2744 MooseUtils::checkFileReadable(dl_lib_full_path, false, /*throw_on_unreadable=*/true);
2745
2746#ifdef LIBMESH_HAVE_DLOPEN
2747 void * const lib_handle = dlopen(dl_lib_full_path.c_str(), RTLD_LAZY);
2748#else
2749 void * const lib_handle = nullptr;
2750#endif
2751
2752 if (!lib_handle)
2753 mooseError("The library file \"",
2754 dl_lib_full_path,
2755 "\" exists and has proper permissions, but cannot by dynamically loaded.\nThis "
2756 "generally means that the loader was unable to load one or more of the "
2757 "dependencies listed in the supplied library (see otool or ldd).\n",
2758 dlerror());
2759
2760 DynamicLibraryInfo lib_info;
2761 lib_info.library_handle = lib_handle;
2762 lib_info.full_path = library_filename;
2763
2764 auto insert_ret = _lib_handles.insert(std::make_pair(file_name, lib_info));
2765 mooseAssert(insert_ret.second == true, "Error inserting into lib_handles map");
2766
2767 dyn_lib_it = insert_ret.first;
2768 }
2769
2770 // Library has been loaded, check to see if we've called the requested registration method
2771 const auto registration_method = params.get<std::string>("registration_method");
2772 auto & entry_sym_from_curr_lib = dyn_lib_it->second.entry_symbols;
2773
2774 if (entry_sym_from_curr_lib.find(registration_method) == entry_sym_from_curr_lib.end())
2775 {
2776 // get the pointer to the method in the library. The dlsym()
2777 // function returns a null pointer if the symbol cannot be found,
2778 // we also explicitly set the pointer to NULL if dlsym is not
2779 // available.
2780#ifdef LIBMESH_HAVE_DLOPEN
2781 void * registration_handle =
2782 dlsym(dyn_lib_it->second.library_handle, registration_method.c_str());
2783#else
2784 void * registration_handle = nullptr;
2785#endif
2786
2787 if (registration_handle)
2788 {
2789 switch (params.get<RegistrationType>("reg_type"))
2790 {
2791 case APPLICATION:
2792 {
2793 using register_app_t = void (*)();
2794 register_app_t * const reg_ptr = reinterpret_cast<register_app_t *>(&registration_handle);
2795 (*reg_ptr)();
2796 break;
2797 }
2798 case REGALL:
2799 {
2800 using register_app_t = void (*)(Factory *, ActionFactory *, Syntax *);
2801 register_app_t * const reg_ptr = reinterpret_cast<register_app_t *>(&registration_handle);
2802 (*reg_ptr)(params.get<Factory *>("factory"),
2803 params.get<ActionFactory *>("action_factory"),
2804 params.get<Syntax *>("syntax"));
2805 break;
2806 }
2807 default:
2808 mooseError("Unhandled RegistrationType");
2809 }
2810
2811 entry_sym_from_curr_lib.insert(registration_method);
2812 }
2813 else
2814 {
2815
2816#if defined(DEBUG) && defined(LIBMESH_HAVE_DLOPEN)
2817 // We found a dynamic library that doesn't have a dynamic
2818 // registration method in it. This shouldn't be an error, so
2819 // we'll just move on.
2820 if (!registration_handle)
2821 mooseWarning("Unable to find extern \"C\" method \"",
2822 registration_method,
2823 "\" in library: ",
2824 dyn_lib_it->first,
2825 ".\n",
2826 "This doesn't necessarily indicate an error condition unless you believe that "
2827 "the method should exist in that library.\n",
2828 dlerror());
2829#endif
2830 }
2831 }
2832}
void mooseWarning(Args &&... args) const
Emits a warning prefixed with object name and type.
Definition MooseBase.h:299
std::filesystem::path pathjoin(const std::filesystem::path &p)
Definition MooseUtils.C:70

Referenced by dynamicRegistration(), and loadLibraryAndDependencies().

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

2551{
2552 for (const auto & name_map_pair : _restartable_meta_data)
2553 possiblyLoadRestartableMetaData(name_map_pair.first, folder_base);
2554}
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:2535

Referenced by SetupRecoverFileBaseAction::act().

◆ markMeshChangedForBackup()

void MooseApp::markMeshChangedForBackup ( )
inline

Mark this app as requiring mesh topology data in its next Backup object.

Definition at line 755 of file MooseApp.h.

755{ _mesh_changed_for_backup = true; }
bool _mesh_changed_for_backup
Whether mesh topology has changed and should be included in Backup objects.
Definition MooseApp.h:1739

Referenced by FEProblemBase::meshChanged().

◆ masterDisplacedMesh()

const MooseMesh * MooseApp::masterDisplacedMesh ( ) const
inline

Returns a pointer to the master displaced mesh.

Definition at line 881 of file MooseApp.h.

881{ return _master_displaced_mesh; }

Referenced by SetupMeshCompleteAction::act().

◆ masterMesh()

const MooseMesh * MooseApp::masterMesh ( ) const
inline

Returns a pointer to the master mesh.

Definition at line 876 of file MooseApp.h.

876{ return _master_mesh; }

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

◆ meshChangedForBackup()

bool MooseApp::meshChangedForBackup ( ) const
inline

Whether this app requires mesh topology data in its next Backup object.

Definition at line 760 of file MooseApp.h.

760{ return _mesh_changed_for_backup; }

◆ messagePrefix() [1/2]

std::string MooseBase::messagePrefix ( const bool  hit_prefix = true) const
inlineinherited
Returns
A prefix to be used in messages that contain the input file location associated with this object (if any) and the name and type of the object.

Definition at line 256 of file MooseBase.h.

257 {
258 return messagePrefix(_pars, hit_prefix);
259 }

Referenced by MooseBase::callMooseError(), MooseBase::errorPrefix(), MooseBase::messagePrefix(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), and MooseBase::mooseWarning().

◆ messagePrefix() [2/2]

std::string MooseBase::messagePrefix ( const InputParameters params,
const bool  hit_prefix 
)
staticprivateinherited

Internal method for getting the message prefix for an object (object type, name, etc).

Needs to be static so that we can call it externally from InputParameters for errors that do not have context of the MooseBase

Definition at line 140 of file MooseBase.C.

141{
142 std::string prefix = "";
143
144 if (hit_prefix)
145 if (const auto node = MooseBase::getHitNode(params))
146 prefix += Moose::hitMessagePrefix(*node);
147
148 // Don't have context without type and name
149 if (!params.isMooseBaseObject())
150 return prefix;
151
152 const auto & name = params.getObjectName();
153 const std::string base = params.hasBase() ? params.getBase() : "object";
154 const bool is_main_app = base == "Application" && name == AppFactory::main_app_name;
155 prefix += "The following occurred in the ";
156 if (is_main_app)
157 prefix += "main " + base;
158 else
159 prefix += base;
160 if (base != params.getObjectName() && name.size() && !is_main_app)
161 prefix += " '" + name + "'";
162 prefix += " of type " + params.getObjectType() + ".";
163 return prefix + "\n\n";
164}
static const std::string main_app_name
The name for the "main" moose application.
Definition AppFactory.h:68
bool isMooseBaseObject() const
const std::string & getObjectType() const
const std::string & getObjectName() const
std::string hitMessagePrefix(const hit::Node &node)
Get the prefix to be associated with a hit node for a message.
Definition Moose.C:909

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

3053{
3054 return RestartableDataIO::restartableDataFolder(folder_base /
3055 std::filesystem::path("meta_data" + map_suffix));
3056}
static std::filesystem::path restartableDataFolder(const std::filesystem::path &folder_base)

Referenced by possiblyLoadRestartableMetaData(), and writeRestartableMetaData().

◆ mooseDeprecated()

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

Emits a deprecation warning prefixed with the object name and type, and a stack trace.

Definition at line 317 of file MooseBase.h.

318 {
320 _console, false, true, true, messagePrefix(true), std::forward<Args>(args)...);
321 }
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, const bool show_trace, Args &&... args)
Definition MooseError.h:252

Referenced by addCapability(), DataFileInterface::getDataFileName(), DataFileInterface::getDataFileNameByName(), getRecoverFileBase(), hasRecoverFileBase(), and setupOptions().

◆ mooseDeprecatedNoTrace()

template<typename... Args>
void MooseBase::mooseDeprecatedNoTrace ( Args &&...  args) const
inlineinherited

Emits a deprecation warning prefixed with the object name and type, and no stack trace.

Definition at line 327 of file MooseBase.h.

328 {
330 _console, false, true, false, messagePrefix(true), std::forward<Args>(args)...);
331 }

◆ mooseDocumentedError()

template<typename... Args>
void MooseBase::mooseDocumentedError ( const std::string &  repo_name,
const unsigned int  issue_num,
Args &&...  args 
) const
inlineinherited

Definition at line 277 of file MooseBase.h.

280 {
282 repo_name, issue_num, argumentsToString(std::forward<Args>(args)...)),
283 /* with_prefix = */ true);
284 }
std::string formatMooseDocumentedError(const std::string &repo_name, const unsigned int issue_num, const std::string &msg)
Formats a documented error.
Definition MooseError.C:140

Referenced by ManifoldSubdomainGenerator::ManifoldSubdomainGenerator().

◆ mooseError()

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

Emits an error prefixed with object name and type and optionally a file path to the top-level block parameter if available.

Definition at line 271 of file MooseBase.h.

272 {
273 callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ true);
274 }

Referenced by CopyMeshPartitioner::_do_partition(), GridPartitioner::_do_partition(), HierarchicalGridPartitioner::_do_partition(), PetscExternalPartitioner::_do_partition(), AdaptivityAction::act(), AddBoundsVectorsAction::act(), AddFVICAction::act(), AddICAction::act(), AddMeshGeneratorAction::act(), AddPeriodicBCAction::act(), AddTimeStepperAction::act(), AddVectorPostprocessorAction::act(), ChainControlSetupAction::act(), CheckFVBCAction::act(), CheckIntegrityAction::act(), CombineComponentsMeshes::act(), CommonOutputAction::act(), CreateDisplacedProblemAction::act(), CreateExecutionerAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), InitProblemAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), SetAdaptivityOptionsAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), SetupMeshCompleteAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), SplitMeshAction::act(), Action::Action(), AddActionComponentAction::AddActionComponentAction(), PhysicsComponentInterface::addBoundaryConditionsFromComponents(), addCapabilityInternal(), DistributedRectilinearMeshGenerator::addElement(), addExecutor(), SubProblem::addFunctor(), PhysicsComponentInterface::addInitialConditionsFromComponents(), ComponentJunction::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), SubProblem::addPiecewiseByBlockLambdaFunctor(), DistributedRectilinearMeshGenerator::addPoint(), DiracKernelBase::addPointWithValidId(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MooseMesh::addQuadratureNode(), AddActionComponentAction::addRelationshipManagers(), WebServerControl::addServerAction(), AddVariableAction::addVariable(), SubProblem::addVectorTag(), MooseVariableScalar::adUDot(), Output::advancedExecuteOn(), MooseVariableBase::allDofIndices(), appNameToLibName(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), attachRelationshipManagers(), attachRelationshipManagers(), FEProblemBase::automaticScaling(), Function::average(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), MooseMesh::buildCoarseningMap(), MultiApp::buildComm(), DistributedRectilinearMeshGenerator::buildCube(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromJSON(), PiecewiseTabularInterface::buildFromXY(), MooseMesh::buildLowerDMesh(), GeneratedMesh::buildMesh(), MeshGeneratorMesh::buildMesh(), SpiralAnnularMesh::buildMesh(), TiledMesh::buildMesh(), MooseMesh::buildRefinementMap(), MaterialBase::buildRequiredMaterials(), MooseMesh::buildTypedMesh(), MooseMesh::cacheFaceInfoVariableOwnership(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), EigenExecutionerBase::chebyshev(), SubProblem::checkBlockMatProps(), PhysicsBase::checkBlockRestrictionIdentical(), ComponentBoundaryConditionInterface::checkBoundaryConditionsAllRequested(), SubProblem::checkBoundaryMatProps(), PhysicsBase::checkComponentType(), IterationCountConvergence::checkConvergence(), MooseMesh::checkCoordinateSystems(), DiffusionLHDGAssemblyHelper::checkCoupling(), DefaultConvergenceBase::checkDuplicateSetSharedExecutionerParams(), MooseMesh::checkDuplicateSubdomainNames(), MaterialBase::checkExecutionStage(), FVFluxBC::checkFaceIntegrity(), FVInterfaceKernel::checkFaceIntegrity(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), EigenExecutionerBase::checkIntegrity(), Eigenvalue::checkIntegrity(), ExplicitTimeIntegrator::checkLinearConvergence(), checkMetaDataIntegrity(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), PostprocessorInterface::checkParam(), Moose::PeriodicBCHelper::checkPeriodicParams(), Sampler::checkReinitStatus(), MultiAppTransfer::checkSiblingsTransferSupported(), MaterialBase::checkStatefulSanity(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), Moose::PetscSupport::checkUserProvidedPetscOption(), MultiAppTransfer::checkVariable(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), MooseMesh::clone(), LibmeshPartitioner::clone(), CombinerGenerator::CombinerGenerator(), MooseVariableFieldBase::componentName(), VariableCondensationPreconditioner::computeDInverseDiag(), CompositionDT::computeDT(), MooseVariableFieldBase::computeFaceValues(), TimeStepper::computeFailedDT(), IterationAdaptiveDT::computeFailedDT(), MooseMesh::computeFiniteVolumeCoords(), Moose::Kokkos::ResidualObject::computeOffDiagJacobian(), MaterialBase::computeProperties(), ResidualObject::computeResidualAndJacobian(), TimeStepper::computeStep(), AStableDirk4::computeTimeDerivatives(), BDF2::computeTimeDerivatives(), CrankNicolson::computeTimeDerivatives(), ExplicitEuler::computeTimeDerivatives(), ExplicitRK2::computeTimeDerivatives(), ExplicitTVDRK2::computeTimeDerivatives(), ImplicitEuler::computeTimeDerivatives(), ImplicitMidpoint::computeTimeDerivatives(), LStableDirk2::computeTimeDerivatives(), LStableDirk3::computeTimeDerivatives(), LStableDirk4::computeTimeDerivatives(), NewmarkBeta::computeTimeDerivatives(), ConcentricCircleMesh::ConcentricCircleMesh(), ConditionalEnableControl::ConditionalEnableControl(), TimeStepper::constrainStep(), LibtorchNeuralNetControl::controlNeuralNet(), TransientBase::convergedToSteadyState(), ParsedConvergence::convertRealToBool(), copyInputs(), CopyMeshPartitioner::CopyMeshPartitioner(), MultiApp::createApp(), createExecutors(), AddVariableAction::createInitialConditionAction(), createRMFromTemplateAndInit(), Function::curl(), ReporterTransferInterface::declareClone(), Moose::Kokkos::MaterialBase::declareKokkosPropertyInternal(), MeshGenerator::declareMeshProperty(), ReporterTransferInterface::declareVectorClone(), FunctorRelationshipManager::delete_remote_elements(), MooseMesh::deleteRemoteElements(), determineLibtorchDeviceType(), MeshDiagnosticsGenerator::diagnosticsLog(), Function::div(), FunctorBinnedValuesDivision::divisionIndex(), FunctorRelationshipManager::dofmap_reinit(), dynamicAllRegistration(), dynamicAppRegistration(), DistributedRectilinearMeshGenerator::elemId(), errorCheck(), MooseMesh::errorIfDistributedMesh(), MultiAppTransfer::errorIfObjectExecutesOnTransferInSourceApp(), FixedPointSolve::examineFixedPointConvergence(), Eigenvalue::execute(), TransientBase::execute(), WebServerControl::execute(), executeExecutioner(), FVInterfaceKernel::faceArg1(), FVInterfaceKernel::faceArg2(), MultiApp::fillPositions(), finalizeRestore(), Transfer::find_sys(), DiracKernelInfo::findPoint(), FixedPointSolve::findTransformedSystem(), FixedPointSolve::FixedPointSolve(), FunctionDT::FunctionDT(), FunctionScalarAux::FunctionScalarAux(), FunctionScalarIC::FunctionScalarIC(), LinearFVBoundaryCondition::functorFaceArg(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), AdvancedExtruderGenerator::generate(), BoundingBoxNodeSetGenerator::generate(), CoarsenBlockGenerator::generate(), CombinerGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), DistributedRectilinearMeshGenerator::generate(), ElementOrderConversionGenerator::generate(), ExtraNodesetGenerator::generate(), FileMeshGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), MeshCollectionGenerator::generate(), MeshDiagnosticsGenerator::generate(), MeshExtruderGenerator::generate(), MeshRepairGenerator::generate(), MoveNodeGenerator::generate(), PlaneIDMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), ProjectSideSetOntoLevelSetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SmoothMeshGenerator::generate(), SpiralAnnularMeshGenerator::generate(), StackGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainPerElementGenerator::generate(), TiledMeshGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateCSG(), MeshGenerator::generateData(), GeneratedMesh::GeneratedMesh(), GeneratedMeshGenerator::GeneratedMeshGenerator(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), MooseMesh::getAxisymmetricRadialCoord(), MooseMesh::getBlockConnectedBlocks(), MooseMesh::getBoundaryID(), MultiApp::getBoundingBox(), ChainControl::getChainControlDataByName(), WebServerControl::getClientInfo(), MooseMesh::getCoarseningMap(), MultiApp::getCommandLineArgs(), MooseVariableBase::getContinuity(), Control::getControllableParameterByName(), MooseMesh::getCoordSystem(), PhysicsBase::getCoupledPhysics(), PhysicsBase::getCoupledPhysics(), DataFileInterface::getDataFilePath(), TransfiniteMeshGenerator::getDiscreteEdge(), MooseVariableBase::getDofIndices(), VariableCondensationPreconditioner::getDofToCondense(), TransfiniteMeshGenerator::getEdge(), EigenExecutionerBase::getEigenSystemConvergence(), MooseMesh::getElementIDIndex(), Material::getElementIDNeighbor(), Material::getElementIDNeighborByName(), MooseMesh::getElemIDMapping(), MooseMesh::getElemIDsOnBlocks(), WebServerControl::Response::getError(), MultiApp::getExecutioner(), getExecutor(), MultiAppTransfer::getFromMultiApp(), MultiAppTransfer::getFromMultiAppInfo(), SubProblem::getFunctor(), MooseMesh::getGeneralAxisymmetricCoordAxis(), MaterialPropertyInterface::getGenericMaterialPropertyByName(), DistributedRectilinearMeshGenerator::getGhostNeighbors(), DistributedRectilinearMeshGenerator::getIndices(), MaterialPropertyInterface::getKokkosBlockMaterialProperty(), FunctionInterface::getKokkosFunctionByName(), MaterialPropertyInterface::getKokkosMaterialPropertyByName(), Material::getMaterialByName(), SubProblem::getMatrixTagID(), AnnularMesh::getMaxInDimension(), GeneratedMesh::getMaxInDimension(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), AnnularMesh::getMinInDimension(), GeneratedMesh::getMinInDimension(), MultiAppTransfer::getMultiApp(), DistributedRectilinearMeshGenerator::getNeighbors(), MooseMesh::getNodeBlockIds(), MooseMesh::getNodeList(), MooseMesh::getPairedBoundaryMapping(), MaterialOutputAction::getParams(), PlaneIDMeshGenerator::getPlaneID(), PostprocessorInterface::getPostprocessorValueByNameInternal(), ComponentMaterialPropertyInterface::getPropertyValue(), MooseMesh::getRefinementMap(), MooseBase::getRenamedParam(), ReporterInterface::getReporterContextBaseByName(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), getRestartableDataMap(), getRestartableDataMapName(), getRestartableMetaData(), getRMClone(), MooseObject::getSharedPtr(), MooseObject::getSharedPtr(), PhysicsBase::getSolverSystem(), MooseMesh::getSubdomainBoundaryIds(), TransientBase::getTimeIntegratorNames(), MultiAppTransfer::getToMultiApp(), MultiAppTransfer::getToMultiAppInfo(), MooseMesh::getUniqueCoordSystem(), UserObjectInterface::getUserObjectBaseByName(), UserObjectInterface::getUserObjectName(), AddPeriodicBCAction::getVariables(), VectorPostprocessorInterface::getVectorPostprocessorName(), SubProblem::getVectorTag(), SubProblem::getVectorTagID(), MultiApp::globalAppToLocal(), Function::gradient(), MooseVariableBase::hasDoFsOnNodes(), PostprocessorInterface::hasPostprocessor(), PostprocessorInterface::hasPostprocessorByName(), ReporterInterface::hasReporterValue(), ReporterInterface::hasReporterValueByName(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessor(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), VectorPostprocessorInterface::hasVectorPostprocessorByName(), TransientBase::incrementStepOrReject(), NEML2Action::inferMOOSEIOType(), AddVariableAction::init(), MooseMesh::init(), Sampler::init(), EigenExecutionerBase::init(), TransientBase::init(), MFEMMesh::init(), CrankNicolson::init(), ExplicitTimeIntegrator::init(), FixedPointIterationAdaptiveDT::init(), IterationAdaptiveDT::init(), MultiApp::init(), NestedDivision::initialize(), ParsedConvergence::initializeConstantSymbol(), PhysicsBase::initializePhysics(), SubProblem::initialSetup(), AuxKernelBase::initialSetup(), SolutionScalarAux::initialSetup(), FullSolveMultiApp::initialSetup(), ExplicitTimeIntegrator::initialSetup(), Function::integral(), InternalSideIndicatorBase::InternalSideIndicatorBase(), EigenExecutionerBase::inversePowerIteration(), Sampler::isAdaptiveSamplingCompleted(), MooseMesh::isBoundaryFullyExternalToSubdomains(), MooseVariableBase::isNodal(), IterationAdaptiveDT::IterationAdaptiveDT(), IterationCountConvergence::IterationCountConvergence(), LibmeshPartitioner::LibmeshPartitioner(), libNameToAppName(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LineSearch::lineSearch(), loadLibraryAndDependencies(), ReporterPointMarker::markerSetup(), SubProblem::markFamilyPRefinement(), Material::Material(), Distribution::median(), FunctorRelationshipManager::mesh_reinit(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshExtruderGenerator::MeshExtruderGenerator(), MeshRepairGenerator::MeshRepairGenerator(), SetupMeshAction::modifyParamsForUseSplit(), MeshMetaDataInterface::mooseErrorInternal(), MooseMesh::MooseMesh(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableBase::MooseVariableBase(), MoveNodeGenerator::MoveNodeGenerator(), MultiApp::MultiApp(), MultiAppTransfer::MultiAppTransfer(), NewmarkBeta::NewmarkBeta(), DistributedRectilinearMeshGenerator::nodeId(), DistributedRectilinearMeshGenerator::numNeighbors(), Output::onInterval(), FunctorRelationshipManager::operator()(), RelationshipManager::operator==(), ActionComponent::outerSurfaceArea(), ActionComponent::outerSurfaceBoundaries(), MortarNodalGeometryOutput::output(), Output::Output(), outputMachineReadableData(), DistributedRectilinearMeshGenerator::paritionSquarely(), ParsedConvergence::ParsedConvergence(), ParsedCurveGenerator::ParsedCurveGenerator(), ExplicitTimeIntegrator::performExplicitSolve(), PetscExternalPartitioner::PetscExternalPartitioner(), PhysicsBasedPreconditioner::PhysicsBasedPreconditioner(), PIDTransientControl::PIDTransientControl(), PiecewiseTabularInterface::PiecewiseTabularInterface(), CutMeshByLevelSetGeneratorBase::pointPairLevelSetInterception(), ProjectSideSetOntoLevelSetGenerator::pointPairLevelSetInterception(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessorByName(), AStableDirk4::postResidual(), ExplicitRK2::postResidual(), ExplicitTVDRK2::postResidual(), ImplicitMidpoint::postResidual(), LStableDirk2::postResidual(), LStableDirk3::postResidual(), LStableDirk4::postResidual(), VariableCondensationPreconditioner::preallocateCondensedJacobian(), Predictor::Predictor(), TransientBase::preExecute(), MooseMesh::prepare(), MooseMesh::prepared(), FixedPointSolve::printFixedPointConvergenceReason(), MultiApp::readCommandLineArguments(), CoarsenBlockGenerator::recursiveCoarsen(), recursivelyCreateExecutors(), FunctorRelationshipManager::redistribute(), registerRestartableData(), registerRestartableNameWithFilter(), Sampler::reinit(), removeRelationshipManager(), PhysicsBase::reportPotentiallyMissedParameters(), restore(), RinglebMesh::RinglebMesh(), RinglebMeshGenerator::RinglebMeshGenerator(), run(), runInputs(), ScalarComponentIC::ScalarComponentIC(), DistributedRectilinearMeshGenerator::scaleNodalPositions(), FunctorRelationshipManager::set_mesh(), MooseVariableBase::setActiveTags(), DistributedRectilinearMeshGenerator::setBoundaryNames(), MooseMesh::setCoordSystem(), MooseMesh::setGeneralAxisymmetricCoordAxes(), MeshGenerator::setMeshProperty(), setMFEMDevice(), Sampler::setNumberOfCols(), Sampler::setNumberOfRandomSeeds(), Sampler::setNumberOfRows(), Moose::MFEM::LinearSolverBase::SetPreconditioner(), Split::setup(), TransientMultiApp::setupApp(), Moose::PeriodicBCHelper::setupAutoPeriodicBoundaries(), Moose::PeriodicBCHelper::setupManualPeriodicBoundaries(), SetupMeshAction::setupMesh(), setupOptions(), TimeSequenceStepperBase::setupSequence(), TransientBase::setupTimeIntegrator(), PhysicsBase::shouldCreateIC(), PhysicsBase::shouldCreateTimeDerivative(), PhysicsBase::shouldCreateVariable(), SingleMatrixPreconditioner::SingleMatrixPreconditioner(), MooseVariableBase::sizeMatrixTagData(), SmoothMeshGenerator::SmoothMeshGenerator(), SolutionTimeAdaptiveDT::SolutionTimeAdaptiveDT(), Moose::MFEM::LinearSolverBase::Solve(), TimeIntegrator::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), FullSolveMultiApp::solveStep(), UserObject::spatialPoints(), UserObject::spatialValue(), SpiralAnnularMesh::SpiralAnnularMesh(), SpiralAnnularMeshGenerator::SpiralAnnularMeshGenerator(), MeshRepairGenerator::splitNonConvexPolygons(), WebServerControl::startServer(), StitchedMesh::StitchedMesh(), MaterialBase::subdomainSetup(), CutMeshByLevelSetGeneratorBase::tet4ElemCutter(), Action::timedAct(), Function::timeDerivative(), Function::timeIntegral(), ParsedCurveGenerator::tSectionSpaceDefiner(), MooseVariableScalar::uDot(), MooseVariableScalar::uDotDot(), MooseVariableScalar::uDotDotOld(), MooseVariableScalar::uDotOld(), MooseBase::uniqueName(), AuxScalarKernel::uOld(), ScalarKernelBase::uOld(), Function::value(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), AddVariableAction::variableType(), SubProblem::vectorTagName(), SubProblem::vectorTagType(), Function::vectorValue(), SubProblem::verifyVectorTags(), ActionComponent::volume(), WebServerControl::WebServerControl(), MFEMMesh::writeRecoveryFiles(), and writeRestartableMetaData().

◆ mooseErrorNonPrefixed()

template<typename... Args>
void MooseBase::mooseErrorNonPrefixed ( Args &&...  args) const
inlineinherited

Emits an error without the prefixing included in mooseError().

Definition at line 290 of file MooseBase.h.

291 {
292 callMooseError(argumentsToString(std::forward<Args>(args)...), /* with_prefix = */ false);
293 }

◆ mooseInfo()

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

◆ mooseWarning()

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

Emits a warning prefixed with object name and type.

Definition at line 299 of file MooseBase.h.

300 {
301 moose::internal::mooseWarningStream(_console, messagePrefix(true), std::forward<Args>(args)...);
302 }
void mooseWarningStream(S &oss, Args &&... args)
Definition MooseError.h:197

Referenced by DiracKernelInfo::findPoint(), DataFileInterface::getDataFilePath(), loadLibraryAndDependencies(), and MooseBase::paramWarning().

◆ mooseWarningNonPrefixed()

template<typename... Args>
void MooseBase::mooseWarningNonPrefixed ( Args &&...  args) const
inlineinherited

Emits a warning without the prefixing included in mooseWarning().

Definition at line 308 of file MooseBase.h.

309 {
310 moose::internal::mooseWarningStream(_console, std::forward<Args>(args)...);
311 }

◆ multiAppLevel()

unsigned int MooseApp::multiAppLevel ( ) const
inline

The MultiApp Level.

Returns
The current number of levels from the master app

Definition at line 855 of file MooseApp.h.

855{ return _multiapp_level; }

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

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

861{ return _multiapp_number; }

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

◆ name()

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

Get the name of the class.

Returns
The name of the class

Definition at line 103 of file MooseBase.h.

104 {
105 mooseAssert(_name.size(), "Empty name");
106 return _name;
107 }
const std::string & _name
The name of this class.
Definition MooseBase.h:381

Referenced by AdaptivityAction::act(), AddActionComponentAction::act(), AddElementalFieldAction::act(), AddPeriodicBCAction::act(), AddTimeStepperAction::act(), CommonOutputAction::act(), CopyNodalVarsAction::act(), CSGOnlyAction::act(), DeprecatedBlockAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), SetupResidualDebugAction::act(), SetupTimeIntegratorAction::act(), FEProblemBase::addAnyRedistributers(), Executioner::addAttributeReporter(), FEProblemBase::addAuxKernel(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), MFEMProblem::addBoundaryCondition(), PhysicsComponentInterface::addComponent(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), addExecutor(), addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), FEProblemBase::addFunction(), MFEMProblem::addFunction(), SubProblem::addFunctor(), FEProblemBase::addFunctorMaterial(), MFEMProblem::addFunctorMaterial(), FunctorMaterial::addFunctorProperty(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVBC(), FEProblemBase::addFVGradientMethod(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVInterpolationMethod(), FEProblemBase::addFVKernel(), ADDGKernel::ADDGKernel(), FEProblemBase::addHDGKernel(), MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), FEProblemBase::addIndicator(), MFEMProblem::addIndicator(), FEProblemBase::addInitialCondition(), MFEMProblem::addInitialCondition(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), ElementAndTraceScalarHDGAssemblyHelper::additionalROVariables(), BoundaryIntegralValueConstraint::additionalROVariables(), DiffusionLHDGKernel::additionalROVariables(), ADKernelScalarBase::additionalROVariables(), FEProblemBase::addKernel(), MFEMProblem::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblemBase::addMarker(), MFEMProblem::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), FEProblemBase::addMeshDivision(), addMeshGenerator(), ComponentJunction::addMeshGenerators(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMProblemComposer(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), InitialConditionWarehouse::addObject(), ComponentPhysicsInterface::addPhysics(), SubProblem::addPiecewiseByBlockLambdaFunctor(), FEProblemBase::addPostprocessor(), MFEMProblem::addPostprocessor(), UserObjectBase::addPostprocessorDependencyHelper(), AuxKernelBase::addPostprocessorDependencyHelper(), InitialConditionBase::addPostprocessorDependencyHelper(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MFEMProblem::addQuadratureFunction(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), AddActionComponentAction::addRelationshipManagers(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), WebServerControl::addServerActionsInternal(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), MFEMProblem::addTransfer(), PhysicsBase::addUserObject(), FEProblemBase::addUserObject(), UserObjectBase::addUserObjectDependencyHelper(), AuxKernelBase::addUserObjectDependencyHelper(), InitialConditionBase::addUserObjectDependencyHelper(), DisplacedProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), MFEMProblem::addVectorPostprocessor(), UserObjectBase::addVectorPostprocessorDependencyHelper(), AuxKernelBase::addVectorPostprocessorDependencyHelper(), MooseLinearVariableFV< OutputType >::adError(), Output::advancedExecuteOn(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), NEML2ModelExecutor::advanceState(), MooseVariableBase::allDofIndices(), appBinaryName(), appendMeshGenerator(), MultiApp::appPostprocessorValue(), MultiApp::appProblem(), MultiApp::appProblemBase(), MultiApp::appUserObjectBase(), ArrayDGKernel::ArrayDGKernel(), ArrayParsedAux::ArrayParsedAux(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), Function::average(), MultiApp::backup(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), PiecewiseTabularInterface::buildFromFile(), PiecewiseTabularInterface::buildFromXY(), MFEMGeometricMultigridSolver::BuildMultigrid(), MooseMesh::buildNodeListFromSideList(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MooseBase::callMooseError(), ChangeOverFixedPointPostprocessor::ChangeOverFixedPointPostprocessor(), ChangeOverTimePostprocessor::ChangeOverTimePostprocessor(), PhysicsBase::checkBlockRestrictionIdentical(), PhysicsBase::checkComponentType(), DefaultNonlinearConvergence::checkConvergence(), ParsedConvergence::checkConvergence(), FEProblemBase::checkDependMaterialsHelper(), FVFluxBC::checkFaceIntegrity(), FVInterfaceKernel::checkFaceIntegrity(), TaggingInterface::checkForNans(), SamplerBase::checkForStandardFieldVariableType(), MeshGenerator::checkGetMesh(), ReporterTransferInterface::checkHasReporterValue(), FEProblemBase::checkICRestartError(), NonlinearSystemBase::checkKernelCoverage(), Moose::Kokkos::Material::checkMaterialProperty(), Material::checkMaterialProperty(), checkMetaDataIntegrity(), Damper::checkMinDamping(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), MultiAppTransfer::checkParentAppUserObjectExecuteOn(), Checkpoint::checkpointInfo(), LinearFVGradientManager::checkRestartedGradientHistory(), FEProblemBase::checkUserObjectNameCollision(), BlockRestrictable::checkVariable(), DomainUserObject::checkVariable(), Coupleable::checkWritableVar(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), MooseVariableFieldBase::componentName(), CompositeFunction::CompositeFunction(), MaterialBase::computeProperties(), FEProblemBase::computeUserObjectByName(), VectorPostprocessorVisualizationAux::computeValue(), MooseBase::connectControllableParams(), ConstantPostprocessor::ConstantPostprocessor(), Coupleable::coupledName(), CommonOutputAction::create(), MultiApp::createApp(), createExecutors(), MeshGeneratorSystem::createMeshGeneratorOrder(), createRecoverablePerfGraph(), CutMeshByPlaneGenerator::CutMeshByPlaneGenerator(), DebugResidualAux::DebugResidualAux(), MaterialBase::declareADProperty(), MFEMComplexVariable::declareCoefficients(), MFEMVariable::declareCoefficients(), MeshInfo::declareHelper(), Moose::Kokkos::MaterialBase::declareKokkosOnDemandProperty(), Moose::Kokkos::MaterialBase::declareKokkosProperty(), MeshGenerator::declareMeshesForSubByName(), MeshGenerator::declareNullMeshName(), MaterialBase::declareProperty(), MFEMCoordinateTransformations::declareRZCoefficients(), DOFMapOutput::demangle(), DerivativeSumMaterialTempl< is_ad >::DerivativeSumMaterialTempl(), MooseMesh::detectPairedSidesets(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DomainUserObject::DomainUserObject(), DumpObjectsProblem::dumpObjectHelper(), ElementDamper::ElementDamper(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementMaterialSampler::ElementMaterialSampler(), ElementValueSampler::ElementValueSampler(), EigenKernel::enabled(), MooseMesh::errorIfDistributedMesh(), SolutionUserObjectBase::evalMeshFunction(), SolutionUserObjectBase::evalMeshFunctionGradient(), SolutionUserObjectBase::evalMultiValuedMeshFunction(), SolutionUserObjectBase::evalMultiValuedMeshFunctionGradient(), GreaterThanLessThanPostprocessor::execute(), PointValue::execute(), RestartableDataReporter::execute(), MultiAppGeneralFieldTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppUserObjectTransfer::execute(), SideValueSampler::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), Exodus::Exodus(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FVInterfaceKernel::faceArg1(), FVInterfaceKernel::faceArg2(), FEProblemBase::FEProblemBase(), NEML2ModelExecutor::fillInputs(), MultiApp::fillPositions(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), PointSamplerBase::finalize(), ChainControl::fullControlDataName(), FunctionArrayAux::FunctionArrayAux(), FunctionDT::FunctionDT(), FVFunctionIC::functionName(), FunctionIC::functionName(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FVInitialConditionTempl< T >::FVInitialConditionTempl(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), GapValueAux::GapValueAux(), BoundaryDeletionGenerator::generate(), BreakMeshByBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), ManifoldSubdomainGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), StitchBoundaryMeshGenerator::generate(), StitchMeshGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), UniqueExtraIDMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), InterfaceMaterial::getADMaterialProperty(), Material::getADMaterialProperty(), MultiAppTransfer::getAppInfo(), MooseMesh::getBoundaryString(), MultiApp::getBoundingBox(), MooseBase::getCheckedPointerParam(), getCheckpointDirectories(), MFEMProblem::getComplexGridFunction(), Control::getControllableParameterByName(), Control::getControllableValue(), Control::getControllableValueByName(), FEProblemBase::getConvergence(), MeshGenerator::getCSGBase(), MeshGenerator::getCSGBasesByName(), UserObjectBase::getDependObjects(), FEProblemBase::getDistribution(), DistributionInterface::getDistribution(), DistributionInterface::getDistributionByName(), ElementUOProvider::getElementalValueLong(), ElementUOProvider::getElementalValueReal(), MultiApp::getExecutioner(), FEProblemBase::getExecutor(), getExecutor(), OutputWarehouse::getFileNumbers(), FEProblemBase::getFunction(), SubProblem::getFunctor(), FEProblemBase::getFVAdvectedInterpolationMethod(), FEProblemBase::getFVFaceInterpolationMethod(), FEProblemBase::getFVGradientMethod(), FEProblemBase::getFVInterpolationMethod(), AuxKernelTempl< ComputeValueType >::getGenericMaterialProperty(), NodalPatchRecovery::getGenericMaterialProperty(), InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialPropertyByName(), Material::getGenericOptionalMaterialProperty(), MaterialBase::getGenericZeroMaterialProperty(), MFEMProblem::getGridFunction(), FEProblemBase::getKokkosFunction(), FEProblemBase::getKokkosUserObject(), SolutionUserObjectBase::getLocalVarIndex(), Marker::getMarkerValue(), Material::getMaterial(), FEProblemBase::getMaterial(), Material::getMaterialByName(), AuxKernelTempl< ComputeValueType >::getMaterialProperty(), NodalPatchRecovery::getMaterialProperty(), InterfaceMaterial::getMaterialProperty(), Material::getMaterialProperty(), SubProblem::getMaterialPropertyBlockNames(), SubProblem::getMaterialPropertyBoundaryNames(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOld(), NodalPatchRecovery::getMaterialPropertyOld(), InterfaceMaterial::getMaterialPropertyOld(), Material::getMaterialPropertyOld(), AuxKernelTempl< ComputeValueType >::getMaterialPropertyOlder(), NodalPatchRecovery::getMaterialPropertyOlder(), InterfaceMaterial::getMaterialPropertyOlder(), Material::getMaterialPropertyOlder(), MFEMObject::getMatrixCoefficient(), MFEMObject::getMatrixCoefficientByName(), MeshGenerator::getMesh(), FEProblemBase::getMeshDivision(), MeshGenerator::getMeshesByName(), getMeshGenerator(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MFEMProblem::getMFEMObject(), ActionWarehouse::getMooseAppName(), NEML2FEInterpolation::getMOOSEVariable(), MultiAppTransfer::getMultiApp(), InterfaceMaterial::getNeighborADMaterialProperty(), InterfaceMaterial::getNeighborMaterialProperty(), InterfaceMaterial::getNeighborMaterialPropertyOld(), InterfaceMaterial::getNeighborMaterialPropertyOlder(), Material::getOptionalADMaterialProperty(), Material::getOptionalMaterialProperty(), Material::getOptionalMaterialPropertyOld(), Material::getOptionalMaterialPropertyOlder(), MooseBase::getParam(), FEProblemBase::getPositionsObject(), FEProblemBase::getPostprocessorValueByName(), ComponentMaterialPropertyInterface::getPropertyValue(), ReporterData::getReporterInfo(), MFEMExecutedObject::getRequestedItems(), getRestartableDataMap(), getRestartableDataMapName(), getRestartableMetaData(), FEProblemBase::getSampler(), MFEMObject::getScalarCoefficient(), MFEMObject::getScalarCoefficientByName(), TimedSubdomainModifier::getSubdomainIDAndCheck(), MFEMExecutedObject::getSuppliedItems(), TransientBase::getTimeStepperName(), ProjectedStatefulMaterialStorageAction::getTypeEnum(), FEProblemBase::getUserObject(), FEProblemBase::getUserObjectBase(), MFEMObject::getVectorCoefficient(), MFEMObject::getVectorCoefficientByName(), LinearFVGradientManager::gradientStateVectorName(), Terminator::handleMessage(), Control::hasControllableParameterByName(), FEProblemBase::hasConvergence(), FEProblemBase::hasDistribution(), FEProblemBase::hasFunction(), SubProblem::hasFunctor(), SubProblem::hasFunctorWithType(), FEProblemBase::hasFVGradientMethod(), FEProblemBase::hasFVInterpolationMethod(), MeshInfo::hasItem(), hasMeshGenerator(), MFEMProblem::hasMFEMObject(), AdvancedOutput::hasOutputHelper(), FEProblemBase::hasPostprocessor(), FEProblemBase::hasPostprocessorValueByName(), hasRelationshipManager(), hasRestartableDataMap(), hasRestartableMetaData(), FEProblemBase::hasUserObject(), NEML2Action::inferMOOSEIOType(), AddVariableAction::init(), AdvancedOutput::init(), IterationAdaptiveDT::init(), AdvancedOutput::initAvailableLists(), MeshInfo::initCombinedInfos(), AdvancedOutput::initExecutionTypes(), AttribName::initFrom(), NestedDivision::initialize(), TransformedPositions::initialize(), BoundaryRestrictable::initializeBoundaryRestrictable(), AuxKernelBase::initialSetup(), SolutionScalarAux::initialSetup(), Console::initialSetup(), JSONOutput::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), NodalVariableValue::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppGeneralFieldFunctorTransfer::initialSetup(), MultiAppProjectionTransfer::initialSetup(), BoundaryMeshBuilder::initialSetup(), SolutionUserObjectBase::initialSetup(), AdvancedOutput::initOutputList(), AdvancedOutput::initPostprocessorOrVectorPostprocessorLists(), MaterialBase::initStatefulProperties(), Function::integral(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MeshGenerator::isChildMeshGenerator(), DerivativeMaterialInterface< T >::isNotObjectVariable(), MeshGenerator::isNullMeshName(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MeshGenerator::isParentMeshGenerator(), LinearCombinationFunction::LinearCombinationFunction(), FEProblemBase::logAdd(), MooseLinearVariableFV< OutputType >::lowerDError(), Marker::Marker(), MaterialBase::markMatPropRequested(), Material::Material(), Distribution::median(), MemoryUsageReporter::MemoryUsageReporter(), NEML2ModelExecutor::meshChanged(), MeshGenerator::meshPropertyPrefix(), MooseBase::messagePrefix(), MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver(), MFEMScalarQuadratureFunction::MFEMScalarQuadratureFunction(), MFEMTransient::MFEMTransient(), MFEMVectorQuadratureFunction::MFEMVectorQuadratureFunction(), OutputWarehouse::mooseConsole(), SolutionInvalidInterface::mooseDeprecated(), MooseVariableBase::MooseVariableBase(), MooseVariableInterface< T >::MooseVariableInterface(), SolutionInvalidInterface::mooseWarning(), SolutionInvalidInterface::mooseWarningNonPrefixed(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), NEML2PreKernel::NEML2PreKernel(), NodalDamper::NodalDamper(), MooseLinearVariableFV< OutputType >::nodalError(), NodalPatchRecoveryAuxBase::NodalPatchRecoveryAuxBase(), NodalValueSampler::NodalValueSampler(), MeshGenerator::Comparator::operator()(), DOFMapOutput::output(), ProgressOutput::output(), Output::Output(), AdvancedOutput::outputElementalVariables(), ConsoleUtils::outputExecutionInformation(), MaterialOutputAction::outputHelper(), AdvancedOutput::outputInput(), AdvancedOutput::outputNodalVariables(), AdvancedOutput::outputPostprocessors(), Exodus::outputPostprocessors(), Nemesis::outputPostprocessors(), TableOutput::outputReporter(), AdvancedOutput::outputReporters(), AdvancedOutput::outputScalarVariables(), AdvancedOutput::outputSystemInformation(), AdvancedOutput::outputVectorPostprocessors(), SolutionInvalidInterface::paramWarning(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedODEKernel::ParsedODEKernel(), ComponentPhysicsInterface::physicsExists(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseByBlockFunctorMaterialTempl< T >::PiecewiseByBlockFunctorMaterialTempl(), PiecewiseFunction::PiecewiseFunction(), PointInUnionCheckUO::PointInUnionCheckUO(), possiblyLoadRestartableMetaData(), MFEMExecutedObject::postprocessorDependencyKey(), PhysicsBase::prefix(), MooseMesh::prepare(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), PerfGraphLivePrint::printStats(), FEProblemBase::projectInitialConditionOnCustomRange(), MooseBase::queryParam(), MultiApp::readCommandLineArguments(), Receiver::Receiver(), Executor::Result::record(), FEProblemBase::registerRandomInterface(), registerRestartableDataMapName(), registerRestartableNameWithFilter(), MaterialBase::resetQpProperties(), MultiApp::restore(), ScalarComponentIC::ScalarComponentIC(), MultiApp::setAppOutputFileBase(), FEProblemBase::setAuxKernelParamsAndLog(), MooseMesh::setBoundaryName(), Control::setControllableValue(), Control::setControllableValueByName(), OutputWarehouse::setFileNumbers(), FEProblemBase::setPostprocessorValueByName(), FEProblemBase::setResidualObjectParamsAndLog(), MooseMesh::setSubdomainName(), MooseMesh::setSubdomainName(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), Split::setup(), TransientMultiApp::setupApp(), MoveNodesByParsedExpressionModifier::setupNodalOutputVariables(), NEML2Action::setupOutputMappings(), SideSetExtruderGenerator::SideSetExtruderGenerator(), TransientMultiApp::solveStep(), UserObject::spatialValue(), LinearFVGradientReader::stateComponents(), StitchedMesh::StitchedMesh(), SubProblem::storeBoundaryDelayedCheckMatProp(), SubProblem::storeBoundaryMatPropName(), MaterialBase::storeBoundaryZeroMatProp(), SubProblem::storeBoundaryZeroMatProp(), SubProblem::storeSubdomainDelayedCheckMatProp(), SubProblem::storeSubdomainMatPropName(), MaterialBase::storeSubdomainZeroMatProp(), SubProblem::storeSubdomainZeroMatProp(), ConstraintWarehouse::subdomainsCovered(), MaterialBase::subdomainSetup(), SumPostprocessor::SumPostprocessor(), MFEMPostprocessor::suppliedPostprocessorName(), MFEMVectorPostprocessor::suppliedVectorPostprocessorName(), BoundaryMeshBuilder::surfaceElementSet(), NEML2FEInterpolation::syncWithMainThread(), TaggingInterface::TaggingInterface(), MooseLinearVariableFV< OutputType >::timeIntegratorError(), VectorPostprocessorVisualizationAux::timestepSetup(), ElementSubdomainModifierBase::timestepSetup(), to_json(), MultiAppDofCopyTransfer::transfer(), MultiAppShapeEvaluationTransfer::transferVariable(), MultiAppMFEMCopyTransfer::transferVariables(), MultiAppMFEMShapeEvaluationTransfer::transferVariables(), TransientMultiApp::TransientMultiApp(), MooseBase::typeAndName(), MooseBase::uniqueParameterName(), FVQpFluxBC::uOnGhost(), FVQpFluxBC::uOnUSub(), UserObjectBase::UserObjectBase(), UserObjectInterface::userObjectName(), ParsedAux::validateGenericVectorNames(), MeshInfo::validParams(), MFEMExecutedObject::variableDependencyKey(), PhysicsBase::variableExists(), MultiAppTransfer::variableIntegrityCheck(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), MFEMExecutedObject::vectorPostprocessorDependencyKey(), Convergence::verboseOutput(), AdvancedOutput::wantOutput(), Coupleable::writableCoupledValue(), Coupleable::writableVariable(), Console::write(), and writeRestartableMetaData().

◆ outputMachineReadableData()

void MooseApp::outputMachineReadableData ( const std::string &  param,
const std::string &  start_marker,
const std::string &  end_marker,
const std::string &  data 
) const
protected

Outputs machine readable data (JSON, YAML, etc.) either to the screen (if no filename was provided as an argument to the parameter param) or to a file (if a filename was provided).

Definition at line 3549 of file MooseApp.C.

3553{
3554 // Bool parameter, just to screen
3555 if (_pars.have_parameter<bool>(param))
3556 {
3557 Moose::out << start_marker << data << end_marker << std::endl;
3558 return;
3559 }
3560
3561 // String parameter, to file
3562 const auto & filename = getParam<std::string>(param);
3563 // write to file
3564 std::ofstream out(filename.c_str());
3565 if (out.is_open())
3566 {
3567 std::ofstream out(filename.c_str());
3568 out << data << std::flush;
3569 out.close();
3570 }
3571 else
3572 mooseError("Unable to open file `", filename, "` for writing ", param, " data to it.");
3573}
OStreamProxy out(std::cout)

Referenced by runInputFile(), and setupOptions().

◆ paramError()

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

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

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

Definition at line 457 of file MooseBase.h.

458{
459 _pars.paramError(param, std::forward<Args>(args)...);
460}
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available.

Referenced by HierarchicalGridPartitioner::_do_partition(), AutoCheckpointAction::act(), CommonOutputAction::act(), SetupDebugAction::act(), DiffusionCG::addFEKernels(), DiffusionFV::addFVKernels(), NEML2ModelExecutor::addGatheredParameter(), NEML2ModelExecutor::addGatheredVariable(), ADDGKernel::ADDGKernel(), ComponentJunction::addMeshGenerators(), CylinderComponent::addMeshGenerators(), ReporterPointSource::addPoints(), ADIntegratedBCTempl< T >::ADIntegratedBCTempl(), ADKernelTempl< T >::ADKernelTempl(), ADPenaltyPeriodicSegmentalConstraint::ADPenaltyPeriodicSegmentalConstraint(), ADPeriodicSegmentalConstraint::ADPeriodicSegmentalConstraint(), AdvancedExtruderGenerator::AdvancedExtruderGenerator(), AdvectiveFluxAux::AdvectiveFluxAux(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), ArrayBodyForce::ArrayBodyForce(), ArrayCoupledForce::ArrayCoupledForce(), ArrayDGKernel::ArrayDGKernel(), ArrayDGLowerDKernel::ArrayDGLowerDKernel(), ArrayDirichletBC::ArrayDirichletBC(), ArrayHFEMDirichletBC::ArrayHFEMDirichletBC(), ArrayIntegratedBC::ArrayIntegratedBC(), ArrayKernel::ArrayKernel(), ArrayLowerDIntegratedBC::ArrayLowerDIntegratedBC(), ArrayParsedAux::ArrayParsedAux(), ArrayPenaltyDirichletBC::ArrayPenaltyDirichletBC(), ArrayReactionNodalKernelTempl< is_ad >::ArrayReactionNodalKernelTempl(), ArrayVacuumBC::ArrayVacuumBC(), ArrayVarReductionAux::ArrayVarReductionAux(), ParsedSubdomainIDsGenerator::assignElemSubdomainID(), AuxKernelBase::AuxKernelBase(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BlockDeletionGenerator::BlockDeletionGenerator(), BlockWeightedPartitioner::BlockWeightedPartitioner(), BoundaryIntegralValueConstraint::BoundaryIntegralValueConstraint(), BoundaryLinearFVFluxIntegral::BoundaryLinearFVFluxIntegral(), BoundsBase::BoundsBase(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), BSplineCurveGenerator::BSplineCurveGenerator(), BuildArrayVariableAux::BuildArrayVariableAux(), MFEMFESpaceHierarchy::buildHierarchy(), MFEMMesh::buildMesh(), MFEMGeometricMultigridSolver::BuildMultigrid(), TimeSequenceStepperBase::buildSequence(), CartesianGridDivision::CartesianGridDivision(), CartesianMeshGenerator::CartesianMeshGenerator(), checkComponent(), Moose::Kokkos::ParsedObjectBase::checkDuplicateSymbols(), SamplerBase::checkForStandardFieldVariableType(), MeshGenerator::checkGetMesh(), ComponentInitialConditionInterface::checkInitialConditionsAllRequested(), BatchMeshGeneratorAction::checkInputParameterType(), PhysicsBase::checkIntegrityEarly(), SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), PostprocessorInterface::checkParam(), FEProblemBase::checkProblemIntegrity(), MultiAppReporterTransfer::checkSiblingsTransferSupported(), MFEMMultiAppTransfer::checkValidTransferProblemTypes(), Coupleable::checkVar(), MultiAppTransfer::checkVariable(), CircularBoundaryCorrectionGenerator::CircularBoundaryCorrectionGenerator(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), MultiAppGeneralFieldTransfer::closestToPosition(), CoarsenBlockGenerator::CoarsenBlockGenerator(), CombinedVectorPostprocessor::CombinedVectorPostprocessor(), CombinerGenerator::CombinerGenerator(), ComponentInitialConditionInterface::ComponentInitialConditionInterface(), ComponentJunction::ComponentJunction(), ComponentMaterialPropertyInterface::ComponentMaterialPropertyInterface(), CompositionDT::CompositionDT(), ConcentricCircleMeshGenerator::ConcentricCircleMeshGenerator(), LibtorchNeuralNetControl::conditionalParameterError(), ConservativeAdvectionBCTempl< is_ad >::ConservativeAdvectionBCTempl(), ConservativeAdvectionTempl< is_ad >::ConservativeAdvectionTempl(), ConstantVectorPostprocessor::ConstantVectorPostprocessor(), ContainsPointAux::ContainsPointAux(), CopyValueAux::CopyValueAux(), MultiAppGeneralFieldTransfer::correctSolutionVectorValues(), Coupleable::Coupleable(), CoupledForceTempl< is_ad >::CoupledForceTempl(), CoupledValueFunctionMaterialTempl< is_ad >::CoupledValueFunctionMaterialTempl(), MultiApp::createApp(), MeshGeneratorSystem::createMeshGenerator(), CylindricalGridDivision::CylindricalGridDivision(), DebugResidualAux::DebugResidualAux(), ConstantReporter::declareConstantReporterValue(), ConstantReporter::declareConstantReporterValues(), AccumulateReporter::declareLateValues(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DGKernel::DGKernel(), DGKernelBase::DGKernelBase(), DGLowerDKernel::DGLowerDKernel(), DiffusionFluxAux::DiffusionFluxAux(), DomainUserObject::DomainUserObject(), EigenProblem::EigenProblem(), EigenProblemSolve::EigenProblemSolve(), ElementAdaptivityLevelAux::ElementAdaptivityLevelAux(), ElementGenerator::ElementGenerator(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ElementLengthAux::ElementLengthAux(), ElementLpNormAux::ElementLpNormAux(), ElementNormalAux::ElementNormalAux(), ExtraIDIntegralVectorPostprocessor::elementValue(), ElementValueSampler::ElementValueSampler(), ElementVectorL2Error::ElementVectorL2Error(), EqualValueEmbeddedConstraintTempl< is_ad >::EqualValueEmbeddedConstraintTempl(), ReporterPointSource::errorCheck(), StitchMeshGeneratorBase::errorMissingBoundary(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), FunctorNodalCorrector::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppUserObjectTransfer::execute(), ExtraElementIDAux::ExtraElementIDAux(), ExtraElementIntegerDivision::ExtraElementIntegerDivision(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::FileMeshGenerator(), FillBetweenCurvesGenerator::FillBetweenCurvesGenerator(), FillBetweenSidesetsGenerator::FillBetweenSidesetsGenerator(), SpatialUserObjectVectorPostprocessor::fillPoints(), CombinerGenerator::fillPositions(), MultiApp::fillPositions(), InternalSideIndicatorBase::finalize(), FixedPointSolve::findTransformedSystem(), FixedPointSolve::FixedPointSolve(), ForcingFunctionAux::ForcingFunctionAux(), FullSolveMultiApp::FullSolveMultiApp(), FunctionArrayAux::FunctionArrayAux(), FunctionValuePostprocessor::FunctionValuePostprocessor(), FunctorADConverterTempl< T >::FunctorADConverterTempl(), FunctorAux::FunctorAux(), FunctorBinnedValuesDivision::FunctorBinnedValuesDivision(), FunctorCoordinatesFunctionAux::FunctorCoordinatesFunctionAux(), FunctorElementalGradientAuxTempl< is_ad >::FunctorElementalGradientAuxTempl(), FunctorExtremaPositions::FunctorExtremaPositions(), FunctorIC::FunctorIC(), FunctorNodalCorrector::FunctorNodalCorrector(), FunctorPositions::FunctorPositions(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), FunctorVectorElementalAuxTempl< is_ad >::FunctorVectorElementalAuxTempl(), FVAdvection::FVAdvection(), FVFluxBC::FVFluxBC(), FVInterfaceKernel::FVInterfaceKernel(), FVOneVarDiffusionInterface::FVOneVarDiffusionInterface(), FVTwoVarContinuityConstraint::FVTwoVarContinuityConstraint(), Boundary2DDelaunayGenerator::General2DDelaunay(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), AddMetaDataGenerator::generate(), AdvancedExtruderGenerator::generate(), BlockDeletionGenerator::generate(), BlockToMeshConverterGenerator::generate(), Boundary2DDelaunayGenerator::generate(), BoundaryDeletionGenerator::generate(), BoundaryElementConversionGenerator::generate(), BreakBoundaryOnSubdomainGenerator::generate(), BreakMeshByBlockGenerator::generate(), BreakMeshByElementGenerator::generate(), CircularBoundaryCorrectionGenerator::generate(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), CombinerGenerator::generate(), CutMeshByLevelSetGeneratorBase::generate(), ElementsToTetrahedronsConverter::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), FlipSidesetGenerator::generate(), GeneratedMeshGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), ManifoldSubdomainGenerator::generate(), MeshCollectionGenerator::generate(), MeshExtruderGenerator::generate(), ParsedCurveGenerator::generate(), ParsedExtraElementIDGenerator::generate(), ParsedSubdomainGeneratorBase::generate(), PlaneIDMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), ProjectSideSetOntoLevelSetGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), RenameBlockGenerator::generate(), RenameBoundaryGenerator::generate(), RenumberBySubdomainGenerator::generate(), SideSetsFromNodeSetsGenerator::generate(), StackGenerator::generate(), SubdomainBoundingBoxGenerator::generate(), SubdomainsFromPartitionerGenerator::generate(), SurfaceSubdomainsDelaunayRemesher::generate(), UniqueExtraIDMeshGenerator::generate(), XYMeshLineCutter::generate(), XYZDelaunayGenerator::generate(), PatternedMeshGenerator::generate(), GeneratedMeshGenerator::GeneratedMeshGenerator(), BoundaryLayerUtils::generateOffsetPolyline(), GenericConstantStdVectorMaterialTempl< is_ad >::GenericConstantStdVectorMaterialTempl(), GenericFunctorGradientMaterialTempl< is_ad >::GenericFunctorGradientMaterialTempl(), GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::GenericFunctorTimeDerivativeMaterialTempl(), GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl(), PropertyReadFile::getBlockData(), ComponentBoundaryConditionInterface::getBoundaryCondition(), MultiApp::getCommandLineArgs(), PropertyReadFile::getData(), PropertyReadFile::getFileNames(), Sampler::getGlobalSamples(), ComponentInitialConditionInterface::getInitialCondition(), NEML2Action::getInputParameterMapping(), MultiAppNearestNodeTransfer::getLocalEntitiesAndComponents(), Sampler::getLocalSamples(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), Sampler::getNextLocalRow(), FEProblemSolve::getParamFromNonlinearSystemVectorParam(), PostprocessorInterface::getPostprocessorNameInternal(), PostprocessorInterface::getPostprocessorValueInternal(), MultiAppNearestNodeTransfer::getTargetLocalNodes(), UserObjectInterface::getUserObjectBase(), UserObjectInterface::getUserObjectName(), AddPeriodicBCAction::getVariables(), HFEMDirichletBC::HFEMDirichletBC(), AddVariableAction::init(), MFEMTransient::init(), MultiApp::init(), DistributedPositions::initialize(), BlockWeightedPartitioner::initialize(), BlockRestrictable::initializeBlockRestrictable(), BoundaryRestrictable::initializeBoundaryRestrictable(), PhysicsBase::initializePhysics(), ReferenceResidualConvergence::initialSetup(), PiecewiseConstantFromCSV::initialSetup(), SolutionIC::initialSetup(), LibtorchControlValuePostprocessor::initialSetup(), ElementSubdomainModifierBase::initialSetup(), MFEMScalarCoefficientPointValueSampler::initialSetup(), FullSolveMultiApp::initialSetup(), JSONOutput::initialSetup(), BoundaryLinearFVFluxIntegral::initialSetup(), SideFVFluxBCIntegral::initialSetup(), MultiAppCloneReporterTransfer::initialSetup(), MultiAppDofCopyTransfer::initialSetup(), MultiAppGeneralFieldKDTreeTransferBase::initialSetup(), MultiAppGeneralFieldNearestLocationTransfer::initialSetup(), MultiAppGeneralFieldTransfer::initialSetup(), MultiAppVariableValueSamplePostprocessorTransfer::initialSetup(), PointInPolyhedronCheckUO::initialSetup(), HistogramVectorPostprocessor::initialSetup(), SampledOutput::initSample(), AddMetaDataGenerator::inputChecker(), IntegratedBC::IntegratedBC(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceValueUserObjectAux::InterfaceValueUserObjectAux(), InternalSideIndicatorBase::InternalSideIndicatorBase(), InterpolatedStatefulMaterialTempl< T >::InterpolatedStatefulMaterialTempl(), InversePowerMethod::InversePowerMethod(), IterationAdaptiveDT::IterationAdaptiveDT(), MultiApp::keepSolutionDuringRestore(), Kernel::Kernel(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), LinearCombinationFunction::LinearCombinationFunction(), LinearFVAdvectionDiffusionFunctorRobinBC::LinearFVAdvectionDiffusionFunctorRobinBC(), LowerDIntegratedBC::LowerDIntegratedBC(), PNGOutput::makeMeshFunc(), MatCoupledForce::MatCoupledForce(), MaterialADConverterTempl< T >::MaterialADConverterTempl(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MatReactionTempl< is_ad >::MatReactionTempl(), MatrixSymmetryCheck::MatrixSymmetryCheck(), PatternedMeshGenerator::mergeSubdomainNameMaps(), MeshCollectionGenerator::MeshCollectionGenerator(), MeshDiagnosticsGenerator::MeshDiagnosticsGenerator(), MeshDivisionAux::MeshDivisionAux(), MeshGenerator::MeshGenerator(), MeshGeneratorComponent::MeshGeneratorComponent(), MeshInfo::MeshInfo(), MFEMComplexSumAux::MFEMComplexSumAux(), MFEMFunctorMaterial::MFEMFunctorMaterial(), MFEMGeneratedMeshGenerator::MFEMGeneratedMeshGenerator(), MFEMGenericFunctorMaterial::MFEMGenericFunctorMaterial(), MFEMGenericFunctorVectorMaterial::MFEMGenericFunctorVectorMaterial(), MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver(), MFEMMultiAppTransfer::MFEMMultiAppTransfer(), MFEMNDtoRTAux::MFEMNDtoRTAux(), MFEMSumAux::MFEMSumAux(), MFEMVariable::MFEMVariable(), MooseLinearVariableFV< OutputType >::MooseLinearVariableFV(), UserObjectInterface::mooseObjectError(), MoosePreconditioner::MoosePreconditioner(), MooseStaticCondensationPreconditioner::MooseStaticCondensationPreconditioner(), MooseVariableBase::MooseVariableBase(), MortarConstraintBase::MortarConstraintBase(), MortarNodalAuxKernelTempl< ComputeValueType >::MortarNodalAuxKernelTempl(), MultiApp::moveApp(), MoveNodeGenerator::MoveNodeGenerator(), MoveNodesByParsedExpressionModifier::MoveNodesByParsedExpressionModifier(), MultiApp::MultiApp(), MultiAppCloneReporterTransfer::MultiAppCloneReporterTransfer(), MultiAppGeneralFieldFunctorTransfer::MultiAppGeneralFieldFunctorTransfer(), MultiAppGeneralFieldKDTreeTransferBase::MultiAppGeneralFieldKDTreeTransferBase(), MultiAppGeneralFieldShapeEvaluationTransfer::MultiAppGeneralFieldShapeEvaluationTransfer(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppGeometricInterpolationTransfer::MultiAppGeometricInterpolationTransfer(), MultiAppNearestNodeTransfer::MultiAppNearestNodeTransfer(), MultiAppPostprocessorInterpolationTransfer::MultiAppPostprocessorInterpolationTransfer(), MultiAppPostprocessorToAuxScalarTransfer::MultiAppPostprocessorToAuxScalarTransfer(), MultiAppPostprocessorTransfer::MultiAppPostprocessorTransfer(), MultiAppProjectionTransfer::MultiAppProjectionTransfer(), MultiAppReporterTransfer::MultiAppReporterTransfer(), MultiAppScalarToAuxScalarTransfer::MultiAppScalarToAuxScalarTransfer(), MultiAppShapeEvaluationTransfer::MultiAppShapeEvaluationTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppUserObjectTransfer::MultiAppUserObjectTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), MultiAppVariableValueSampleTransfer::MultiAppVariableValueSampleTransfer(), MultiAppVectorPostprocessorTransfer::MultiAppVectorPostprocessorTransfer(), MultiSystemSolveObject::MultiSystemSolveObject(), NearestNodeValueAux::NearestNodeValueAux(), NEML2Action::NEML2Action(), NEML2PreKernel::NEML2PreKernel(), NestedDivision::NestedDivision(), NodalBC::NodalBC(), NodalEqualValueConstraint::NodalEqualValueConstraint(), NodalKernel::NodalKernel(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), NodalValueSampler::NodalValueSampler(), NumDOFs::NumDOFs(), OrientSurfaceMeshGenerator::OrientSurfaceMeshGenerator(), Output::Output(), ParsedCurveGenerator::ParsedCurveGenerator(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), ParsedPostprocessor::ParsedPostprocessor(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), ParsedSubdomainGeneratorBase::ParsedSubdomainGeneratorBase(), ParsedVectorRealReductionReporter::ParsedVectorRealReductionReporter(), ParsedVectorReporter::ParsedVectorReporter(), ParsedVectorVectorRealReductionReporter::ParsedVectorVectorRealReductionReporter(), PatternedMeshGenerator::PatternedMeshGenerator(), PenaltyPeriodicSegmentalConstraint::PenaltyPeriodicSegmentalConstraint(), PeriodicSegmentalConstraint::PeriodicSegmentalConstraint(), PIDTransientControl::PIDTransientControl(), PlaneDeletionGenerator::PlaneDeletionGenerator(), PlaneIDMeshGenerator::PlaneIDMeshGenerator(), PointInPolyhedronBaseUO::PointInPolyhedronBaseUO(), PointInSignedFunctionCheckUO::PointInSignedFunctionCheckUO(), PointInUnionCheckUO::PointInUnionCheckUO(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), PolyLineMeshFollowingNodeSetGenerator::PolyLineMeshFollowingNodeSetGenerator(), EqualValueBoundaryConstraint::populateSecondaryNodes(), ReporterInterface::possiblyCheckHasReporter(), VectorPostprocessorInterface::possiblyCheckHasVectorPostprocessor(), LibmeshPartitioner::prepareBlocksForSubdomainPartitioner(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), ProjectSideSetOntoLevelSetGenerator::ProjectSideSetOntoLevelSetGenerator(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), RankTwoTensorFromComponentProperties::RankTwoTensorFromComponentProperties(), MultiApp::readCommandLineArguments(), PropertyReadFile::readData(), SolutionUserObjectBase::readExodusIIOrNemesis(), SolutionUserObjectBase::readXda(), ReferenceResidualConvergence::ReferenceResidualConvergence(), RefineBlockGenerator::RefineBlockGenerator(), RefineSidesetGenerator::RefineSidesetGenerator(), RenameBlockGenerator::RenameBlockGenerator(), RenameBoundaryGenerator::RenameBoundaryGenerator(), ReporterPointSource::ReporterPointSource(), FEProblemBase::restoreSolutions(), SecondTimeDerivativeAux::SecondTimeDerivativeAux(), FEProblemBase::setLinearConvergenceNames(), FEProblemBase::setNonlinearConvergenceNames(), MooseMesh::setPartitioner(), NodeSetsGeneratorBase::setup(), SideSetsGeneratorBase::setup(), SurfaceMeshGeneratorBase::setup(), CylinderComponent::setupComponent(), NEML2Action::setupDerivativeMappings(), NEML2Action::setupInputMappings(), MultiSystemSolveObject::setupMultiSystemFixedPointRelaxationFactors(), MoveNodesByParsedExpressionModifier::setupNodalOutputVariables(), NEML2Action::setupParameterDerivativeMappings(), NEML2Action::setupParameterMappings(), SetupQuadratureAction::SetupQuadratureAction(), SidesetAroundSubdomainUpdater::SidesetAroundSubdomainUpdater(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), SideValueSampler::SideValueSampler(), SingleRankPartitioner::SingleRankPartitioner(), SphericalGridDivision::SphericalGridDivision(), StitchBoundaryMeshGenerator::StitchBoundaryMeshGenerator(), StitchMeshGenerator::StitchMeshGenerator(), SurfaceSubdomainsDelaunayRemesher::SurfaceSubdomainsDelaunayRemesher(), SymmetryTransformGenerator::SymmetryTransformGenerator(), TagVectorAux::TagVectorAux(), Terminator::Terminator(), TimeDerivativeAux::TimeDerivativeAux(), Transfer::Transfer(), TransformGenerator::TransformGenerator(), TransientMultiApp::TransientMultiApp(), CylinderComponent::translation(), MeshTriangulationUtils::triangulateWithDelaunay(), ParsedCurveGenerator::tSectionSpaceDefiner(), UniqueExtraIDMeshGenerator::UniqueExtraIDMeshGenerator(), UserObjectBase::UserObjectBase(), Checkpoint::validateExecuteOn(), ParsedAux::validateGenericVectorNames(), MFEMProblem::validateVariableNumericType(), VariableCondensationPreconditioner::VariableCondensationPreconditioner(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), VolumeAux::VolumeAux(), WebServerControl::WebServerControl(), XYDelaunayGenerator::XYDelaunayGenerator(), XYMeshLineCutter::XYMeshLineCutter(), and XYZDelaunayGenerator::XYZDelaunayGenerator().

◆ parameters()

const InputParameters & MooseBase::parameters ( ) const
inlineinherited

Get the parameters of the object.

Returns
The parameters of the object

Definition at line 131 of file MooseBase.h.

131{ return _pars; }

Referenced by AddActionComponentAction::act(), CommonOutputAction::act(), CSGOnlyAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), SplitMeshAction::act(), Action::Action(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxKernel(), MFEMProblem::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), DisplacedProblem::addAuxVariable(), MFEMProblem::addAuxVariable(), FEProblemBase::addBoundaryCondition(), MFEMProblem::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addConvergence(), FEProblemBase::addDamper(), AddDefaultConvergenceAction::addDefaultMultiAppFixedPointConvergence(), FEProblemBase::addDefaultMultiAppFixedPointConvergence(), AddDefaultConvergenceAction::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), AddDefaultConvergenceAction::addDefaultSteadyStateConvergence(), FEProblemBase::addDefaultSteadyStateConvergence(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), FEProblemBase::addFunction(), MFEMProblem::addFunction(), FEProblemBase::addFunctorMaterial(), MFEMProblem::addFunctorMaterial(), FEProblemBase::addFVBC(), FEProblemBase::addFVGradientMethod(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVInterfaceKernel(), FEProblemBase::addFVInterpolationMethod(), FEProblemBase::addFVKernel(), MFEMProblem::addGridFunction(), FEProblemBase::addHDGKernel(), MFEMProblem::addImagComponentToBC(), MFEMProblem::addImagComponentToKernel(), FEProblemBase::addIndicator(), MFEMProblem::addIndicator(), FEProblemBase::addInitialCondition(), MFEMProblem::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addInterfaceMaterial(), FEProblemBase::addKernel(), MFEMProblem::addKernel(), FEProblemBase::addLinearFVBC(), FEProblemBase::addLinearFVKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), MFEMProblem::addMarker(), FEProblemBase::addMaterial(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMeshDivision(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), MFEMProblem::addMFEMProblemComposer(), MFEMProblem::addMFEMSolver(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), FEProblemBase::addPostprocessor(), MFEMProblem::addPostprocessor(), FEProblemBase::addPredictor(), MFEMProblem::addQuadratureFunction(), MFEMProblem::addRealComponentToBC(), MFEMProblem::addRealComponentToKernel(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), FEProblemBase::addScalarKernel(), MFEMProblem::addSubMesh(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), MFEMProblem::addTransfer(), FEProblemBase::addUserObject(), DisplacedProblem::addVariable(), MFEMEigenproblem::addVariable(), MFEMProblem::addVariable(), FEProblemBase::addVectorPostprocessor(), MFEMProblem::addVectorPostprocessor(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), AdvancedOutput::AdvancedOutput(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), assemble_l2(), Moose::assemble_matrix(), Action::associateWithParameter(), AuxKernelBase::AuxKernelBase(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), MooseMesh::buildTypedMesh(), MeshGenerator::checkGetMesh(), PostprocessorInterface::checkParam(), AddDefaultConvergenceAction::checkUnusedMultiAppFixedPointConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedNonlinearConvergenceParameters(), AddDefaultConvergenceAction::checkUnusedSteadyStateConvergenceParameters(), SampledOutput::cloneMesh(), Moose::compute_bounds(), Moose::compute_jacobian(), Moose::compute_nearnullspace(), Moose::compute_nullspace(), Moose::compute_postcheck(), Moose::compute_transpose_nullspace(), LibtorchNeuralNetControl::conditionalParameterError(), Console::Console(), MooseMeshUtils::copyIntoMesh(), CommonOutputAction::create(), MultiApp::createApp(), Postprocessor::declareValue(), DumpObjectsProblem::deduceNecessaryParameters(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), DumpObjectsProblem::dumpObjectHelper(), DumpObjectsProblem::DumpObjectsProblem(), EigenProblem::EigenProblem(), EigenProblemSolve::EigenProblemSolve(), ElementMaterialSampler::ElementMaterialSampler(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), ElementSubdomainModifierBase::extrapolatePolynomial(), FEProblem::FEProblem(), FixedPointSolve::FixedPointSolve(), FunctorSmootherTempl< T >::FunctorSmootherTempl(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), ActionWarehouse::getCurrentActionName(), ExecutorInterface::getExecutor(), Material::getMaterial(), Moose::PeriodicBCHelper::getParams(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), UserObjectInterface::getUserObjectName(), AuxKernelBase::getVariableHelper(), VectorPostprocessorInterface::getVectorPostprocessorName(), GhostingUserObject::GhostingUserObject(), MeshGeneratorSystem::hasDataDrivenAllowed(), AttribSystem::initFrom(), AttribDisplaced::initFrom(), BlockRestrictable::initializeBlockRestrictable(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MooseObject::isKokkosObject(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MooseObject::MooseObject(), UserObjectInterface::mooseObjectError(), MooseVariableInterface< T >::MooseVariableInterface(), MultiApp::MultiApp(), MultiAppGeneralFieldTransfer::MultiAppGeneralFieldTransfer(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NodeFaceConstraint::NodeFaceConstraint(), ConsoleUtils::outputLegacyInformation(), OverlayMeshGenerator::OverlayMeshGenerator(), ParsedReporterBase::ParsedReporterBase(), ParsedScalarReporter::ParsedScalarReporter(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::processProperty(), PropertyReadFile::PropertyReadFile(), PseudoTimestep::PseudoTimestep(), RandomIC::RandomIC(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), FEProblemBase::setAuxKernelParamsAndLog(), FEProblemBase::setInputParametersFEProblem(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setResidualObjectParamsAndLog(), SideSetsGeneratorBase::setup(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Moose::PetscSupport::storePetscOptions(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

◆ paramInfo()

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

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

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

Definition at line 471 of file MooseBase.h.

472{
473 mooseInfo(_pars.paramMessage(param, std::forward<Args>(args)...));
474}
std::string paramMessage(const std::string &param, Args... args) const
void mooseInfo(Args &&... args) const
Definition MooseBase.h:334

Referenced by GridPartitioner::_do_partition(), ComboMarker::ComboMarker(), Control::Control(), FunctorIC::FunctorIC(), and TransientMultiApp::TransientMultiApp().

◆ paramWarning()

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

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

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

Definition at line 464 of file MooseBase.h.

465{
466 mooseWarning(_pars.paramMessage(param, std::forward<Args>(args)...));
467}

◆ parser() [1/2]

Parser & MooseApp::parser ( )

Definition at line 1891 of file MooseApp.C.

1892{
1893 return const_cast<Parser &>(std::as_const(*this).parser());
1894}
Class for parsing input files.
Definition Parser.h:102

◆ parser() [2/2]

const Parser & MooseApp::parser ( ) const
Returns
The Parser

Definition at line 1884 of file MooseApp.C.

1885{
1886 mooseAssert(_parser, "Not set");
1887 return *_parser;
1888}

Referenced by ActionFactory::create().

◆ perfGraph()

PerfGraph & MooseApp::perfGraph ( )
inline

Get the PerfGraph for this app.

Definition at line 179 of file MooseApp.h.

179{ return _perf_graph; }

Referenced by PerfGraphInterface::perfGraph().

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

2537{
2538 const auto & map_name = getRestartableDataMapName(name);
2539 const auto meta_data_folder_base = metaDataFolderBase(folder_base, map_name);
2540 if (RestartableDataReader::isAvailable(meta_data_folder_base))
2541 {
2543 reader.setErrorOnLoadWithDifferentNumberOfProcessors(false);
2544 reader.setInput(meta_data_folder_base);
2545 reader.restore();
2546 }
2547}
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:3051
const std::string & getRestartableDataMapName(const RestartableDataMapName &name) const
Definition MooseApp.C:3459
Reader for restartable data written by the RestartableDataWriter.
static bool isAvailable(const std::filesystem::path &folder_base)

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

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

804{}

Referenced by restore(), and restore().

◆ preBackup()

virtual void MooseApp::preBackup ( )
inlinevirtual

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

Definition at line 770 of file MooseApp.h.

770{}

Referenced by backup(), and backup().

◆ processor_id()

processor_id_type MooseApp::processor_id ( ) const
inline

Returns the MPI processor ID of the current processor.

Definition at line 417 of file MooseApp.h.

417{ return _comm->rank(); }

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

◆ queryKokkosGPUs()

void MooseApp::queryKokkosGPUs ( )
private

Query the Kokkos GPUs in the system and check whether every process has an associated GPU.

◆ queryParam()

template<typename T >
const T * MooseBase::queryParam ( const std::string &  name) const
inherited

Query a parameter for the object.

If a parameter of the given name and type does not exist or if the parameter is not valid, nullptr will be returned

Parameters
nameThe name of the parameter
Returns
A pointer to the parameter value, if it exists

Definition at line 413 of file MooseBase.h.

414{
415 return _pars.queryParam<T>(name);
416}
const T * queryParam(const std::string &name) const
Query a parameter.

Referenced by MFEMExecutedObject::getRequestedItems(), and MFEMGeometricMultigridSolver::MFEMGeometricMultigridSolver().

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

174{ return _rank_map; }

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

1900{
1901 // Did we already make this one?
1902 if (_executors.find(current_executor_name) != _executors.end())
1903 return;
1904
1905 // Is this one already on the current branch (i.e. there is a cycle)
1906 if (std::find(current_branch.begin(), current_branch.end(), current_executor_name) !=
1907 current_branch.end())
1908 {
1909 std::stringstream exec_names_string;
1910
1911 auto branch_it = current_branch.begin();
1912
1913 exec_names_string << *branch_it++;
1914
1915 for (; branch_it != current_branch.end(); ++branch_it)
1916 exec_names_string << ", " << *branch_it;
1917
1918 exec_names_string << ", " << current_executor_name;
1919
1920 mooseError("Executor cycle detected: ", exec_names_string.str());
1921 }
1922
1923 current_branch.push_back(current_executor_name);
1924
1925 // Build the dependencies first
1926 const auto & params = *_executor_params[current_executor_name].second;
1927
1928 for (const auto & param : params)
1929 {
1930 if (params.have_parameter<ExecutorName>(param.first))
1931 {
1932 const auto & dependency_name = params.get<ExecutorName>(param.first);
1933
1934 possible_roots.remove(dependency_name);
1935
1936 if (!dependency_name.empty())
1937 recursivelyCreateExecutors(dependency_name, possible_roots, current_branch);
1938 }
1939 }
1940
1941 // Add this Executor
1942 const auto & type = _executor_params[current_executor_name].first;
1943 addExecutor(type, current_executor_name, params);
1944
1945 current_branch.pop_back();
1946}
void addExecutor(const std::string &type, const std::string &name, const InputParameters &params)
Definition MooseApp.C:1864

Referenced by createExecutors(), and recursivelyCreateExecutors().

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

1780{
1781 static_assert(!std::is_base_of<MooseObject, T>::value, "T is not an interface");
1782
1783 InterfaceRegistryObjects<T> * registry = nullptr;
1784 auto it = _interface_registry.find(typeid(T));
1785 if (it == _interface_registry.end())
1786 {
1787 auto new_registry = std::make_unique<InterfaceRegistryObjects<T>>();
1788 registry = new_registry.get();
1789 _interface_registry.emplace(typeid(T), std::move(new_registry));
1790 }
1791 else
1792 registry = cast_ptr<InterfaceRegistryObjects<T> *>(it->second.get());
1793
1794 mooseAssert(std::count(registry->_objects.begin(), registry->_objects.end(), &interface) == 0,
1795 "Interface already registered");
1796 registry->_objects.push_back(&interface);
1797}

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

◆ registerRestartableData() [1/2]

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

◆ registerRestartableData() [2/2]

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

Definition at line 2454 of file MooseApp.C.

2458{
2459 if (!metaname.empty() && tid != 0)
2460 mooseError(
2461 "The meta data storage for '", metaname, "' is not threaded, so the tid must be zero.");
2462
2463 mooseAssert(metaname.empty() ||
2464 _restartable_meta_data.find(metaname) != _restartable_meta_data.end(),
2465 "The desired meta data name does not exist: " + metaname);
2466
2467 // Select the data store for saving this piece of restartable data (mesh or everything else)
2468 auto & data_map =
2469 metaname.empty() ? _restartable_data[tid] : _restartable_meta_data[metaname].first;
2470
2471 RestartableDataValue * stored_data = data_map.findData(data->name());
2472 if (stored_data)
2473 {
2474 if (data->typeId() != stored_data->typeId())
2475 mooseError("Type mismatch found in RestartableData registration of '",
2476 data->name(),
2477 "'\n\n Stored type: ",
2478 stored_data->type(),
2479 "\n New type: ",
2480 data->type());
2481 }
2482 else
2483 stored_data = &data_map.addData(std::move(data));
2484
2485 if (!read_only)
2486 stored_data->setDeclared({});
2487
2488 return *stored_data;
2489}
virtual const std::type_info & typeId() const =0
The type ID of the underlying data.
void setDeclared(const SetDeclaredKey)
Sets that this restartable value has been declared.
virtual std::string type() const =0
String identifying the type of parameter stored.

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

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

3450{
3451 if (!suffix.empty())
3452 std::transform(suffix.begin(), suffix.end(), suffix.begin(), ::tolower);
3453 suffix.insert(0, "_");
3454 _restartable_meta_data.emplace(
3455 std::make_pair(name, std::make_pair(RestartableDataMap(), suffix)));
3456}

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

1708{
1710 switch (filter)
1711 {
1712 case RESTARTABLE_FILTER::RECOVERABLE:
1714 break;
1715 default:
1716 mooseError("Unknown filter");
1717 }
1718}
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
Definition MooseTypes.h:846

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

◆ 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 61 of file PerfGraphInterface.C.

63{
64 const auto timed_section_name = timedSectionName(section_name);
65 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
66 return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
67 else
68 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
69}
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID @section_name The name of the section.
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
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 72 of file PerfGraphInterface.C.

76{
77 const auto timed_section_name = timedSectionName(section_name);
78 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
80 timedSectionName(section_name), level, live_message, print_dots);
81 else
82 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
83}

◆ relationshipManagers()

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

Return the container of relationship managers.

Definition at line 1063 of file MooseApp.h.

1064 {
1066 }

Referenced by NumRelationshipManagers::getValue().

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

3099{
3100 auto * const mesh = _action_warehouse.mesh().get();
3101 if (!mesh)
3102 mooseError("The MooseMesh should exist");
3103
3104 const MeshBase * const undisp_lm_mesh = mesh->getMeshPtr();
3105 RelationshipManager * undisp_clone = nullptr;
3106 if (undisp_lm_mesh && hasRMClone(*rm, *undisp_lm_mesh))
3107 {
3108 undisp_clone = &getRMClone(*rm, *undisp_lm_mesh);
3109 const_cast<MeshBase *>(undisp_lm_mesh)->remove_ghosting_functor(*undisp_clone);
3110 }
3111
3112 auto & displaced_mesh = _action_warehouse.displacedMesh();
3113 MeshBase * const disp_lm_mesh = displaced_mesh ? &displaced_mesh->getMesh() : nullptr;
3114 RelationshipManager * disp_clone = nullptr;
3115 if (disp_lm_mesh && hasRMClone(*rm, *disp_lm_mesh))
3116 {
3117 disp_clone = &getRMClone(*rm, *disp_lm_mesh);
3118 disp_lm_mesh->remove_ghosting_functor(*disp_clone);
3119 }
3120
3121 if (_executioner)
3122 {
3123 auto & problem = feProblem();
3124 if (undisp_clone)
3125 {
3126 problem.removeAlgebraicGhostingFunctor(*undisp_clone);
3127 problem.removeCouplingGhostingFunctor(*undisp_clone);
3128 }
3129
3130 auto * dp = problem.getDisplacedProblem().get();
3131 if (dp && disp_clone)
3132 dp->removeAlgebraicGhostingFunctor(*disp_clone);
3133 }
3134
3136 _relationship_managers.erase(rm);
3137}
void releaseSharedObjects(const MooseObject &moose_object, THREAD_ID tid=0)
Releases any shared resources created as a side effect of creating an object through the Factory::cre...
Definition Factory.C:156
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:3083
bool hasRMClone(const RelationshipManager &template_rm, const MeshBase &mesh) const
Definition MooseApp.C:3075

Referenced by addRelationshipManager().

◆ requestCitations()

void MooseApp::requestCitations ( )
private

Handles the –citations command-line option: registers with PETSc the BibTeX entries that should be cited for the framework and the modules/objects used in this simulation, and enables PETSc's -citations option.

PETSc prints them (together with its own and its sub-packages' citations) at PetscFinalize, to the console or to a file if one was given. The collected set spans this app and, recursively, every MultiApp subapp, and is gathered across all MPI ranks (PETSc prints from rank 0 alone), so attribution is complete for multi-app runs.

Definition at line 2141 of file MooseApp.C.

2142{
2143 // Collect the de-duplicated citations across this app and, recursively, every MultiApp subapp.
2144 std::map<std::string, std::string> citations;
2145 collectCitations(citations);
2146
2147 // MultiApp subapps are distributed across the MPI ranks, so each rank has collected citations
2148 // only for the subapps it owns. PETSc prints the citation list from rank 0 alone, so gather every
2149 // rank's citations onto all ranks; otherwise a module used only by a subapp that lives off rank 0
2150 // would be omitted.
2151 std::vector<std::string> flattened;
2152 flattened.reserve(citations.size() * 2);
2153 for (const auto & [key, bibtex] : citations)
2154 {
2155 flattened.push_back(key);
2156 flattened.push_back(bibtex);
2157 }
2158 _comm->allgather(flattened);
2159 for (std::size_t i = 0; i + 1 < flattened.size(); i += 2)
2160 {
2161 [[maybe_unused]] const auto [it, inserted] = citations.emplace(flattened[i], flattened[i + 1]);
2162 mooseAssert(inserted || it->second == flattened[i + 1],
2163 "The same citation key was registered with different BibTeX entries");
2164 }
2165
2166 // Register the resolved BibTeX entries with PETSc and enable its -citations option. PETSc prints
2167 // them, together with the run-specific citations from any PETSc solvers/preconditioners actually
2168 // used, at PetscFinalize (to the console or, if a file name was given, to that file).
2169 for (const auto & citation : citations)
2170 Moose::PetscSupport::registerPetscCitation(citation.second);
2171
2172 Moose::PetscSupport::setSinglePetscOption("-citations", getParam<std::string>("citations"));
2173}
void registerPetscCitation(const std::string &bibtex)
Register a BibTeX entry with PETSc's citation list so that it is printed (alongside the run-specific ...
void setSinglePetscOption(const std::string &name, const std::string &value="", FEProblemBase *const problem=nullptr)
A wrapper function for dealing with different versions of PetscOptionsSetValue.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...

Referenced by run().

◆ restartFolderBase()

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

The file suffix for restartable data.

Definition at line 3059 of file MooseApp.C.

3060{
3061 auto folder = folder_base;
3062 folder += "-restart-" + std::to_string(processor_id());
3064}

Referenced by Checkpoint::output().

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

1762{
1763 TIME_SECTION("restore", 2, "Restoring Application from File");
1764
1765 const DataNames filter_names = for_restart ? getRecoverableData() : DataNames{};
1766
1767 _rd_reader.setInput(folder_base);
1768 _rd_reader.restore(filter_names);
1769
1770 postRestore(for_restart);
1771}
std::unordered_set< std::string > DataNames
const DataNames & getRecoverableData() const
Return a reference to the recoverable data object.
Definition MooseApp.h:727
virtual void postRestore(const bool)
Insertion point for other apps that is called after restore()
Definition MooseApp.h:804
void restore(const DataNames &filter_names={})
Restores the restartable data.
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...

Referenced by restoreFromInitialBackup().

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

1775{
1776 TIME_SECTION("restore", 2, "Restoring Application");
1777
1778 const DataNames filter_names = for_restart ? getRecoverableData() : DataNames{};
1779
1780 if (!backup)
1781 mooseError("MooseApp::restore(): Provided backup is not initialized");
1782
1783 auto header = std::move(backup->header);
1784 mooseAssert(header, "Header not available");
1785
1786 auto data = std::move(backup->data);
1787 mooseAssert(data, "Data not available");
1788
1789 if (restoreMeshBackup(*this, *backup, feProblem().mesh()))
1790 {
1792 feProblem().mesh().prepare();
1793 feProblem().meshChanged(/*intermediate_change=*/false,
1794 /*contract_mesh=*/false,
1795 /*clean_refinement_flags=*/false);
1796 }
1797
1798 _rd_reader.setInput(std::move(header), std::move(data));
1799 _rd_reader.restore(filter_names);
1800
1801 postRestore(for_restart);
1802}
virtual MooseMesh & mesh() override
virtual void meshChanged(bool intermediate_change, bool contract_mesh, bool clean_refinement_flags)
Update data after a mesh change.
virtual std::string header() const
Returns a string to be printed at the beginning of a simulation.
Definition MooseApp.C:2878
bool _restored_initial_backup_mesh
Whether mesh topology has been restored from the initial Backup object.
Definition MooseApp.h:1736
void prepare()
Calls prepare_for_use() if the underlying MeshBase object isn't prepared, then communicates various b...
Definition MooseMesh.C:397

◆ restoreDataIfAvailable()

bool MooseApp::restoreDataIfAvailable ( RestartableDataValue value,
const THREAD_ID  tid,
Moose::PassKey< ReporterData  
)
inline

Restores value in place from the checkpoint reader if it is present in the checkpoint and has not yet been loaded.

Used to recover data (e.g. reporter values) that is declared after the bulk restore pass while the reader window is still open. No-op on non-recover runs and for data declared before the restore window opens.

Returns
Whether or not the value was restored

Definition at line 839 of file MooseApp.h.

842 {
843 return _rd_reader.restoreDataIfAvailable(value, tid, {});
844 }
bool restoreDataIfAvailable(RestartableDataValue &value, const THREAD_ID tid, Moose::PassKey< MooseApp >)
Restores value in place from the open reader if it is present in the checkpoint and has not yet been ...

Referenced by ReporterData::restoreReporterStateIfAvailable().

◆ restoredInitialBackupMesh()

bool MooseApp::restoredInitialBackupMesh ( ) const
inline

Whether this app has restored mesh topology from its initial Backup object.

Definition at line 750 of file MooseApp.h.

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

1806{
1807 mooseAssert(hasInitialBackup(), "Missing initial backup");
1808 restore(std::move(*_initial_backup), for_restart);
1809}
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
Definition MooseApp.C:1761

◆ restoreMeshFromInitialBackup()

void MooseApp::restoreMeshFromInitialBackup ( MooseMesh mesh)

Restore mesh from this app's initial Backup object and consume the mesh checkpoint entries.

Definition at line 1754 of file MooseApp.C.

1755{
1756 mooseAssert(hasInitialBackup(), "Missing initial backup");
1757 _restored_initial_backup_mesh = restoreMeshBackup(*this, **_initial_backup, mesh);
1758}

◆ run()

void MooseApp::run ( )
virtual

Run the application.

Definition at line 2032 of file MooseApp.C.

2033{
2034 TIME_SECTION("run", 3);
2035 if (getParam<bool>("show_docs"))
2036 {
2037 auto binname = appBinaryName();
2038 if (binname == "")
2039 mooseError("could not locate installed tests to run (unresolved binary/app name)");
2040 auto docspath = MooseUtils::docsDir(binname);
2041 if (docspath == "")
2042 mooseError("no installed documentation found");
2043
2044 auto docmsgfile = MooseUtils::pathjoin(docspath, "docmsg.txt");
2045 std::string docmsg = "file://" + MooseUtils::realpath(docspath) + "/index.html";
2046 if (MooseUtils::pathExists(docmsgfile) && MooseUtils::checkFileReadable(docmsgfile))
2047 {
2048 std::ifstream ifs(docmsgfile);
2049 std::string content((std::istreambuf_iterator<char>(ifs)),
2050 (std::istreambuf_iterator<char>()));
2051 content.replace(content.find("$LOCAL_SITE_HOME"), content.length(), docmsg);
2052 docmsg = content;
2053 }
2054
2055 Moose::out << docmsg << "\n";
2056 _early_exit_param = "--docs";
2057 _ready_to_exit = true;
2058 return;
2059 }
2060
2061 if (showInputs() || copyInputs() || runInputs())
2062 {
2063 _early_exit_param = "--show-input, --copy-inputs, or --run";
2064 _ready_to_exit = true;
2065 return;
2066 }
2067
2068 try
2069 {
2070 TIME_SECTION("setup", 2, "Setting Up");
2071 setupOptions();
2072 runInputFile();
2073 }
2074 catch (Parser::Error & err)
2075 {
2076 mooseAssert(_parser->getThrowOnError(), "Should be true");
2077 throw;
2078 }
2079 catch (MooseRuntimeError & err)
2080 {
2081 mooseAssert(Moose::_throw_on_error, "Should be true");
2082 throw;
2083 }
2084 catch (std::exception & err)
2085 {
2086 mooseError(err.what());
2087 }
2088
2089 if (!_check_input)
2090 {
2091 TIME_SECTION("execute", 2, "Executing");
2093 }
2094 else
2095 {
2096 errorCheck();
2097 // Output to stderr, so it is easier for peacock to get the result
2098 Moose::err << "Syntax OK" << std::endl;
2099 }
2100
2101 if (isParamSetByUser("citations"))
2103}
void requestCitations()
Handles the –citations command-line option: registers with PETSc the BibTeX entries that should be ci...
Definition MooseApp.C:2141
virtual void executeExecutioner()
Execute the Executioner that was built.
Definition MooseApp.C:1642
bool runInputs()
Handles the run input parameter logic: Checks to see whether a directory exists in user space and lau...
Definition MooseApp.C:2279
bool showInputs() const
Prints a message showing the installable inputs for a given application (if getInstallableInputs has ...
Definition MooseApp.C:2176
virtual void setupOptions()
Setup options based on InputParameters.
Definition MooseApp.C:1030
bool copyInputs()
Handles the copy_inputs input parameter logic: Checks to see whether the passed argument is valid (a ...
Definition MooseApp.C:2214
virtual void runInputFile()
Actually build everything in the input file.
Definition MooseApp.C:1562
Exception to be thrown whenever we have _throw_on_error set and a mooseError() is emitted.
Definition MooseError.h:118
std::string realpath(const std::string &path)
std::string docsDir(const std::string &app_name)
Definition MooseUtils.C:136
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
Definition Moose.C:922

Referenced by MooseServer::parseDocumentForDiagnostics().

◆ runInputFile()

void MooseApp::runInputFile ( )
virtual

Actually build everything in the input file.

Definition at line 1562 of file MooseApp.C.

1563{
1564 TIME_SECTION("runInputFile", 3);
1565
1566 // If early exit param has been set, then just return
1567 if (_ready_to_exit)
1568 return;
1569
1571
1572 if (isParamSetByUser("csg_only"))
1573 {
1574 _early_exit_param = "--csg-only";
1575 _ready_to_exit = true;
1576 }
1577 else if (isParamSetByUser("mesh_only"))
1578 {
1579 _early_exit_param = "--mesh-only";
1580 _ready_to_exit = true;
1581 }
1582 else if (isParamSetByUser("split_mesh"))
1583 {
1584 _early_exit_param = "--split-mesh";
1585 _ready_to_exit = true;
1586 }
1587 else if (isParamSetByUser("parse_neml2_only"))
1588 {
1589 _early_exit_param = "--parse-neml2-only";
1590 _ready_to_exit = true;
1591 }
1592 else if (getParam<bool>("list_constructed_objects"))
1593 {
1594 // TODO: ask multiapps for their constructed objects
1595 _early_exit_param = "--list-constructed-objects";
1596 _ready_to_exit = true;
1597 std::stringstream ss;
1598 for (const auto & obj : _factory.getConstructedObjects())
1599 ss << obj << '\n';
1601 "list_constructed_objects", "**START OBJECT DATA**\n", "\n**END OBJECT DATA**", ss.str());
1602 }
1603}
void executeAllActions()
This method loops over all actions in the warehouse and executes them.
void outputMachineReadableData(const std::string &param, const std::string &start_marker, const std::string &end_marker, const std::string &data) const
Outputs machine readable data (JSON, YAML, etc.) either to the screen (if no filename was provided as...
Definition MooseApp.C:3549

Referenced by run().

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

2280{
2281 if (isParamSetByUser("run"))
2282 {
2283 if (comm().size() > 1)
2284 mooseError("The --run option should not be ran in parallel");
2285
2286 // Pass everything after --run on the cli to the TestHarness
2287 const auto find_run_it = std::as_const(*_command_line).findCommandLineParam("run");
2288 const auto & cl_entries = std::as_const(*_command_line).getEntries();
2289 mooseAssert(find_run_it != cl_entries.end(), "Didn't find the option");
2290 std::string test_args;
2291 for (auto it = std::next(find_run_it); it != cl_entries.end(); ++it)
2292 for (const auto & arg : it->raw_args)
2293 {
2294 test_args += " " + arg;
2296 }
2297
2298 auto working_dir = MooseUtils::getCurrentWorkingDir();
2299 if (MooseUtils::findTestRoot() == "")
2300 {
2301 auto bin_name = appBinaryName();
2302 if (bin_name == "")
2303 mooseError("Could not locate binary name relative to installed location");
2304
2305 auto cmd_name = Moose::getExecutableName();
2306 mooseError(
2307 "Could not locate installed tests from the current working directory:",
2308 working_dir,
2309 ".\nMake sure you are executing this command from within a writable installed inputs ",
2310 "directory.\nRun \"",
2311 cmd_name,
2312 " --copy-inputs <dir>\" to copy the contents of <dir> to a \"./",
2313 bin_name,
2314 "_<dir>\" directory.\nChange into that directory and try \"",
2315 cmd_name,
2316 " --run <dir>\" again.");
2317 }
2318
2319 // Set this application as the app name for the moose_test_runner script that we're running
2320 setenv("MOOSE_TEST_RUNNER_APP_NAME", appBinaryName().c_str(), true);
2321
2322 const std::string cmd = MooseUtils::runTestsExecutable() + test_args;
2323 Moose::out << "Working Directory: " << working_dir << "\nRunning Command: " << cmd << std::endl;
2324 mooseAssert(comm().size() == 1, "Should be run in serial");
2325 const auto return_value = system(cmd.c_str());
2326 if (!WIFEXITED(return_value))
2327 mooseError("Process exited unexpectedly");
2328 setExitCode(WEXITSTATUS(return_value));
2329 return true;
2330 }
2331
2332 return false;
2333}
std::string getCurrentWorkingDir()
Definition MooseUtils.C:447
std::string findTestRoot()
Definition MooseUtils.C:86
std::string runTestsExecutable()
Definition MooseUtils.C:76
void add_command_line_name(const std::string &name)

Referenced by run().

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

1846{
1847 _enable_unused_check = warn_is_error ? ERROR_UNUSED : WARN_UNUSED;
1848}

Referenced by setupOptions().

◆ setErrorOverridden()

void MooseApp::setErrorOverridden ( )

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

Definition at line 2026 of file MooseApp.C.

2027{
2028 _error_overridden = true;
2029}

Referenced by setupOptions().

◆ setExecutioner()

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

Set the Executioner for this App.

Definition at line 349 of file MooseApp.h.

349{ _executioner = executioner; }

Referenced by CreateExecutionerAction::act().

◆ setExecutor()

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

Definition at line 350 of file MooseApp.h.

350{ _executor = executor; }

◆ setExitCode()

void MooseApp::setExitCode ( const int  exit_code)
inline

Sets the exit code that the application will exit with.

Definition at line 168 of file MooseApp.h.

168{ _exit_code = exit_code; }

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

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

430{ _initial_from_file = flag; }

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

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

442 {
443 _ex_reader = exreader;
444 }

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

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

312{ _global_time_offset = offset; }

◆ setMFEMDevice()

void MooseApp::setMFEMDevice ( const std::string &  device_string,
bool  gpu_aware_mpi,
Moose::PassKey< MFEMProblemSolve  
)

Create/configure the MFEM device with the provided device_string.

More than one device can be configured. If supplying multiple devices, they should be comma separated

Definition at line 3630 of file MooseApp.C.

3633{
3634 const auto string_vec = MooseUtils::split(device_string, ",");
3635 auto string_set = std::set<std::string>(string_vec.begin(), string_vec.end());
3636 if (!_mfem_device)
3637 {
3638 _mfem_device = std::make_shared<mfem::Device>(device_string);
3639 _mfem_devices = std::move(string_set);
3640 _mfem_device->SetGPUAwareMPI(mfem::GetEnv("MFEM_GPU_AWARE_MPI") ? true : gpu_aware_mpi);
3641 _mfem_device->Print(Moose::out);
3642 }
3643 else if (!device_string.empty() && string_set != _mfem_devices)
3644 mooseError("Attempted to configure with "
3645 "MFEM devices '",
3646 MooseUtils::join(string_set, " "),
3647 "', but we have already "
3648 "configured the MFEM device "
3649 "object with the devices '",
3650 MooseUtils::join(_mfem_devices, " "),
3651 "'");
3652}
std::vector< std::string > split(const std::string &str, const std::string &delimiter, std::size_t max_count)

Referenced by MFEMProblemSolve::MFEMProblemSolve().

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

1547{
1548 _output_file_base = output_file_base;
1549
1550 // Reset the file base in the outputs
1552
1553 // Reset the file base in multiapps (if they have been constructed yet)
1554 if (getExecutioner())
1555 for (auto & multi_app : feProblem().getMultiAppWarehouse().getObjects())
1556 multi_app->setAppOutputFileBase();
1557
1559}
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition MooseApp.C:2020
void resetFileBase()
Resets the file base for all FileOutput objects.

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

541 {
542 _output_file_numbers = numbers;
543 }

◆ setOutputPosition()

void MooseApp::setOutputPosition ( const Point &  p)

Tell the app to output in a specific position.

Definition at line 2351 of file MooseApp.C.

2352{
2353 _output_position_set = true;
2354 _output_position = p;
2356
2357 if (_executioner.get())
2358 _executioner->parentOutputPositionChanged();
2359}
void meshChanged()
Calls the meshChanged method for every output object.

◆ setRecover()

void MooseApp::setRecover ( bool  value)

Definition at line 2890 of file MooseApp.C.

2891{
2892 _recover = value;
2893}
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ setRestart()

void MooseApp::setRestart ( bool  value)

Sets the restart/recover flags.

Parameters
stateThe state to set the flag to

Definition at line 2884 of file MooseApp.C.

2885{
2886 _restart = value;
2887}

Referenced by FEProblemBase::setRestartFile().

◆ setRestartRecoverFileBase()

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

mutator for recover_base (set by RecoverBaseAction)

Definition at line 512 of file MooseApp.h.

513 {
514 if (file_base.empty())
516 else
517 _restart_recover_base = file_base;
518 }
std::list< std::string > getCheckpointFiles() const
Extract all possible checkpoint file names.
Definition MooseApp.C:2394
std::string getLatestCheckpointFilePrefix(const std::list< std::string > &checkpoint_files)
Definition MooseUtils.C:830

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

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

2402{
2403 _start_time_set = true;
2404 _start_time = time;
2405}

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

◆ setupOptions()

void MooseApp::setupOptions ( )
virtual

Setup options based on InputParameters.

Definition at line 1030 of file MooseApp.C.

1031{
1032 TIME_SECTION("setupOptions", 5, "Setting Up Options");
1033
1034 // Print the header, this is as early as possible
1035 if (header().length() && !getParam<bool>("suppress_header"))
1036 _console << header() << std::endl;
1037
1038 if (getParam<bool>("error_unused"))
1039 setCheckUnusedFlag(true);
1040 else if (getParam<bool>("allow_unused"))
1041 setCheckUnusedFlag(false);
1042
1043 if (getParam<bool>("error_override"))
1045
1046 if (getParam<bool>("trap_fpe"))
1047 {
1048 _trap_fpe = true;
1049 _perf_graph.setActive(false);
1050 if (getParam<bool>("no_trap_fpe"))
1051 mooseError("Cannot use both \"--trap-fpe\" and \"--no-trap-fpe\" flags.");
1052 }
1053 else if (getParam<bool>("no_trap_fpe"))
1054 _trap_fpe = false;
1055
1056 // Turn all warnings in MOOSE to errors (almost see next logic block)
1057 Moose::_warnings_are_errors = getParam<bool>("error");
1058
1059 // Deprecated messages can be toggled to errors independently from everything else.
1060 Moose::_deprecated_is_error = getParam<bool>("error_deprecated");
1061
1062 if (isUltimateMaster()) // makes sure coloring isn't reset incorrectly in multi-app settings
1063 {
1064 // Set from command line
1065 auto color = getParam<MooseEnum>("color");
1066 if (!isParamSetByUser("color"))
1067 {
1068 // Set from deprecated --no-color
1069 if (getParam<bool>("no_color"))
1070 color = "off";
1071 // Set from environment
1072 else
1073 {
1074 char * c_color = std::getenv("MOOSE_COLOR");
1075 if (c_color)
1076 color.assign(std::string(c_color), "While assigning environment variable MOOSE_COLOR");
1077 }
1078 }
1079
1080 if (color == "auto")
1082 else if (color == "on")
1083 Moose::setColorConsole(true, true);
1084 else if (color == "off")
1086 else
1087 mooseAssert(false, "Should not hit");
1088
1089 // After setting color so that non-yellow deprecated is honored
1090 if (getParam<bool>("no_color"))
1091 mooseDeprecated("The --no-color flag is deprecated. Use '--color off' instead.");
1092 }
1093
1094// If there's no threading model active, but the user asked for
1095// --n-threads > 1 on the command line, throw a mooseError. This is
1096// intended to prevent situations where the user has potentially
1097// built MOOSE incorrectly (neither TBB nor pthreads found) and is
1098// asking for multiple threads, not knowing that there will never be
1099// any threads launched.
1100#if !LIBMESH_USING_THREADS
1101 if (libMesh::command_line_value("--n-threads", 1) > 1)
1102 mooseError("You specified --n-threads > 1, but there is no threading model active!");
1103#endif
1104
1105 // Capability checking
1106 {
1107 // Augment capabilities from the TestHarness
1108 std::optional<std::set<std::string>> ignore_capabilities;
1109 if (isParamValid("testharness_capabilities"))
1110 {
1111 if (!isParamValid("required_capabilities"))
1112 mooseError(
1113 "--testharness-capabilities: Should not be specified without --required-capabilities");
1114
1115 const auto file_path = std::filesystem::absolute(
1116 std::filesystem::path(getParam<std::string>("testharness_capabilities")));
1117
1118 std::ifstream file(file_path);
1119 if (!file)
1120 mooseError("--testharness-capabilities: Could not open ", file_path);
1121
1122 nlohmann::json root;
1123 try
1124 {
1125 file >> root;
1126 if (const auto it = root.find("capabilities"); it != root.end())
1128 if (const auto it = root.find("ignore_capabilities"); it != root.end())
1129 ignore_capabilities = it->get<std::set<std::string>>();
1130 }
1131 catch (const std::exception & e)
1132 {
1133 mooseError(
1134 "--testharness-capabilities: Failed to load capabilities ", file_path, ":\n", e.what());
1135 }
1136 }
1137
1138 if (isParamValid("required_capabilities"))
1139 {
1141
1142 const auto & required_capabilities = getParam<std::string>("required_capabilities");
1143
1144 CapabilityRegistry::CheckOptions options;
1145 // Allowed to be unknown
1146 options.certain = false;
1147 // Add ignored capabilities, if any
1148 if (ignore_capabilities)
1149 options.ignore_capabilities = *ignore_capabilities;
1150
1151 CapabilityRegistry::CheckResult result;
1152 try
1153 {
1154 result = Moose::internal::Capabilities::getCapabilities({}).check(required_capabilities,
1155 options);
1156 }
1157 catch (const std::exception & e)
1158 {
1159 mooseError("--required-capablities: ", e.what());
1160 }
1161
1162 if (result.state < CapabilityRegistry::CheckState::UNKNOWN)
1163 {
1164 mooseInfo("Required capabilities '", required_capabilities, "' not fulfilled.");
1165 _ready_to_exit = true;
1166 // we use code 77 as "skip" in the Testharness
1167 _exit_code = 77;
1168 return;
1169 }
1170 if (result.state == CapabilityRegistry::CheckState::UNKNOWN)
1171 mooseError("Required capabilities '",
1172 required_capabilities,
1173 "' are not specific enough. A comparison test is performed on an undefined "
1174 "capability. Disambiguate this requirement by adding an existence/non-existence "
1175 "requirement. Example: 'unknown<1.2.3' should become 'unknown & unknown<1.2.3' "
1176 "or '!unknown | unknown<1.2.3'");
1177 }
1178 }
1179
1180 // Build a minimal running application, ignoring the input file.
1181 if (getParam<bool>("minimal"))
1183
1184 else if (getParam<bool>("display_version"))
1185 {
1186 Moose::out << getPrintableVersion() << std::endl;
1187 _early_exit_param = "--version";
1188 _ready_to_exit = true;
1189 return;
1190 }
1191 else if (getParam<bool>("help"))
1192 {
1193 _command_line->printUsage();
1194 _early_exit_param = "--help";
1195 _ready_to_exit = true;
1196 }
1197 else if (getParam<bool>("dump") || isParamSetByUser("dump_search"))
1198 {
1199 const std::string search =
1200 isParamSetByUser("dump_search") ? getParam<std::string>("dump_search") : "";
1201
1202 JsonSyntaxTree tree(search);
1203
1204 {
1205 TIME_SECTION("dump", 1, "Building Syntax Tree");
1207 }
1208
1209 // Check if second arg is valid or not
1210 if ((tree.getRoot()).is_object())
1211 {
1212 // Turn off live printing so that it doesn't mess with the dump
1214
1215 JsonInputFileFormatter formatter;
1216 Moose::out << "\n### START DUMP DATA ###\n"
1217 << formatter.toString(tree.getRoot()) << "\n### END DUMP DATA ###" << std::endl;
1218 _early_exit_param = "--dump";
1219 _ready_to_exit = true;
1220 }
1221 else
1222 mooseError("Search parameter '", search, "' was not found in the registered syntax.");
1223 }
1224 else if (getParam<bool>("registry"))
1225 {
1227
1228 Moose::out << "Label\tType\tName\tClass\tFile\n";
1229
1230 auto & objmap = Registry::allObjects();
1231 for (auto & entry : objmap)
1232 for (auto & obj : entry.second)
1233 Moose::out << entry.first << "\tobject\t" << obj->name() << "\t" << obj->_classname << "\t"
1234 << obj->_file << "\n";
1235
1236 auto & actmap = Registry::allActions();
1237 for (auto & entry : actmap)
1238 {
1239 for (auto & act : entry.second)
1240 Moose::out << entry.first << "\taction\t" << act->_name << "\t" << act->_classname << "\t"
1241 << act->_file << "\n";
1242 }
1243 _early_exit_param = "--registry";
1244 _ready_to_exit = true;
1245 }
1246 else if (getParam<bool>("registry_hit"))
1247 {
1249
1250 Moose::out << "### START REGISTRY DATA ###\n";
1251
1252 hit::Section root("");
1253 auto sec = new hit::Section("registry");
1254 root.addChild(sec);
1255 auto objsec = new hit::Section("objects");
1256 sec->addChild(objsec);
1257
1258 auto & objmap = Registry::allObjects();
1259 for (auto & entry : objmap)
1260 for (auto & obj : entry.second)
1261 {
1262 auto ent = new hit::Section("entry");
1263 objsec->addChild(ent);
1264 ent->addChild(new hit::Field("label", hit::Field::Kind::String, entry.first));
1265 ent->addChild(new hit::Field("type", hit::Field::Kind::String, "object"));
1266 ent->addChild(new hit::Field("name", hit::Field::Kind::String, obj->name()));
1267 ent->addChild(new hit::Field("class", hit::Field::Kind::String, obj->_classname));
1268 ent->addChild(new hit::Field("file", hit::Field::Kind::String, obj->_file));
1269 }
1270
1271 auto actsec = new hit::Section("actions");
1272 sec->addChild(actsec);
1273 auto & actmap = Registry::allActions();
1274 for (auto & entry : actmap)
1275 for (auto & act : entry.second)
1276 {
1277 auto ent = new hit::Section("entry");
1278 actsec->addChild(ent);
1279 ent->addChild(new hit::Field("label", hit::Field::Kind::String, entry.first));
1280 ent->addChild(new hit::Field("type", hit::Field::Kind::String, "action"));
1281 ent->addChild(new hit::Field("task", hit::Field::Kind::String, act->_name));
1282 ent->addChild(new hit::Field("class", hit::Field::Kind::String, act->_classname));
1283 ent->addChild(new hit::Field("file", hit::Field::Kind::String, act->_file));
1284 }
1285
1286 Moose::out << root.render();
1287
1288 Moose::out << "\n### END REGISTRY DATA ###\n";
1289 _early_exit_param = "--registry_hit";
1290 _ready_to_exit = true;
1291 }
1292 else if (getParam<bool>("yaml") || isParamSetByUser("yaml_search"))
1293 {
1294 const std::string search =
1295 isParamSetByUser("yaml_search") ? getParam<std::string>("yaml_search") : "";
1297
1299 _builder.buildFullTree(search);
1300
1301 _early_exit_param = "--yaml";
1302 _ready_to_exit = true;
1303 }
1304 else if (getParam<bool>("json") || isParamSetByUser("json_search"))
1305 {
1306 const std::string search =
1307 isParamSetByUser("json_search") ? getParam<std::string>("json_search") : "";
1309
1310 JsonSyntaxTree tree(search);
1312
1314 "json", "**START JSON DATA**\n", "\n**END JSON DATA**", tree.getRoot().dump(2));
1315 _early_exit_param = "--json";
1316 _ready_to_exit = true;
1317 }
1318 else if (getParam<bool>("syntax"))
1319 {
1321
1322 std::multimap<std::string, Syntax::ActionInfo> syntax = _syntax.getAssociatedActions();
1323 std::stringstream ss;
1324 for (const auto & it : syntax)
1325 ss << it.first << "\n";
1326 outputMachineReadableData("syntax", "**START SYNTAX DATA**\n", "**END SYNTAX DATA**", ss.str());
1327 _early_exit_param = "--syntax";
1328 _ready_to_exit = true;
1329 }
1330 else if (getParam<bool>("show_type"))
1331 {
1333
1334 Moose::out << "MooseApp Type: " << type() << std::endl;
1335 _early_exit_param = "--show-type";
1336 _ready_to_exit = true;
1337 }
1338 else if (getParam<bool>("show_capabilities"))
1339 {
1341 outputMachineReadableData("show_capabilities",
1342 "**START JSON DATA**\n",
1343 "\n**END JSON DATA**",
1345 _ready_to_exit = true;
1346 }
1347 else if (isParamValid("check_capabilities"))
1348 {
1350
1352 const auto & capabilities = getParam<std::string>("check_capabilities");
1353
1354 CapabilityRegistry::CheckResult result;
1355 try
1356 {
1357 result = Moose::internal::Capabilities::getCapabilities({}).check(capabilities);
1358 }
1359 catch (const std::exception & e)
1360 {
1361 mooseError("--check-capablities: ", e.what());
1362 }
1363
1364 const bool pass = result.state == CapabilityRegistry::CheckState::CERTAIN_PASS;
1365 _console << "Capabilities '" << capabilities << "' are " << (pass ? "" : "not ") << "fulfilled."
1366 << std::endl;
1367 _ready_to_exit = true;
1368 if (!pass)
1369 _exit_code = 77;
1370 return;
1371 }
1372 else if (!getInputFileNames().empty())
1373 {
1374 if (isParamSetByUser("recover"))
1375 {
1376 // We need to set the flag manually here since the recover parameter is a string type (takes
1377 // an optional filename)
1378 _recover = true;
1379 const auto & recover = getParam<std::string>("recover");
1380 if (recover.size())
1381 _restart_recover_base = recover;
1382 }
1383
1384 _builder.build();
1385
1386 // Lambda to check for mutually exclusive parameters
1387 auto isExclusiveParamSetByUser =
1388 [this](const std::vector<std::string> & group, const std::string & param)
1389 {
1390 auto is_set = isParamSetByUser(param);
1391 if (is_set)
1392 for (const auto & p : group)
1393 if (p != param && isParamSetByUser(p))
1394 mooseError("Parameters '" + p + "' and '" + param +
1395 "' are mutually exclusive. Please choose only one of them.");
1396 return is_set;
1397 };
1398
1399 // The following parameters set the final task and so are mutually exclusive.
1400 const std::vector<std::string> final_task_params = {
1401 "csg_only", "mesh_only", "split_mesh", "parse_neml2_only"};
1402 if (isExclusiveParamSetByUser(final_task_params, "csg_only"))
1403 {
1404 // Error checking on incompatible command line options
1406 mooseError("--csg-only cannot be used in conjunction with --distributed-mesh");
1407 const bool has_mesh_split = isParamSetByUser("split_file") || _use_split;
1408 if (has_mesh_split)
1409 mooseError("--csg-only is not compatible with any mesh splitting options");
1410 if (isParamSetByUser("refinements"))
1411 mooseError("--csg-only cannot be used in conjunction with -r refinements option");
1412 if (!isUltimateMaster())
1413 mooseError("--csg-only option cannot be used as a Subapp");
1414 if (_recover)
1415 mooseError("--csg-only option cannot be used in recovery mode");
1416
1417 _syntax.registerTaskName("execute_csg_generators", true);
1418 _syntax.addDependency("execute_csg_generators", "execute_mesh_generators");
1419 _syntax.addDependency("recover_meta_data", "execute_csg_generators");
1420
1421 _syntax.registerTaskName("csg_only", true);
1422 _syntax.addDependency("csg_only", "recover_meta_data");
1423 _syntax.addDependency("set_mesh_base", "csg_only");
1424 _action_warehouse.setFinalTask("csg_only");
1425 }
1426 else if (isExclusiveParamSetByUser(final_task_params, "mesh_only"))
1427 {
1428 // If we are looking to just check the input, there is no need to
1429 // call MeshOnlyAction and generate a mesh
1430 if (_check_input)
1431 _action_warehouse.setFinalTask("setup_mesh_complete");
1432 else
1433 {
1434 _syntax.registerTaskName("mesh_only", true);
1435 _syntax.addDependency("mesh_only", "setup_mesh_complete");
1436 _syntax.addDependency("determine_system_type", "mesh_only");
1437 _action_warehouse.setFinalTask("mesh_only");
1438 }
1439 }
1440 else if (isExclusiveParamSetByUser(final_task_params, "split_mesh"))
1441 {
1442 _split_mesh = true;
1443 _syntax.registerTaskName("split_mesh", true);
1444 _syntax.addDependency("split_mesh", "setup_mesh_complete");
1445 _syntax.addDependency("determine_system_type", "split_mesh");
1446 _action_warehouse.setFinalTask("split_mesh");
1447 }
1448 else if (isExclusiveParamSetByUser(final_task_params, "parse_neml2_only"))
1449 {
1450 _syntax.registerTaskName("parse_neml2");
1451 _syntax.addDependency("determine_system_type", "parse_neml2");
1452 _action_warehouse.setFinalTask("parse_neml2");
1453 }
1455
1456 // Setup the AppFileBase for use by the Outputs or other systems that need output file info
1457 {
1458 // Extract the CommonOutputAction
1459 const auto common_actions = _action_warehouse.getActions<CommonOutputAction>();
1460 mooseAssert(common_actions.size() <= 1, "Should not be more than one CommonOutputAction");
1461 const Action * common = common_actions.empty() ? nullptr : *common_actions.begin();
1462
1463 // If file_base is set in CommonOutputAction through parsing input, obtain the file_base
1464 if (common && common->isParamValid("file_base"))
1465 {
1466 _output_file_base = common->getParam<std::string>("file_base");
1468 }
1469 else if (isUltimateMaster())
1470 {
1471 // if this app is a master, we use the first input file name as the default file base.
1472 // use proximate here because the input file is an absolute path
1473 const auto & base = getLastInputFileName();
1474 size_t pos = base.find_last_of('.');
1475 _output_file_base = base.substr(0, pos);
1476 // Note: we did not append "_out" in the file base here because we do not want to
1477 // have it in between the input file name and the object name for Output/*
1478 // syntax.
1479 }
1480 // default file base for multiapps is set by MultiApp
1481 }
1482 }
1483 // No input file provided but we have other arguments (so don't just show print usage)
1484 else if (!isParamSetByUser("input_file") && _command_line->getArguments().size() > 2)
1485 {
1486 mooseAssert(getInputFileNames().empty(), "Should be empty");
1487
1488 if (_check_input)
1489 mooseError("You specified --check-input, but did not provide an input file. Add -i "
1490 "<inputfile> to your command line.");
1491
1492 mooseError("No input files specified. Add -i <inputfile> to your command line.");
1493 }
1494 else if (isParamValid("language_server") && getParam<bool>("language_server"))
1495 {
1497
1498 // Reset output to the buffer what was cached before it was turned it off
1499 if (!Moose::out.rdbuf() && _output_buffer_cache)
1500 Moose::out.rdbuf(_output_buffer_cache);
1501
1502 // Start a language server that communicates using an iostream connection
1503 MooseServer moose_server(*this);
1504
1505 moose_server.run();
1506
1507 _early_exit_param = "--language-server";
1508 _ready_to_exit = true;
1509 }
1510
1511 else /* The catch-all case for bad options or missing options, etc. */
1512 {
1513 _command_line->printUsage();
1514 _early_exit_param = "bad or missing";
1515 _ready_to_exit = true;
1516 _exit_code = 1;
1517 }
1518
1519 Moose::out << std::flush;
1520}
void setFinalTask(const std::string &task)
std::vector< const T * > getActions()
Retrieve all actions in a specific type ordered by their names.
Base class for actions.
Definition Action.h:38
Meta-action for creating common output object parameters This action serves two purpose,...
This class produces produces a dump of the InputParameters that appears like the normal input file sy...
std::string toString(const nlohmann::json &root)
Returns a string representation of the tree in input file format.
Holds the syntax in a Json::Value tree.
const std::vector< std::string > & getInputFileNames() const
Definition MooseApp.C:1523
std::string getPrintableVersion() const
Non-virtual method for printing out the version string in a consistent format.
Definition MooseApp.C:1024
void createMinimalApp()
Method for creating the minimum required actions for an application (no input file)
Definition MooseApp.C:2896
const std::string & getLastInputFileName() const
Definition MooseApp.C:1530
void setErrorOverridden()
Set a flag so that the parser will throw an error if overridden parameters are detected.
Definition MooseApp.C:2026
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:1845
void build()
Parse an input file (or text string if provided) consisting of hit syntax and setup objects in the MO...
Definition Builder.C:300
void buildJsonSyntaxTree(JsonSyntaxTree &tree) const
Use MOOSE Factories to construct a parameter tree for documentation or echoing input.
Definition Builder.C:417
void initSyntaxFormatter(SyntaxFormatterType type, bool dump_mode)
Creates a syntax formatter for printing.
Definition Builder.C:400
void buildFullTree(const std::string &search_string)
Use MOOSE Factories to construct a full parse tree for documentation or echoing input.
Definition Builder.C:577
Registry of capabilities that checks capability requirements.
const Capability & get(const std::string &capability) const
Get a capability.
void setActive(bool active)
Turn on or off timing.
Definition PerfGraph.h:129
void disableLivePrint()
Completely disables Live Print (cannot be restarted)
Definition PerfGraph.C:68
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:250
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:255
const std::multimap< std::string, ActionInfo > & getAssociatedActions() const
Return all Syntax to Action associations.
Definition Syntax.C:375
void registerTaskName(const std::string &task, bool should_auto_build=false)
Method to register a new task.
Definition Syntax.C:20
void addDependency(const std::string &task, const std::string &pre_req)
Definition Syntax.C:60
bool _deprecated_is_error
Variable to toggle only deprecated warnings as errors.
Definition Moose.C:921
bool setColorConsole(bool use_color, bool force=false)
Turns color escape sequences on/off for info written to stdout.
Definition Moose.C:877
bool _warnings_are_errors
Variable to toggle any warning into an error (includes deprecated code warnings)
Definition Moose.C:920
T command_line_value(const std::string &, T)

Referenced by run().

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

2177{
2178 if (getParam<bool>("show_inputs"))
2179 {
2180 const auto show_inputs_syntax = _pars.getCommandLineMetadata("show_inputs").switches;
2181 std::vector<std::string> dirs;
2182 const auto installable_inputs = getInstallableInputs();
2183
2184 if (installable_inputs == "")
2185 {
2186 Moose::out
2187 << "Show inputs has not been overriden in this application.\nContact the developers of "
2188 "this appication and request that they override \"MooseApp::getInstallableInputs\".\n";
2189 }
2190 else
2191 {
2192 mooseAssert(!show_inputs_syntax.empty(), "show_inputs sytnax should not be empty");
2193
2194 MooseUtils::tokenize(installable_inputs, dirs, 1, " ");
2195 Moose::out << "The following directories are installable into a user-writeable directory:\n\n"
2196 << installable_inputs << '\n'
2197 << "\nTo install one or more directories of inputs, execute the binary with the \""
2198 << show_inputs_syntax[0] << "\" flag. e.g.:\n$ "
2199 << _command_line->getExecutableName() << ' ' << show_inputs_syntax[0] << ' '
2200 << dirs[0] << '\n';
2201 }
2202 return true;
2203 }
2204 return false;
2205}
virtual std::string getInstallableInputs() const
Method to retrieve the installable inputs from a given applications <app>Revision....
Definition MooseApp.C:2208

Referenced by run().

◆ solutionInvalidity() [1/2]

SolutionInvalidity & MooseApp::solutionInvalidity ( )
inline

◆ solutionInvalidity() [2/2]

const SolutionInvalidity & MooseApp::solutionInvalidity ( ) const
inline

Definition at line 186 of file MooseApp.h.

186{ return _solution_invalidity; }

◆ syntax()

Syntax & MooseApp::syntax ( )
inline

◆ testCheckpointHalfTransient()

bool MooseApp::testCheckpointHalfTransient ( ) const
inline

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

Definition at line 524 of file MooseApp.h.

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

◆ testReStep()

bool MooseApp::testReStep ( ) const
inline

Whether or not this simulation should fail a timestep and repeat (for testing).

Selection rules for which time step to fail in TransientBase.C constructor.

Definition at line 530 of file MooseApp.h.

530{ return _test_restep; }

Referenced by Control::Control(), Executioner::Executioner(), Executioner::Executioner(), and TransientBase::TransientBase().

◆ theWarehouse()

TheWarehouse & MooseApp::theWarehouse ( )
inline

◆ 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 55 of file PerfGraphInterface.C.

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

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

◆ 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 93 of file MooseBase.h.

94 {
95 mooseAssert(_type.size(), "Empty type");
96 return _type;
97 }
const std::string & _type
The type of this class.
Definition MooseBase.h:378

Referenced by CreateProblemDefaultAction::act(), MaterialDerivativeTestAction::act(), MaterialOutputAction::act(), SetupDebugAction::act(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addConvergence(), FEProblemBase::addDistribution(), DistributedRectilinearMeshGenerator::addElement(), DistributedRectilinearMeshGenerator::addElement(), addExecutor(), addExecutorParams(), MFEMProblem::addFESpace(), MFEMProblem::addFESpaceHierarchy(), FEProblemBase::addFunction(), MFEMProblem::addFunction(), FEProblemBase::addMeshDivision(), addMeshGenerator(), MeshGenerator::addMeshSubgenerator(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMProblemComposer(), FEProblemBase::addObject(), DistributedRectilinearMeshGenerator::addPoint(), MFEMProblem::addPostprocessor(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), MFEMProblem::addQuadratureFunction(), FEProblemBase::addReporter(), FEProblemBase::addSampler(), WebServerControl::addServerActionsInternal(), FEProblemBase::addTimeIntegrator(), MFEMProblem::addVectorPostprocessor(), SubProblem::addVectorTag(), DisplacedProblem::addVectorTag(), FEProblemBase::advanceMultiApps(), appendMeshGenerator(), AuxKernelBase::AuxKernelBase(), FEProblemBase::backupMultiApps(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), BoundaryPreservedMarker::BoundaryPreservedMarker(), DistributedRectilinearMeshGenerator::buildCube(), MooseMesh::buildHRefinementAndCoarseningMaps(), MooseMesh::buildLowerDMesh(), MooseMesh::buildPRefinementAndCoarseningMaps(), PhysicsBase::checkComponentType(), MeshGenerator::checkGetMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), ActionComponent::checkRequiredTasks(), PhysicsBase::checkRequiredTasks(), FEProblemBase::checkUserObjectNameCollision(), MFEMMultiAppTransfer::checkValidTransferProblemTypes(), MeshInfo::CombinedInfos< ElemInfoMap, ElemInfoItems >::CombinedInfos(), ElemElemConstraint::computeElemNeighJacobian(), ArrayDGKernel::computeElemNeighJacobian(), DGKernel::computeElemNeighJacobian(), ADDGKernel::computeElemNeighJacobian(), ElemElemConstraint::computeElemNeighResidual(), ArrayDGKernel::computeElemNeighResidual(), DGKernel::computeElemNeighResidual(), ADDGKernel::computeElemNeighResidual(), ArrayDGLowerDKernel::computeLowerDJacobian(), DGLowerDKernel::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDJacobian(), LowerDIntegratedBC::computeLowerDJacobian(), ArrayLowerDIntegratedBC::computeLowerDOffDiagJacobian(), LowerDIntegratedBC::computeLowerDOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpJacobian(), HFEMDirichletBC::computeLowerDQpJacobian(), ArrayHFEMDiffusion::computeLowerDQpJacobian(), HFEMDiffusion::computeLowerDQpJacobian(), ArrayLowerDIntegratedBC::computeLowerDQpOffDiagJacobian(), ArrayDGLowerDKernel::computeLowerDQpOffDiagJacobian(), ArrayHFEMDirichletBC::computeLowerDQpOffDiagJacobian(), HFEMDirichletBC::computeLowerDQpOffDiagJacobian(), FEProblemBase::computeMultiAppsDT(), ArrayDGKernel::computeOffDiagElemNeighJacobian(), DGKernel::computeOffDiagElemNeighJacobian(), ADDGKernel::computeOffDiagElemNeighJacobian(), ArrayDGLowerDKernel::computeOffDiagLowerDJacobian(), DGLowerDKernel::computeOffDiagLowerDJacobian(), ScalarKernel::computeQpJacobian(), CoupledTiedValueConstraint::computeQpJacobian(), EqualValueBoundaryConstraint::computeQpJacobian(), LinearNodalConstraint::computeQpJacobian(), TiedValueConstraint::computeQpJacobian(), DGConvection::computeQpJacobian(), ArrayDGDiffusion::computeQpJacobian(), DGDiffusion::computeQpJacobian(), InterfaceDiffusion::computeQpJacobian(), InterfaceReaction::computeQpJacobian(), CoupledTiedValueConstraint::computeQpOffDiagJacobian(), ArrayDGKernel::computeQpOffDiagJacobian(), HFEMTestJump::computeQpOffDiagJacobian(), HFEMTrialJump::computeQpOffDiagJacobian(), ScalarKernel::computeQpResidual(), CoupledTiedValueConstraint::computeQpResidual(), EqualValueBoundaryConstraint::computeQpResidual(), LinearNodalConstraint::computeQpResidual(), TiedValueConstraint::computeQpResidual(), DGConvection::computeQpResidual(), ADDGAdvection::computeQpResidual(), ADDGDiffusion::computeQpResidual(), DGDiffusion::computeQpResidual(), HFEMDiffusion::computeQpResidual(), HFEMTestJump::computeQpResidual(), HFEMTrialJump::computeQpResidual(), ADMatInterfaceReaction::computeQpResidual(), InterfaceDiffusion::computeQpResidual(), InterfaceReaction::computeQpResidual(), ArrayDGDiffusion::computeQpResidual(), ArrayHFEMDiffusion::computeQpResidual(), FEProblemBase::computeSystems(), FEProblemBase::computeUserObjectByName(), FEProblemBase::computeUserObjects(), FEProblemBase::computeUserObjectsInternal(), FEProblemBase::createQRules(), DisplacedProblem::createQRules(), createRecoverablePerfGraph(), MeshGenerator::declareMeshProperty(), DumpObjectsProblem::deduceNecessaryParameters(), DumpObjectsProblem::dumpObjectHelper(), FEProblemBase::duplicateVariableCheck(), FEProblemBase::execMultiAppTransfers(), SteadyBase::execute(), WebServerControl::execute(), ActionWarehouse::executeActionsWithAction(), FEProblemBase::finishMultiAppStep(), FVScalarLagrangeMultiplierInterface::FVScalarLagrangeMultiplierInterface(), Boundary2DDelaunayGenerator::General2DDelaunay(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), Boundary2DDelaunayGenerator::generate(), LowerDBlockFromSidesetGenerator::generate(), SubdomainPerElementGenerator::generate(), PatternedMeshGenerator::generate(), MeshGenerator::generateInternal(), MeshGenerator::generateInternalCSG(), MultiAppTransfer::getAppInfo(), TransfiniteMeshGenerator::getEdge(), ElementGenerator::getElemType(), FEProblemBase::getMaterial(), FEProblemBase::getMaterialData(), FEProblemBase::getMaterialPropertyStorageConsumers(), MaterialOutputAction::getParams(), ReporterData::getReporterInfo(), MooseServer::getSyntaxMetadata(), FEProblemBase::getTransfers(), FEProblemBase::getUOQuery(), SubProblem::getVectorTags(), DisplacedProblem::getVectorTags(), EqualValueBoundaryConstraint::ghostPrimary(), CommonOutputAction::hasConsole(), FEProblemBase::hasMultiApps(), AdvancedOutput::hasOutput(), FEProblemBase::incrementMultiAppTStep(), NEML2Action::inferMOOSEIOType(), AdvancedOutput::initAvailableLists(), FunctorPositions::initialize(), FunctorTimes::initialize(), LinearFVAdvection::initialSetup(), LinearFVAnisotropicDiffusion::initialSetup(), LinearFVDiffusion::initialSetup(), MultiAppConservativeTransfer::initialSetup(), ArrayDGDiffusion::initQpResidual(), AdvancedOutput::initShowHideLists(), RelationshipManager::isType(), FEProblemBase::logAdd(), MaterialFunctorConverterTempl< T >::MaterialFunctorConverterTempl(), MooseObject::MooseObject(), SubProblem::numVectorTags(), DisplacedProblem::numVectorTags(), AdvancedOutput::output(), Console::output(), ConsoleUtils::outputExecutionInformation(), Output::outputStep(), SampledOutput::outputStep(), FEProblemBase::outputStep(), MooseServer::parseDocumentForDiagnostics(), PointInUnionCheckUO::PointInUnionCheckUO(), MooseMesh::prepare(), ProjectedStatefulMaterialStorageAction::processProperty(), recursivelyCreateExecutors(), SolutionInvalidInterface::registerInvalidSolutionInternal(), FEProblemBase::restoreMultiApps(), MeshRepairGenerator::separateSubdomainsByElementType(), FEProblemBase::setCoupling(), setupOptions(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), Reporter::store(), MooseBase::typeAndName(), AuxScalarKernel::uOld(), ScalarKernelBase::uOld(), DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), UserObjectInterface::userObjectType(), and AdvancedOutput::wantOutput().

◆ 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 57 of file MooseBase.C.

58{
59 return type() + std::string(" \"") + name() + std::string("\"");
60}

Referenced by MaterialPropertyStorage::addProperty(), FEProblemBase::checkUserObjectNameCollision(), MeshGeneratorSystem::dataDrivenError(), ReporterContext< T >::finalize(), ReporterData::getReporterInfo(), MFEMSamplerBase::initialSetup(), MFEMVariableSamplerBase::initialSetup(), WebServerControl::outputMessage(), and Action::timedAct().

◆ uniqueName()

MooseObjectName MooseBase::uniqueName ( ) const
inherited
Returns
The unique name for accessing input parameters of this object in the InputParameterWarehouse

Definition at line 69 of file MooseBase.C.

70{
71 if (!_pars.have_parameter<std::string>(unique_name_param))
72 mooseError("uniqueName(): Object does not have a unique name");
73 return MooseObjectName(_pars.get<std::string>(unique_name_param));
74}
static const std::string unique_name_param
The name of the parameter that contains the unique object name.
Definition MooseBase.h:57
A class for storing the names of MooseObject by tag and object name.

Referenced by MooseBase::connectControllableParams(), and Action::uniqueActionName().

◆ uniqueParameterName()

MooseObjectParameterName MooseBase::uniqueParameterName ( const std::string &  parameter_name) const
inherited
Returns
The unique parameter name of a valid parameter of this object for accessing parameter controls

Definition at line 63 of file MooseBase.C.

64{
65 return MooseObjectParameterName(getBase(), name(), parameter_name);
66}
const std::string & getBase() const
Definition MooseBase.h:147

◆ unusedFlagIsError()

bool MooseApp::unusedFlagIsError ( ) const
inline

Returns whether the flag for unused parameters is set to throw an error.

Definition at line 1120 of file MooseApp.h.

Referenced by MeshOnlyAction::act(), and PhysicsBase::reportPotentiallyMissedParameters().

◆ unusedFlagIsWarning()

bool MooseApp::unusedFlagIsWarning ( ) const
inline

Returns whether the flag for unused parameters is set to throw a warning only.

Definition at line 1117 of file MooseApp.h.

1117{ return _enable_unused_check == WARN_UNUSED; }

Referenced by MeshOnlyAction::act(), and PhysicsBase::reportPotentiallyMissedParameters().

◆ useEigenvalue()

bool & MooseApp::useEigenvalue ( )
inline

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

Definition at line 402 of file MooseApp.h.

402{ return _use_eigen_value; }

Referenced by CreateProblemDefaultAction::act().

◆ useExecutor()

bool MooseApp::useExecutor ( ) const
inline

Definition at line 343 of file MooseApp.h.

343{ return _use_executor; }

◆ useMasterMesh()

bool MooseApp::useMasterMesh ( ) const
inline

Returns whether to use the parent app mesh as the mesh for this app.

Definition at line 871 of file MooseApp.h.

871{ return _use_master_mesh; }

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

◆ useNonlinear()

bool & MooseApp::useNonlinear ( )
inline

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

Definition at line 397 of file MooseApp.h.

397{ return _use_nonlinear; }

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

◆ validParams()

InputParameters MooseApp::validParams ( )
static

Definition at line 275 of file MooseApp.C.

276{
278
279 MooseApp::addAppParam(params);
281
282 params.addCommandLineParam<bool>("display_version", "-v --version", "Print application version");
283
284 params.addOptionalValuedCommandLineParam<std::string>(
285 "mesh_only",
286 "--mesh-only <optional path>",
287 "",
288 "Build and output the mesh only (Default: \"<input_file_name>_in.e\")");
289 params.addOptionalValuedCommandLineParam<std::string>(
290 "csg_only",
291 "--csg-only <optional path>",
292 "",
293 "Setup and output the input mesh in CSG format only (Default: "
294 "\"<input_file_name>_out_csg.json\")");
295 params.addCommandLineParam<bool>(
296 "show_actions",
297 "--show-actions",
298 "Shows the list of Actions as they execute, in order of execution");
299 params.setGlobalCommandLineParam("show_actions");
300 params.addCommandLineParam<bool>(
301 "show_input", "--show-input", "Shows the parsed input file before running the simulation");
302 params.setGlobalCommandLineParam("show_input");
303 params.addCommandLineParam<bool>(
304 "show_outputs", "--show-outputs", "Shows the output execution time information");
305 params.setGlobalCommandLineParam("show_outputs");
306 params.addCommandLineParam<bool>(
307 "show_controls", "--show-controls", "Shows the Control logic available and executed");
308 params.setGlobalCommandLineParam("show_controls");
309
310 params.addCommandLineParam<bool>(
311 "no_color", "--no-color", "Disable coloring of all Console outputs");
312 params.setGlobalCommandLineParam("no_color");
313
314 MooseEnum colors("auto on off", "on");
316 "color", "--color <auto,on,off=on>", colors, "Whether to use color in console output");
317 params.setGlobalCommandLineParam("color");
318
319 params.addCommandLineParam<bool>("help", "-h --help", "Displays CLI usage statement");
320 params.addCommandLineParam<bool>(
321 "minimal",
322 "--minimal",
323 "Ignore input file and build a minimal application with Transient executioner");
324
325 params.addCommandLineParam<bool>(
326 "language_server",
327 "--language-server",
328 "Starts a process to communicate with development tools using the language server protocol");
329
330 params.addCommandLineParam<bool>("dump", "--dump", "Shows a dump of available input file syntax");
331 params.addCommandLineParam<std::string>(
332 "dump_search",
333 "--dump-search <search>",
334 "Shows a dump of available input syntax matching a search");
335 params.addCommandLineParam<bool>("registry", "--registry", "Lists all known objects and actions");
336 params.addCommandLineParam<bool>(
337 "registry_hit", "--registry-hit", "Lists all known objects and actions in hit format");
338 params.addCommandLineParam<bool>(
339 "use_executor", "--executor", "Use the new Executor system instead of Executioners");
340
341 params.addCommandLineParam<bool>(
342 "show_type", "--show-type", "Return the name of the application object");
343 params.addCommandLineParam<bool>("yaml", "--yaml", "Dumps all input file syntax in YAML format");
344 params.addCommandLineParam<std::string>(
345 "yaml_search", "--yaml-search", "Dumps input file syntax matching a search in YAML format");
346 params.addCommandLineParam<bool>("json", "--json", "Dumps all input file syntax in JSON format");
347 params.addCommandLineParam<std::string>(
348 "json_search", "--json-search", "Dumps input file syntax matching a search in JSON format");
349 params.addCommandLineParam<bool>(
350 "syntax", "--syntax", "Dumps the associated Action syntax paths ONLY");
351 params.addCommandLineParam<bool>(
352 "show_docs", "--docs", "Print url/path to the documentation website");
353 params.addCommandLineParam<bool>(
354 "show_capabilities", "--show-capabilities", "Dumps the capability registry in JSON format.");
355 params.addCommandLineParam<std::string>(
356 "required_capabilities",
357 "--required-capabilities",
358 "A list of conditions that is checked against the registered capabilities (see "
359 "--show-capabilities). The executable will terminate early if the conditions are not met.");
360 params.addCommandLineParam<std::string>(
361 "testharness_capabilities",
362 "--testharness-capabilities",
363 "Path to JSON from the TestHarness that contains capabilities to be appended.");
364
365 params.addCommandLineParam<std::string>(
366 "check_capabilities",
367 "--check-capabilities",
368 "A list of conditions that is checked against the registered capabilities. Will exit based "
369 "on whether or not the capaiblities are fulfilled. Does not check dynamically loaded apps.");
370 params.addCommandLineParam<bool>("check_input",
371 "--check-input",
372 "Check the input file (i.e. requires -i <filename>) and quit");
373 params.setGlobalCommandLineParam("check_input");
374 params.addCommandLineParam<bool>(
375 "show_inputs",
376 "--show-copyable-inputs",
377 "Shows the directories able to be copied into a user-writable location");
378
379 params.addCommandLineParam<std::string>(
380 "copy_inputs",
381 "--copy-inputs <dir>",
382 "Copies installed inputs (e.g. tests, examples, etc.) to a directory <appname>_<dir>");
383 // TODO: Should this remain a bool? It can't be a regular argument because it contains
384 // values that have dashes in it, so it'll get treated as another arg
385 params.addOptionalValuedCommandLineParam<std::string>(
386 "run",
387 "--run <test harness args>",
388 "",
389 "Runs the inputs in the current directory copied to a "
390 "user-writable location by \"--copy-inputs\"");
391
392 params.addCommandLineParam<bool>(
393 "list_constructed_objects",
394 "--list-constructed-objects",
395 "List all moose object type names constructed by the master app factory");
396
397 params.addOptionalValuedCommandLineParam<std::string>(
398 "citations",
399 "--citations [file]",
400 "",
401 "List the papers (in BibTeX format) that should be cited for the framework, PETSc, and the "
402 "modules and objects used in this simulation; optionally write them to [file] instead of the "
403 "console");
404
405 params.addCommandLineParam<unsigned int>(
406 "n_threads", "--n-threads=<n>", "Runs the specified number of threads per process");
407 // This probably shouldn't be global, but the implications of removing this are currently
408 // unknown and we need to manage it with libmesh better
409 params.setGlobalCommandLineParam("n_threads");
410
411 params.addCommandLineParam<bool>("allow_unused",
412 "-w --allow-unused",
413 "Warn about unused input file options instead of erroring");
414 params.setGlobalCommandLineParam("allow_unused");
415 params.addCommandLineParam<bool>(
416 "error_unused", "-e --error-unused", "Error when encountering unused input file options");
417 params.setGlobalCommandLineParam("error_unused");
418 params.addCommandLineParam<bool>(
419 "error_override",
420 "-o --error-override",
421 "Error when encountering overridden or parameters supplied multiple times");
422 params.setGlobalCommandLineParam("error_override");
423 params.addCommandLineParam<bool>(
424 "error_deprecated", "--error-deprecated", "Turn deprecated code messages into Errors");
425 params.setGlobalCommandLineParam("error_deprecated");
426
427 params.addCommandLineParam<bool>("distributed_mesh",
428 "--distributed-mesh",
429 "Forces the use of a distributed finite element mesh");
430 // Would prefer that this parameter isn't global, but we rely on it too much
431 // in tests to be able to go back on that decision now
432 params.setGlobalCommandLineParam("distributed_mesh");
433
434 params.addCommandLineParam<std::string>(
435 "split_mesh",
436 "--split-mesh <splits>",
437 "Comma-separated list of numbers of chunks to split the mesh into");
438
439 // TODO: remove the logic now that this is global
440 params.addCommandLineParam<std::string>(
441 "split_file", "--split-file <filename>", "Name of split mesh file(s) to write/read");
442
443 params.addCommandLineParam<bool>("use_split", "--use-split", "Use split distributed mesh files");
444
445 params.addCommandLineParam<unsigned int>(
446 "refinements", "-r <num refinements>", "Specify additional initial uniform mesh refinements");
447
448 params.addOptionalValuedCommandLineParam<std::string>(
449 "recover",
450 "--recover <optional file base>",
451 "",
452 "Continue the calculation. Without <file base>, the most recent recovery file will be used");
453 params.setGlobalCommandLineParam("recover");
454 params.addCommandLineParam<bool>(
455 "force_restart",
456 "--force-restart",
457 "Forcefully load checkpoints despite possible incompatibilities");
458 params.setGlobalCommandLineParam("force_restart");
459
460 params.addCommandLineParam<bool>("suppress_header",
461 "--suppress-header",
462 false,
463 "Disables the output of the application header.");
464 params.setGlobalCommandLineParam("suppress_header");
465
466 params.addCommandLineParam<bool>(
467 "test_checkpoint_half_transient",
468 "--test-checkpoint-half-transient",
469 "Run half of a transient with checkpoints enabled; used by the TestHarness");
470 params.setGlobalCommandLineParam("test_checkpoint_half_transient");
471
472 params.addCommandLineParam<bool>("test_restep",
473 "--test-restep",
474 "Test re-running the middle timestep; used by the TestHarness");
475
476 params.addCommandLineParam<bool>(
477 "trap_fpe",
478 "--trap-fpe",
479 "Enable floating point exception handling in critical sections of code"
480#ifdef DEBUG
481 " (automatic due to debug build)"
482#endif
483 );
484 params.setGlobalCommandLineParam("trap_fpe");
485
486 params.addCommandLineParam<bool>(
487 "no_trap_fpe",
488 "--no-trap-fpe",
489 "Disable floating point exception handling in critical sections of code"
490#ifndef DEBUG
491 " (unused due to non-debug build)"
492#endif
493 );
494
495 params.setGlobalCommandLineParam("no_trap_fpe");
496
497 params.addCommandLineParam<bool>(
498 "no_gdb_backtrace", "--no-gdb-backtrace", "Disables gdb backtraces.");
499 params.setGlobalCommandLineParam("no_gdb_backtrace");
500
501 params.addCommandLineParam<bool>("error", "--error", "Turn all warnings into errors");
502 params.setGlobalCommandLineParam("error");
503
504 params.addCommandLineParam<bool>("timing",
505 "-t --timing",
506 "Enable all performance logging for timing; disables screen "
507 "output of performance logs for all Console objects");
508 params.setGlobalCommandLineParam("timing");
509 params.addCommandLineParam<bool>(
510 "no_timing", "--no-timing", "Disabled performance logging; overrides -t or --timing");
511 params.setGlobalCommandLineParam("no_timing");
512
513 params.addCommandLineParam<bool>(
514 "allow_test_objects", "--allow-test-objects", "Register test objects and syntax");
515 params.setGlobalCommandLineParam("allow_test_objects");
516
517 // Options ignored by MOOSE but picked up by libMesh, these are here so that they are displayed in
518 // the application help
519 params.addCommandLineParam<bool>(
520 "keep_cout",
521 "--keep-cout",
522 "Keep standard output from all processors when running in parallel");
523 params.setGlobalCommandLineParam("keep_cout");
524 params.addCommandLineParam<bool>(
525 "redirect_stdout",
526 "--redirect-stdout",
527 "Keep standard output from all processors when running in parallel");
528 params.setGlobalCommandLineParam("redirect_stdout");
529
530 params.addCommandLineParam<std::string>(
531 "timpi_sync",
532 "--timpi-sync <type=nbx>",
533 "nbx",
534 "Changes the sync type used in spare parallel communitations within TIMPI");
535 params.setGlobalCommandLineParam("timpi_sync");
536
537 // Options for debugging
538 params.addCommandLineParam<std::string>("start_in_debugger",
539 "--start-in-debugger <debugger>",
540 "Start the application and attach a debugger; this will "
541 "launch xterm windows using <debugger>");
542
543 params.addCommandLineParam<unsigned int>(
544 "stop_for_debugger",
545 "--stop-for-debugger <seconds>",
546 "Pauses the application during startup for <seconds> to allow for connection of debuggers");
547
548 params.addCommandLineParam<bool>(
549 "perf_graph_live_all", "--perf-graph-live-all", "Forces printing of ALL progress messages");
550 params.setGlobalCommandLineParam("perf_graph_live_all");
551
552 params.addCommandLineParam<bool>(
553 "disable_perf_graph_live", "--disable-perf-graph-live", "Disables PerfGraph live printing");
554 params.setGlobalCommandLineParam("disable_perf_graph_live");
555
556 params.addParam<bool>(
557 "automatic_automatic_scaling", false, "Whether to turn on automatic scaling by default");
558
559 const MooseEnum compute_device_type("cpu cuda mps hip ceed-cpu ceed-cuda ceed-hip xpu", "cpu");
561 "compute_device",
562 "--compute-device",
563 compute_device_type,
564 "The device type we want to run accelerated (libtorch, MFEM) computations on.");
565
566#ifdef HAVE_GPERFTOOLS
567 params.addCommandLineParam<std::string>(
568 "gperf_profiler_on",
569 "--gperf-profiler-on <ranks>",
570 "To generate profiling report only on comma-separated list of MPI ranks");
571#endif
572
573 params.addCommandLineParam<bool>(
574 "show_data_params",
575 "--show-data-params",
576 false,
577 "Show found paths for all DataFileName parameters in the header");
578 params.addCommandLineParam<bool>("show_data_paths",
579 "--show-data-paths",
580 false,
581 "Show registered data paths for searching in the header");
582
583 params.addPrivateParam<std::shared_ptr<CommandLine>>("_command_line");
584 params.addPrivateParam<std::shared_ptr<Parallel::Communicator>>("_comm");
585 params.addPrivateParam<unsigned int>("_multiapp_level");
586 params.addPrivateParam<unsigned int>("_multiapp_number");
587 params.addPrivateParam<bool>("_use_master_mesh", false);
588 params.addPrivateParam<const MooseMesh *>("_master_mesh");
589 params.addPrivateParam<const MooseMesh *>("_master_displaced_mesh");
590 params.addPrivateParam<std::unique_ptr<Backup> *>("_initial_backup", nullptr);
591 params.addPrivateParam<std::shared_ptr<Parser>>("_parser");
592#ifdef MOOSE_MFEM_ENABLED
593 params.addPrivateParam<std::shared_ptr<mfem::Device>>("_mfem_device");
594 params.addPrivateParam<std::set<std::string>>("_mfem_devices");
595#endif
596
597 params.addParam<bool>(
598 "use_legacy_material_output",
599 true,
600 "Set false to allow material properties to be output on INITIAL, not just TIMESTEP_END.");
601 params.addParam<bool>(
602 "use_legacy_initial_residual_evaluation_behavior",
603 true,
604 "The legacy behavior performs an often times redundant residual evaluation before the "
605 "solution modifying objects are executed prior to the initial (0th nonlinear iteration) "
606 "residual evaluation. The new behavior skips that redundant residual evaluation unless the "
607 "parameter Executioner/use_pre_SMO_residual is set to true.");
608
609 params.addParam<bool>(
611 false,
612 "Set true to enable data-driven mesh generation, which is an experimental feature");
613
614 params.addCommandLineParam<bool>(
615 "parse_neml2_only",
616 "--parse-neml2-only",
617 "Executes the [NEML2] block to parse the input file and terminate.");
618
619 MooseApp::addAppParam(params);
620
621 params.registerBase("Application");
622
623 return params;
624}
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.
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.
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...
void registerBase(const std::string &value)
This method must be called from every base "Moose System" to create linkage with the Action System.
void setGlobalCommandLineParam(const std::string &name)
Sets the command line parameter with name as global.
static const std::string allow_data_driven_param
The name of the boolean parameter on the MooseApp that will enable data driven generation.
static void addAppParam(InputParameters &params)
Definition MooseApp.C:261
static void addInputParam(InputParameters &params)
Definition MooseApp.C:268
static InputParameters validParams()
Definition MooseBase.C:28

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

2559{
2560 if (processor_id() != 0)
2561 mooseError("MooseApp::writeRestartableMetaData(): Should only run on processor 0");
2562
2563 const auto & map_name = getRestartableDataMapName(name);
2564 const auto meta_data_folder_base = metaDataFolderBase(folder_base, map_name);
2565
2567 return writer.write(meta_data_folder_base);
2568}

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

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

2572{
2573 std::vector<std::filesystem::path> paths;
2574
2575 if (processor_id() == 0)
2576 for (const auto & name_map_pair : _restartable_meta_data)
2577 {
2578 const auto map_paths = writeRestartableMetaData(name_map_pair.first, folder_base);
2579 paths.insert(paths.end(), map_paths.begin(), map_paths.end());
2580 }
2581
2582 return paths;
2583}
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:2557

Friends And Related Symbol Documentation

◆ FEProblemBase

friend class FEProblemBase
friend

Definition at line 1755 of file MooseApp.h.

◆ Restartable

friend class Restartable
friend

Definition at line 1756 of file MooseApp.h.

◆ SubProblem

friend class SubProblem
friend

Definition at line 1757 of file MooseApp.h.

Member Data Documentation

◆ _action_factory

ActionFactory MooseApp::_action_factory
protected

The Factory responsible for building Actions.

Definition at line 1325 of file MooseApp.h.

Referenced by createMinimalApp(), and getActionFactory().

◆ _action_warehouse

ActionWarehouse MooseApp::_action_warehouse
protected

◆ _app

MooseApp& MooseBase::_app
protectedinherited

The MOOSE application this is associated with.

Definition at line 375 of file MooseBase.h.

Referenced by MooseBase::callMooseError(), MooseBase::connectControllableParams(), and MooseBase::getMooseApp().

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

Referenced by attachRelationshipManagers(), and attachRelationshipManagers().

◆ _automatic_automatic_scaling

const bool MooseApp::_automatic_automatic_scaling
private

Whether to turn on automatic scaling by default.

Definition at line 1712 of file MooseApp.h.

Referenced by defaultAutomaticScaling().

◆ _builder

Moose::Builder MooseApp::_builder
protected

Builder for building app related parser tree.

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

Referenced by getChainControlDataSystem().

◆ _check_input

const bool MooseApp::_check_input
protected

true if we want to just check the input file

Definition at line 1451 of file MooseApp.h.

Referenced by checkInput(), errorCheck(), 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 1294 of file MooseApp.h.

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

◆ _command_line

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

The CommandLine object.

Definition at line 1337 of file MooseApp.h.

Referenced by commandLine(), copyInputs(), executeExecutioner(), 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(), MaterialOutputAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), FEProblemBase::adaptMesh(), Adaptivity::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonConformingFaces(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MeshDiagnosticsGenerator::checkPolygons(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkResidualConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), CoarsenSurfaceMeshAlongSidesetGenerator::coarsenAlongSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), LinearSystem::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), TimeStepper::constrainStep(), IterationAdaptiveDT::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), MessageFromInput::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), SidesetAroundSubdomainUpdater::finalize(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), CoarsenBlockGenerator::generate(), CoarsenSurfaceMeshAlongSidesetGenerator::generate(), OrientSurfaceMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), SurfaceDelaunayGeneratorBase::meshNormalDeviation2D(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), Console::output(), DOFMapOutput::output(), MaterialPropertyDebugOutput::output(), PerfGraphOutput::output(), ReporterDebugOutput::output(), SolutionInvalidityOutput::output(), VariableResidualNormsDebugOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), PicardSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), LinearSystem::solve(), NonlinearSystem::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), EigenProblem::solve(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), MFEMTransient::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), FEProblemBase::updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _cpu_profiling

bool MooseApp::_cpu_profiling = false
private

CPU profiling.

Definition at line 1715 of file MooseApp.h.

◆ _distributed_mesh_on_command_line

const 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 1419 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 1407 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 1405 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 1416 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 1706 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 1364 of file MooseApp.h.

Referenced by attachRelationshipManagers(), collectCitations(), 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 1375 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 1370 of file MooseApp.h.

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

◆ _exit_code

int MooseApp::_exit_code
protected

The exit code.

Definition at line 1410 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 1300 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 1379 of file MooseApp.h.

Referenced by fixedPointConfig().

◆ _force_restart

const bool MooseApp::_force_restart
protected

Whether or not we are forcefully attempting to load checkpoints (–force-restart)

Definition at line 1434 of file MooseApp.h.

Referenced by forceRestart().

◆ _global_time_offset

Real MooseApp::_global_time_offset
protected

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

Definition at line 1315 of file MooseApp.h.

Referenced by getGlobalTimeOffset(), and setGlobalTimeOffset().

◆ _has_kokkos_gpus

bool MooseApp::_has_kokkos_gpus = false
private

Flag whether every process has an associated Kokkos GPU.

Definition at line 1773 of file MooseApp.h.

Referenced by isKokkosAvailable().

◆ _heap_profiling

bool MooseApp::_heap_profiling = false
private

Memory profiling.

Definition at line 1718 of file MooseApp.h.

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

Referenced by hasInitialBackup(), restoreFromInitialBackup(), and restoreMeshFromInitialBackup().

◆ _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 1413 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 1322 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 1727 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 1475 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 (converted from compute_device)

Definition at line 1743 of file MooseApp.h.

Referenced by getLibtorchDevice().

◆ _master_displaced_mesh

const MooseMesh* const MooseApp::_master_displaced_mesh
private

The displaced mesh from master app.

Definition at line 1689 of file MooseApp.h.

Referenced by masterDisplacedMesh().

◆ _master_mesh

const MooseMesh* const MooseApp::_master_mesh
private

The mesh from master app.

Definition at line 1686 of file MooseApp.h.

Referenced by masterMesh().

◆ _mesh_changed_for_backup

bool MooseApp::_mesh_changed_for_backup = false
private

Whether mesh topology has changed and should be included in Backup objects.

Definition at line 1739 of file MooseApp.h.

Referenced by markMeshChangedForBackup(), and meshChangedForBackup().

◆ _mesh_generator_system

MeshGeneratorSystem MooseApp::_mesh_generator_system
private

◆ _mfem_device

std::shared_ptr<mfem::Device> MooseApp::_mfem_device
private

The MFEM Device object.

Definition at line 1748 of file MooseApp.h.

Referenced by getMFEMDevice(), and setMFEMDevice().

◆ _mfem_devices

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

MFEM supported devices based on user-provided config.

Definition at line 1751 of file MooseApp.h.

Referenced by getMFEMDevices(), and setMFEMDevice().

◆ _multiapp_level

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

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

◆ _multiapp_number

const unsigned int MooseApp::_multiapp_number
private

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

Definition at line 1680 of file MooseApp.h.

Referenced by multiAppNumber().

◆ _name

const std::string& MooseBase::_name
protectedinherited

The name of this class.

Definition at line 381 of file MooseBase.h.

Referenced by AddFieldSplitAction::act(), AddBCAction::act(), AddConstraintAction::act(), AddControlAction::act(), AddConvergenceAction::act(), AddCorrectorAction::act(), AddDamperAction::act(), AddDGKernelAction::act(), AddDiracKernelAction::act(), AddDistributionAction::act(), AddFunctionAction::act(), AddFunctorMaterialAction::act(), AddFVBCAction::act(), AddFVGradientMethodAction::act(), AddFVInitialConditionAction::act(), AddFVInterfaceKernelAction::act(), AddFVInterpolationMethodAction::act(), AddFVKernelAction::act(), AddHDGKernelAction::act(), AddIndicatorAction::act(), AddInitialConditionAction::act(), AddInterfaceKernelAction::act(), AddKernelAction::act(), AddLinearFVBCAction::act(), AddLinearFVKernelAction::act(), AddMarkerAction::act(), AddMaterialAction::act(), AddMeshDivisionAction::act(), AddMeshGeneratorAction::act(), AddMeshModifiersAction::act(), AddMultiAppAction::act(), AddNodalKernelAction::act(), AddOutputAction::act(), AddPositionsAction::act(), AddPostprocessorAction::act(), AddReporterAction::act(), AddSamplerAction::act(), AddScalarKernelAction::act(), AddTimesAction::act(), AddTimeStepperAction::act(), AddTransferAction::act(), AddUserObjectAction::act(), AddVectorPostprocessorAction::act(), PartitionerAction::act(), ReadExecutorParamsAction::act(), SetupPreconditionerAction::act(), SetupTimeIntegratorAction::act(), AddMFEMComplexBCComponentAction::act(), AddMFEMComplexKernelComponentAction::act(), AddMFEMFESpaceAction::act(), AddMFEMFESpaceHierarchyAction::act(), AddMFEMProblemComposerAction::act(), AddMFEMQuadratureFunctionAction::act(), AddMFEMSolverAction::act(), AddMFEMSubMeshAction::act(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), BatchMeshGeneratorAction::BatchMeshGeneratorAction(), PiecewiseLinearBase::buildInterpolation(), CombinerGenerator::CombinerGenerator(), Executor::Executor(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), MultiApp::fillPositions(), CentroidMultiApp::fillPositions(), QuadraturePointMultiApp::fillPositions(), FunctionDT::FunctionDT(), FillBetweenCurvesGenerator::generate(), FillBetweenPointVectorsGenerator::generate(), FillBetweenSidesetsGenerator::generate(), MooseBase::MooseBase(), MooseBase::name(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ParsedFunctorMaterialTempl< is_ad >::ParsedFunctorMaterialTempl(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), PiecewiseBase::setData(), and AddVariableAction::varName().

◆ _null_executor

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

Used to return an executor that does nothing.

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

Referenced by setupOptions().

◆ _output_file_base

std::string MooseApp::_output_file_base
protected

The output file basename.

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

Referenced by getOutputFileNumbers(), and setOutputFileNumbers().

◆ _output_position

Point MooseApp::_output_position
protected

The output position.

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

Referenced by hasOutputPosition(), and setOutputPosition().

◆ _output_warehouse

OutputWarehouse MooseApp::_output_warehouse
protected

OutputWarehouse object for this App.

Definition at line 1331 of file MooseApp.h.

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

◆ _pars

const InputParameters& MooseBase::_pars
protectedinherited

The object's parameters.

Definition at line 384 of file MooseBase.h.

Referenced by AddAuxKernelAction::act(), AddFVICAction::act(), AddICAction::act(), CommonOutputAction::act(), ComposeTimeStepperAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), AddMFEMComplexBCComponentAction::act(), AddMFEMComplexKernelComponentAction::act(), FunctorMaterial::addFunctorPropertyByBlocks(), BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(), PNGOutput::calculateRescalingValues(), MooseBase::callMooseError(), MooseBase::connectControllableParams(), Console::Console(), copyInputs(), MaterialBase::declareADProperty(), Moose::Kokkos::MaterialBase::declareKokkosOnDemandProperty(), Moose::Kokkos::MaterialBase::declareKokkosProperty(), MaterialBase::declareProperty(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::generate(), MooseBase::getBase(), MooseBase::getCheckedPointerParam(), MaterialBase::getGenericZeroMaterialProperty(), MooseBase::getHitNode(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseBase::getParam(), MooseBase::getParam(), MooseBase::hasBase(), MeshGenerator::hasGenerateCSG(), MeshGenerator::hasGenerateData(), AddVariableAction::init(), AdvancedOutput::initExecutionTypes(), EigenProblemSolve::initialSetup(), Console::initialSetup(), MooseBase::isParamSetByUser(), MooseBase::isParamValid(), MultiApp::keepSolutionDuringRestore(), MooseBase::messagePrefix(), MooseBase::MooseBase(), MultiSystemSolveObject::MultiSystemSolveObject(), outputMachineReadableData(), MooseBase::paramError(), MooseBase::parameters(), MooseBase::paramInfo(), MooseBase::paramWarning(), MooseMesh::prepare(), MooseBase::queryParam(), MooseMesh::setCoordSystem(), MooseMesh::setPartitionerHelper(), SetupMeshAction::setupMesh(), TransientBase::setupTimeIntegrator(), showInputs(), and MooseBase::uniqueName().

◆ _parser

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

Parser for parsing the input file (owns the root hit node)

Definition at line 1334 of file MooseApp.h.

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

◆ _perf_graph

PerfGraph& MooseApp::_perf_graph
protected

The PerfGraph object for this application (recoverable)

Definition at line 1355 of file MooseApp.h.

Referenced by perfGraph(), and setupOptions().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 135 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 138 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 1361 of file MooseApp.h.

Referenced by rankMap().

◆ _rd_reader

RestartableDataReader MooseApp::_rd_reader
private

Definition at line 1697 of file MooseApp.h.

Referenced by finalizeRestore(), restore(), restore(), and restoreDataIfAvailable().

◆ _ready_to_exit

bool MooseApp::_ready_to_exit
protected

Definition at line 1408 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 1422 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 1352 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 1425 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 1440 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 1346 of file MooseApp.h.

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

◆ _restartable_meta_data

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

◆ _restored_initial_backup_mesh

bool MooseApp::_restored_initial_backup_mesh = false
private

Whether mesh topology has been restored from the initial Backup object.

Definition at line 1736 of file MooseApp.h.

Referenced by restore(), restoredInitialBackupMesh(), and restoreMeshFromInitialBackup().

◆ _solution_invalidity

SolutionInvalidity& MooseApp::_solution_invalidity
protected

The SolutionInvalidity object for this application.

Definition at line 1358 of file MooseApp.h.

Referenced by solutionInvalidity(), and solutionInvalidity().

◆ _split_mesh

bool MooseApp::_split_mesh
protected

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

Definition at line 1428 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 1312 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 1309 of file MooseApp.h.

Referenced by hasStartTime(), and setStartTime().

◆ _syntax

Syntax MooseApp::_syntax
protected

Syntax of the input file.

Definition at line 1318 of file MooseApp.h.

Referenced by setupOptions(), and syntax().

◆ _sys_info

SystemInfo MooseApp::_sys_info
protected

System Information.

Definition at line 1340 of file MooseApp.h.

Referenced by getSystemInfo().

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

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

◆ _test_checkpoint_half_transient

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

Referenced by testCheckpointHalfTransient().

◆ _test_restep

const bool MooseApp::_test_restep
protected

Whether or not this simulation should fail its middle timestep and repeat (for testing)

Definition at line 1445 of file MooseApp.h.

Referenced by testReStep().

◆ _the_warehouse

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

The combined warehouse for storing any MooseObject based object.

Definition at line 1674 of file MooseApp.h.

Referenced by theWarehouse().

◆ _trap_fpe

bool MooseApp::_trap_fpe
protected

Whether or not FPE trapping should be turned on.

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

◆ _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 1465 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 1392 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 1383 of file MooseApp.h.

Referenced by executeExecutioner(), and useExecutor().

◆ _use_master_mesh

const bool MooseApp::_use_master_mesh
private

Whether to use the parent app mesh for this app.

Definition at line 1683 of file MooseApp.h.

Referenced by useMasterMesh().

◆ _use_nonlinear

bool MooseApp::_use_nonlinear
protected

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

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

Referenced by setupOptions().

◆ app_param

const std::string MooseBase::app_param = "_moose_app"
staticinherited

◆ kokkos_object_param

const std::string MooseBase::kokkos_object_param = "_kokkos_object"
staticinherited

The name of the parameter that indicates an object is a Kokkos functor.

Definition at line 64 of file MooseBase.h.

Referenced by InputParameters::isKokkosObject().

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

◆ moose_base_param

const std::string MooseBase::moose_base_param = "_moose_base"
staticinherited

The name of the parameter that contains the moose system base.

Definition at line 61 of file MooseBase.h.

Referenced by InputParameters::getBase(), InputParameters::hasBase(), and InputParameters::registerBase().

◆ name_param

const std::string MooseBase::name_param = "_object_name"
staticinherited

◆ type_param

const std::string MooseBase::type_param = "_type"
staticinherited

◆ unique_name_param

const std::string MooseBase::unique_name_param = "_unique_name"
staticinherited

The name of the parameter that contains the unique object name.

Definition at line 57 of file MooseBase.h.

Referenced by InputParameterWarehouse::addInputParameters(), AppFactory::create(), InputParameterWarehouse::removeInputParameters(), MooseBase::uniqueName(), and MooseBase::validParams().


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