12 #ifdef MOOSE_LIBTORCH_ENABLED 14 #include <torch/types.h> 15 #include <torch/mps.h> 16 #include <torch/cuda.h> 17 #include <c10/core/DeviceType.h> 20 #ifdef MOOSE_MFEM_ENABLED 21 #include "libmesh/ignore_warnings.h" 23 #include "libmesh/restore_warnings.h" 49 #include "libmesh/parallel_object.h" 50 #include "libmesh/mesh_base.h" 51 #include "libmesh/point.h" 57 #include <unordered_set> 73 #ifdef MOOSE_MFEM_ENABLED 102 #ifdef MOOSE_LIBTORCH_ENABLED 141 if (
name.find_first_of(
"/") != std::string::npos)
142 name =
name.substr(
name.find_first_of(
"/") + 1, std::string::npos);
188 template <
typename T>
191 template <
typename T>
202 template <
typename T>
203 const T &
getRenamedParam(
const std::string & old_name,
const std::string & new_name)
const;
345 std::string
getFileName(
bool stripLeadingPath =
true)
const;
379 const std::string &
name,
521 "MooseApp::getRestartRecoverFileBase() instead.");
531 if (file_base.empty())
590 std::string library_path,
591 const std::string & library_name);
593 std::string library_path,
594 const std::string & library_name,
646 std::unique_ptr<RestartableDataValue> data,
676 const std::filesystem::path & folder_base);
688 std::vector<std::filesystem::path>
690 const std::filesystem::path & folder_base);
696 std::vector<std::filesystem::path>
745 std::vector<std::filesystem::path>
backup(
const std::filesystem::path & folder_base);
751 std::unique_ptr<Backup>
backup();
769 void restore(
const std::filesystem::path & folder_base,
const bool for_restart);
782 void restore(std::unique_ptr<Backup>
backup,
const bool for_restart);
820 virtual std::string
header()
const;
874 const std::string &
name,
968 static std::filesystem::path
metaDataFolderBase(
const std::filesystem::path & folder_base,
969 const std::string & map_suffix);
971 std::filesystem::path
restartFolderBase(
const std::filesystem::path & folder_base)
const;
988 bool attach_geometric_rm_final =
false);
1093 #ifdef MOOSE_MFEM_ENABLED 1123 bool load_dependencies =
true);
1151 const std::string & start_marker,
1152 const std::string & end_marker,
1153 const std::string & data)
const;
1157 const std::string & doc);
1159 addCapability(
const std::string & capability,
const char * value,
const std::string & doc);
1169 const std::shared_ptr<libMesh::Parallel::Communicator>
_comm;
1246 std::unordered_map<std::string, std::pair<std::string, std::unique_ptr<InputParameters>>>
1330 std::map<Moose::RelationshipManagerType, std::set<const RelationshipManager *>>
1337 std::unordered_map<RelationshipManager *, std::shared_ptr<libMesh::GhostingFunctor>>
1360 std::list<std::string> & possible_roots,
1361 std::list<std::string> & current_branch);
1382 #ifdef MOOSE_LIBTORCH_ENABLED 1452 const MeshBase & mesh)
const;
1512 std::unordered_map<RestartableDataMapName, std::pair<RestartableDataMap, std::string>>
1572 std::map<const MeshBase *, std::unique_ptr<RelationshipManager>>>
1584 #ifdef MOOSE_LIBTORCH_ENABLED 1589 #ifdef MOOSE_MFEM_ENABLED 1603 template <
typename T>
1610 template <
typename T>
1617 template <
typename T>
1634 "' is being retrieved without being set.\n" 1635 "Did you mispell it?");
1639 "' may not be provided alongside former parameter '" + old_name +
"'");
1646 static_assert(!std::is_base_of<MooseObject, T>::value,
"T is not an interface");
1652 auto new_registry = std::make_unique<InterfaceRegistryObjects<T>>();
1653 registry = new_registry.get();
1659 mooseAssert(std::count(registry->
_objects.begin(), registry->
_objects.end(), &interface) == 0,
1660 "Interface already registered");
1661 registry->
_objects.push_back(&interface);
1665 const std::vector<T *> &
1668 static_assert(!std::is_base_of<MooseObject, T>::value,
"T is not an interface");
1673 const static std::vector<T *> empty;
1677 #ifdef MOOSE_MFEM_ENABLED 1678 inline const std::set<std::string> &
std::list< std::string > getCheckpointFiles() const
Extract all possible checkpoint file names.
virtual bool constructingMeshGenerators() const
Whether this app is constructing mesh generators.
std::list< std::string > getCheckpointDirectories() const
Get all checkpoint directories.
bool _use_eigen_value
Boolean to indicate whether to use an eigenvalue executioner.
static const std::string & checkpointSuffix()
The file suffix for the checkpoint mesh.
std::string getFileName(bool stripLeadingPath=true) const
Return the primary (first) filename that was parsed Note: When stripLeadingPath is false...
void addExecutorParams(const std::string &type, const std::string &name, const InputParameters ¶ms)
Adds the parameters for an Executor to the list of parameters.
bool defaultAutomaticScaling() const
Whether to enable automatic scaling by default.
bool & useNonlinear()
Returns a writable Boolean indicating whether this app will use a Nonlinear or Eigen System...
virtual std::string getPrintableName() const
Get printable name of the application.
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
virtual std::string getInstallableInputs() const
Method to retrieve the installable inputs from a given applications <app>Revision.h file.
PerfGraph & _perf_graph
The PerfGraph object for this application (recoverable)
const std::set< std::string > & getMFEMDevices(Moose::PassKey< MultiApp >) const
Get the configured MFEM devices.
void setOutputPosition(const Point &p)
Tell the app to output in a specific position.
bool hasMeshGenerator(const MeshGeneratorName &name) const
std::vector< std::string > sub_transformed_vars
The names of variables to transform for fixed point solve algorithms (e.g. secant, etc.).
const std::string _type
The string representation of the type of this object as registered (see registerApp(AppName)) ...
A MultiMooseEnum object to hold "execute_on" flags.
void setExecutioner(std::shared_ptr< Executioner > &&executioner)
Set the Executioner for this App.
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> ...
A class for creating restricted objects.
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Stores configuration options relating to the fixed-point solving capability.
const MeshGenerator & getMeshGenerator(const std::string &name) const
std::map< Moose::RelationshipManagerType, std::set< const RelationshipManager * > > _attached_relationship_managers
The relationship managers that have been attached (type -> RMs)
auto getRestartableDataMapBegin()
Iterator based access to the extra RestartableDataMap objects; see Checkpoint.C for use case...
Reader for restartable data written by the RestartableDataWriter.
std::string _restart_recover_base
The base name to restart/recover from. If blank then we will find the newest checkpoint file...
void dynamicRegistration(const libMesh::Parameters ¶ms)
Helper method for dynamic loading of objects.
bool hasRestartableMetaData(const std::string &name, const RestartableDataMapName &metaname) const
std::vector< PostprocessorName > sub_transformed_pps
The names of postprocessors to transform for fixed point solve algorithms (e.g. secant, etc.).
virtual void setupOptions()
Setup options based on InputParameters.
PerfGraph & createRecoverablePerfGraph()
Creates a recoverable PerfGraph.
std::string libNameToAppName(const std::string &library_name) const
Converts a library name to an application name:
RelationshipManagerType
Main types of Relationship Managers.
void registerCapabilities()
Register all base MooseApp capabilities to the Moose::Capabilities registry.
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
std::string getFrameworkVersion() const
Returns the framework version.
Base class for everything in MOOSE with a name and a type.
void setRecover(bool value)
std::vector< std::pair< std::string, std::string > > getRelationshipManagerInfo() const
Returns the Relationship managers info suitable for printing.
void setExecutor(std::shared_ptr< Executor > &&executor)
Real _global_time_offset
Offset of the local App time to the "global" problem time.
bool hasOutputPosition() const
Whether or not an output position has been set.
bool hasRMClone(const RelationshipManager &template_rm, const MeshBase &mesh) const
torch::DeviceType determineLibtorchDeviceType(const MooseEnum &device) const
Function to determine the device which should be used by libtorch on this application.
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
const std::vector< RestartableDataMap > & getRestartableData() const
Return reference to the restartable data object.
bool _output_position_set
Whether or not an output position has been set for this app.
Generic factory class for build all sorts of objects.
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 num...
std::unique_ptr< TheWarehouse > _the_warehouse
The combined warehouse for storing any MooseObject based object.
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 ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
std::vector< std::string > getMeshGeneratorNames() const
bool hasInitialBackup() const
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)
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
bool _use_nonlinear
Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions) ...
static const RestartableDataMapName MESH_META_DATA
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.
FixedPointConfig & fixedPointConfig()
This info is stored here because we need a "globalish" place to put it in order to allow communicatio...
virtual std::string appBinaryName() const
std::string getOutputFileBase(bool for_non_moose_build_output=false) const
Get the output file base name.
const bool _use_master_mesh
Whether to use the parent app mesh for this app.
static void addInputParam(InputParameters ¶ms)
RelationshipManager & getRMClone(const RelationshipManager &template_rm, const MeshBase &mesh) const
Return the relationship manager clone originally created from the provided template relationship mana...
bool runInputs()
Handles the run input parameter logic: Checks to see whether a directory exists in user space and lau...
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
virtual void run()
Run the application.
void removeRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Purge this relationship manager from meshes and DofMaps and finally from us.
std::unique_ptr< libMesh::MeshBase > getSavedMesh(const std::string &name)
Get the saved mesh by name.
Real _start_time
The time at which to start the simulation.
void createExecutors()
After adding all of the Executor Params - this function will actually cause all of them to be built...
void recursivelyCreateExecutors(const std::string ¤t_executor_name, std::list< std::string > &possible_roots, std::list< std::string > ¤t_branch)
Internal function used to recursively create the executor objects.
Builds lists and maps that help in knowing which physical hardware nodes each rank is on...
std::vector< std::string > getMeshGeneratorNames() const
Get names of all mesh generators Note: This function should be called after all mesh generators are a...
bool forceRestart() const
Whether or not we are forcefully restarting (allowing the load of potentially incompatibie checkpoint...
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
const bool _use_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
void setMFEMDevice(const std::string &device_string, Moose::PassKey< MFEMExecutioner >)
Create/configure the MFEM device with the provided device_string.
unsigned int multiAppLevel() const
The MultiApp Level.
bool hasRelationshipManager(const std::string &name) const
Returns a Boolean indicating whether a RelationshipManater exists with the same name.
Base class for MOOSE-based applications.
Storage for action instances.
bool _check_input
true if we want to just check the input file
const std::vector< std::shared_ptr< RelationshipManager > > & getReleationshipManagers()
Retrieve the relationship managers.
const InputParameters & _pars
Parameters of this object.
bool isParamValid(const std::string &name) const
bool hasRestartableDataMap(const RestartableDataMapName &name) const
std::set< std::string > _mfem_devices
MFEM supported devices based on user-provided config.
Syntax _syntax
Syntax of the input file.
Syntax & syntax()
Returns a writable reference to the syntax object.
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
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.
bool _trap_fpe
Whether or not FPE trapping should be turned on.
int exitCode() const
Get the shell exit code for the application.
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Real getStartTime() const
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
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...
const hit::Node * getCurrentActionHitNode() const
ActionWarehouse _action_warehouse
Where built actions are stored.
RestartableDataReader _rd_reader
void checkMetaDataIntegrity() const
Function to check the integrity of the restartable meta data structure.
static InputParameters validParams()
bool isRestarting() const
Whether or not this is a "restart" calculation.
unsigned int multiAppNumber() const
The MultiApp number.
bool isSplitMesh() const
Whether or not this is a split mesh operation.
RestartableDataMap & getRestartableDataMap(const RestartableDataMapName &name)
Return a reference to restartable data for the specific type flag.
std::unique_ptr< SystemInfo > _sys_info
System Information.
ActionFactory & getActionFactory()
Retrieve a writable reference to the ActionFactory associated with this App.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const InputParameters & parameters()
Get the parameters of the object.
virtual const std::string & name() const
Get the name of the class.
SolutionInvalidity & _solution_invalidity
The SolutionInvalidity object for this application.
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 GhostingFun...
std::shared_ptr< libMesh::ExodusII_IO > _ex_reader
The Exodus reader when _initial_from_file is set to true.
FEProblemBase & feProblem() const
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
MooseApp(const InputParameters ¶meters)
Constructor is protected so that this object is constructed through the AppFactory object...
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
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 ...
void setOutputFileBase(const std::string &output_file_base)
Override the selection of the output file base name.
std::string getRecoverFileBase() const
const RankMap _rank_map
The RankMap is a useful object for determining how the processes are laid out on the physical hardwar...
This class wraps provides and tracks access to command line parameters.
void addMeshGenerator(const std::string &type, const std::string &name, const InputParameters ¶ms)
Add a mesh generator that will act on the meshes in the system.
int _exit_code
The exit code.
Storage for restartable data that is ordered based on insertion order.
bool checkInput() const
Returns whether the Application is running in check input mode.
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.
bool getExodusFileRestart() const
Whether or not we need to use a separate Exodus reader to read the mesh BEFORE we create the mesh...
const RankMap & rankMap()
The RankMap is a useful object for determining how the processes are laid out on the physical nodes o...
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
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 sup...
uint8_t processor_id_type
bool getDistributedMeshOnCommandLine() const
Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibilit...
bool _start_time_set
Whether or not an start time has been set.
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
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.
bool showInputs() const
Prints a message showing the installable inputs for a given application (if getInstallableInputs has ...
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
RestartableDataValue & getRestartableMetaData(const std::string &name, const RestartableDataMapName &metaname, THREAD_ID tid)
std::vector< RestartableDataMap > & getRestartableData()
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
bool & useEigenvalue()
Returns a writable Boolean indicating whether this app will use an eigenvalue executioner.
const std::string & getLastInputFileName() const
virtual void preBackup()
Insertion point for other apps that is called before backup()
void setErrorOverridden()
Set a flag so that the parser will throw an error if overridden parameters are detected.
const std::set< std::shared_ptr< RelationshipManager > > & relationshipManagers() const
Return the container of relationship managers.
virtual void postRestore(const bool)
Insertion point for other apps that is called after restore()
void loadLibraryAndDependencies(const std::string &library_filename, const libMesh::Parameters ¶ms, bool load_dependencies=true)
Recursively loads libraries and dependencies in the proper order to fully register a MOOSE applicatio...
std::shared_ptr< CommandLine > _command_line
Command line object.
bool _restart
Whether or not this is a restart run.
std::unique_ptr< Backup > backup()
Backs up the application memory in a Backup.
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
Moose::Builder & builder()
Returns a writable reference to the builder.
bool unusedFlagIsError() const
Returns whether the flag for unused parameters is set to throw an error.
const SystemInfo * getSystemInfo() const
Get SystemInfo object.
std::string getLatestCheckpointFilePrefix(const std::list< std::string > &checkpoint_files)
Returns the most recent checkpoint prefix (the four numbers at the beginning) If a suitable file isn'...
void setExodusFileRestart(bool flag)
Set the flag to indicate whether or not we need to use a separate Exodus reader to read the mesh BEFO...
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
Registration for interface objects.
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
std::unique_ptr< MeshBase > getMeshGeneratorMesh()
Specialized factory for generic Action System objects.
An inteface for the _console for outputting to the Console object.
void setRestart(bool value)
Sets the restart/recover flags.
TheWarehouse is a container for MooseObjects that allows querying/filtering over various customizeabl...
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
torch::DeviceType getLibtorchDevice() const
Get the device torch is supposed to be running on.
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 num...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
ActionFactory _action_factory
The Factory responsible for building Actions.
const std::string & type() const
Get the type of this class.
void restoreFromInitialBackup(const bool for_restart)
Restores from a "initial" backup, that is, one set in _initial_backup.
const ActionWarehouse & actionWarehouse() const
Return a const reference to the ActionWarehouse associated with this app.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Executioners are objects that do the actual work of solving your problem.
enum MooseApp::UNUSED_CHECK _enable_unused_check
bool _recover
Whether or not this is a recovery run.
Point _output_position
The output position.
const MooseMesh * masterMesh() const
Returns a pointer to the master mesh.
bool testCheckpointHalfTransient() const
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
std::vector< T * > _objects
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
libMesh::ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected...
virtual std::string getVersion() const
Returns the current version of the framework or application (default: framework version).
SolutionInvalidity & createRecoverableSolutionInvalidity()
Creates a recoverable SolutionInvalidity.
bool _heap_profiling
Memory profiling.
const MooseMesh *const _master_displaced_mesh
The displaced mesh from master app.
Class for storing and utilizing output objects.
Interface for objects interacting with the PerfGraph.
const bool _force_restart
Whether or not we are forcefully attempting to load checkpoints (–force-restart) ...
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
std::set< std::string > getLibrarySearchPaths(const std::string &library_path_from_param) const
Return the paths searched by MOOSE when loading libraries.
void setGlobalTimeOffset(Real offset)
Each App has it's own local time.
The SolutionInvalidity will contain all the information about the occurrence(s) of solution invalidit...
std::unordered_map< std::string, DynamicLibraryInfo > _lib_handles
The library archive (name only), registration method and the handle to the method.
void outputMachineReadableData(const std::string ¶m, 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...
Point getOutputPosition() const
Get the output position.
const MeshGenerator & appendMeshGenerator(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.
static std::string mainMeshGeneratorName()
The name reserved for the "main" mesh generator which is the one used for the numerical solver downst...
virtual ~InterfaceRegistryObjectsBase()
const std::string & getRestartableDataMapName(const RestartableDataMapName &name) const
FixedPointConfig _fixed_point_config
Multiapp-related fixed point algorithm configuration details primarily intended to be passed to and u...
const ExecFlagEnum _execute_flags
Execution flags for this App.
UNUSED_CHECK
Indicates whether warnings, errors, or no output is displayed when unused parameters are detected...
bool hasRecoverFileBase() const
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...
const MooseMesh * masterDisplacedMesh() const
Returns a pointer to the master displaced mesh.
bool hasRestartRecoverFileBase() const
Return true if the recovery file base is set.
void registerRestartableDataMapName(const RestartableDataMapName &name, std::string suffix="")
Reserve a location for storing custom RestartableDataMap objects.
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
void loadRestartableMetaData(const std::filesystem::path &folder_base)
Loads all available restartable meta data if it is available with the folder base folder_base...
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
ChainControlDataSystem _chain_control_system
The system that manages the ChainControls.
virtual void executeExecutioner()
Execute the Executioner that was built.
Real sub_relaxation_factor
relaxation factor to be used for a MultiApp's subapps.
bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
void addExecutor(const std::string &type, const std::string &name, const InputParameters ¶ms)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
NullExecutor * getNullExecutor() const
Generic class for solving transient nonlinear problems.
bool getFPTrapFlag() const
Returns whether FPE trapping is turned on (either because of debug or user requested) ...
Moose::Builder _builder
Builder for building app related parser tree.
const torch::DeviceType _libtorch_device
The libtorch device this app is using.
void addMeshGenerator(const std::string &type, const std::string &name, const InputParameters ¶ms)
Add a mesh generator that will act on the meshes in the system.
bool _test_checkpoint_half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
std::string RestartableDataMapName
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
std::string _output_file_base
The output file basename.
std::streambuf * _output_buffer_cache
Cache output buffer so the language server can turn it off then back on.
static void addAppParam(InputParameters ¶ms)
bool _cpu_profiling
CPU profiling.
bool unusedFlagIsWarning() const
Returns whether the flag for unused parameters is set to throw a warning only.
auto getRestartableDataMapEnd()
virtual void runInputFile()
Actually build everything in the input file.
bool hasStartTime() const
System that manages ChainControls.
std::variant< bool, int, std::string > Type
A capability can have a bool, int, or string value.
virtual std::string header() const
Returns a string to be printed at the beginning of a simulation.
const SolutionInvalidity & solutionInvalidity() const
Holding syntax for parsing input files.
bool useMasterMesh() const
Returns whether to use the parent app mesh as the mesh for this app.
std::unordered_set< std::string > DataNames
static const std::string MESH_META_DATA_SUFFIX
const bool _automatic_automatic_scaling
Whether to turn on automatic scaling by default.
ChainControlDataSystem & getChainControlDataSystem()
Gets the system that manages the ChainControls.
std::unique_ptr< InputParameterWarehouse > _input_parameter_warehouse
Input parameter storage structure; unique_ptr so we can control its destruction order.
const T & getRenamedParam(const std::string &old_name, const std::string &new_name) const
Retrieve a renamed parameter for the object.
bool hasMeshGenerator(const MeshGeneratorName &name) const
const std::vector< std::string > & getInputFileNames() const
static void addCapability(const std::string &capability, CapabilityUtils::Type value, const std::string &doc)
register a new capability
const std::vector< T * > & getInterfaceObjects() const
Gets the registered interface objects for a given interface.
TheWarehouse & theWarehouse()
const MeshGenerator & getMeshGenerator(const std::string &name) const
std::unique_ptr< Backup > finalizeRestore()
Finalizes (closes) the restoration process done in restore().
System that manages MeshGenerators.
unsigned int _multiapp_number
Numbering in all the sub-apps on the same level.
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.
MeshGeneratorSystem & getMeshGeneratorSystem()
Gets the system that manages the MeshGenerators.
const DataNames & getRecoverableData() const
Return a reference to the recoverable data object.
std::unordered_set< std::string > entry_symbols
Parses MOOSE input using HIT/WASP.
const std::shared_ptr< libMesh::Parallel::Communicator > _comm
The MPI communicator this App is going to use.
std::string getPrintableVersion() const
Non-virtual method for printing out the version string in a consistent format.
std::shared_ptr< mfem::Device > _mfem_device
The MFEM Device object.
A MultiApp represents one or more MOOSE applications that are running simultaneously.
void createMinimalApp()
Method for creating the minimum required actions for an application (no input file) ...
void setExitCode(const int exit_code)
Sets the exit code that the application will exit with.
bool isRecovering() const
Whether or not this is a "recover" calculation.
DataNames _recoverable_data_names
Data names that will only be read from the restart file during RECOVERY.
Executor * getExecutor() const
The PerfGraph will hold the master list of all registered performance segments and the head PerfNode...
bool copyInputs()
Handles the copy_inputs input parameter logic: Checks to see whether the passed argument is valid (a ...
virtual bool errorOnJacobianNonzeroReallocation() const
Whether this application should by default error on Jacobian nonzero reallocations.
Real getGlobalTimeOffset() const
Each App has it's own local time.
std::shared_ptr< mfem::Device > getMFEMDevice(Moose::PassKey< MultiApp >)
Get the MFEM device object.
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
const MooseMesh *const _master_mesh
The mesh from master app.
const std::shared_ptr< libMesh::Parallel::Communicator > getCommunicator() const
MeshGenerators are objects that can modify or add to an existing mesh.
void disableCheckUnusedFlag()
Removes warnings and error checks for unrecognized variables in the input file.
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
const bool _use_executor
Indicates whether we are operating in the new/experimental executor mode instead of using the legacy ...
Abstract definition of a RestartableData value.
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Class for parsing input files.
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
std::string getExecutableName()
This function returns the name of the running executable.
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)
void registerInterfaceObject(T &interface)
Registers an interface object for accessing with getInterfaceObjects.
void setExReaderForRestart(std::shared_ptr< libMesh::ExodusII_IO > &&exreader)
Set the Exodus reader to restart variables from an Exodus mesh file.
void setStartTime(Real time)
Set the starting time for the simulation.
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
The Executor class directs the execution flow of simulations.
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
std::set< std::string > getLoadedLibraryPaths() const
Return the paths of loaded libraries.
std::string _early_exit_param
Indicates if simulation is ready to exit, and keeps track of which param caused it to exit...
void dynamicAppRegistration(const std::string &app_name, std::string library_path, const std::string &library_name, bool lib_load_deps)
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 ...
bool isParamSetByUser(const std::string &nm) const