www.mooseframework.org
MooseApp.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // MOOSE includes
13 #include "Moose.h"
14 #include "Parser.h"
15 #include "Builder.h"
16 #include "ActionWarehouse.h"
17 #include "Factory.h"
18 #include "ActionFactory.h"
19 #include "OutputWarehouse.h"
20 #include "RestartableData.h"
21 #include "RestartableDataMap.h"
22 #include "ConsoleStreamInterface.h"
23 #include "PerfGraph.h"
24 #include "PerfGraphInterface.h"
25 #include "TheWarehouse.h"
26 #include "RankMap.h"
27 #include "MeshGeneratorSystem.h"
28 #include "RestartableDataReader.h"
29 #include "Backup.h"
30 #include "MooseBase.h"
31 #include "libmesh/parallel_object.h"
32 #include "libmesh/mesh_base.h"
33 #include "libmesh/point.h"
34 
35 // C++ includes
36 #include <list>
37 #include <map>
38 #include <set>
39 #include <unordered_set>
40 #include <typeindex>
41 #include <filesystem>
42 
43 // Forward declarations
44 class Executioner;
45 class Executor;
46 class NullExecutor;
47 class FEProblemBase;
49 class SystemInfo;
50 class CommandLine;
52 class SolutionInvalidity;
53 
54 namespace libMesh
55 {
56 class ExodusII_IO;
57 }
58 namespace hit
59 {
60 class Node;
61 }
62 
74  public PerfGraphInterface,
76  public MooseBase
77 {
78 public:
85  {
90  std::vector<std::string> sub_transformed_vars;
92  std::vector<PostprocessorName> sub_transformed_pps;
93  };
94 
96  static const std::string MESH_META_DATA_SUFFIX;
97 
99 
100  virtual ~MooseApp();
101 
103 
107  virtual std::string getPrintableName() const { return "Application"; }
108 
109  virtual std::string appBinaryName() const
110  {
112  name = name.substr(0, name.find_last_of("-"));
113  if (name.find_first_of("/") != std::string::npos)
114  name = name.substr(name.find_first_of("/") + 1, std::string::npos);
115  return name;
116  }
117 
123 
128  const RankMap & rankMap() { return _rank_map; }
129 
134 
139 
141 
146  template <typename T>
147  const T & getParam(const std::string & name);
148 
149  template <typename T>
150  const T & getParam(const std::string & name) const;
152 
160  template <typename T>
161  const T & getRenamedParam(const std::string & old_name, const std::string & new_name) const;
162 
163  inline bool isParamValid(const std::string & name) const { return _pars.isParamValid(name); }
164 
165  inline bool isParamSetByUser(const std::string & nm) const { return _pars.isParamSetByUser(nm); }
166 
170  virtual void run();
171 
175  std::string getFrameworkVersion() const;
176 
180  virtual std::string getVersion() const;
181 
185  std::string getPrintableVersion() const;
186 
190  virtual void setupOptions();
191 
200 
205 
209  Syntax & syntax() { return _syntax; }
210 
214  const std::vector<std::string> & getInputFileNames() const;
215 
219  const std::string & getLastInputFileName() const;
220 
225  void setOutputFileBase(const std::string & output_file_base);
226 
237  std::string getOutputFileBase(bool for_non_moose_build_output = false) const;
238 
242  void setOutputPosition(const Point & p);
243 
248  std::list<std::string> getCheckpointDirectories() const;
249 
254  std::list<std::string> getCheckpointFiles() const;
255 
260  bool hasOutputPosition() const { return _output_position_set; }
261 
266  Point getOutputPosition() const { return _output_position; }
267 
274  void setStartTime(Real time);
275 
279  bool hasStartTime() const { return _start_time_set; }
280 
284  Real getStartTime() const { return _start_time; }
285 
290  void setGlobalTimeOffset(Real offset) { _global_time_offset = offset; }
291 
297 
303  std::string getFileName(bool stripLeadingPath = true) const;
304 
308  void setErrorOverridden();
309 
313  void disableCheckUnusedFlag();
314 
318  Executioner * getExecutioner() const;
319  Executor * getExecutor() const { return _executor.get(); }
320  NullExecutor * getNullExecutor() const { return _null_executor.get(); }
321  bool useExecutor() const { return _use_executor; }
322  FEProblemBase & feProblem() const;
323 
327  void setExecutioner(std::shared_ptr<Executioner> && executioner) { _executioner = executioner; }
328  void setExecutor(std::shared_ptr<Executor> && executor) { _executor = executor; }
329  void
330  addExecutor(const std::string & type, const std::string & name, const InputParameters & params);
331 
336  void addExecutorParams(const std::string & type,
337  const std::string & name,
338  const InputParameters & params);
339 
343  Parser & parser();
344 
345 private:
354  void recursivelyCreateExecutors(const std::string & current_executor_name,
355  std::list<std::string> & possible_roots,
356  std::list<std::string> & current_branch);
357 
358 public:
363  void createExecutors();
364 
372  Executor & getExecutor(const std::string & name, bool fail_if_not_found = true);
373 
382 
386  bool & useNonlinear() { return _use_nonlinear; }
387 
391  bool & useEigenvalue() { return _use_eigen_value; }
392 
396  Factory & getFactory() { return _factory; }
397 
402 
406  processor_id_type processor_id() const { return _comm->rank(); }
407 
413  std::shared_ptr<CommandLine> commandLine() const { return _command_line; }
414 
419  void setExodusFileRestart(bool flag) { _initial_from_file = flag; }
420 
425  bool getExodusFileRestart() const { return _initial_from_file; }
426 
430  void setExReaderForRestart(std::shared_ptr<ExodusII_IO> && exreader) { _ex_reader = exreader; }
431 
435  ExodusII_IO * getExReaderForRestart() const { return _ex_reader.get(); }
436 
440  virtual void runInputFile();
441 
445  virtual void executeExecutioner();
446 
453 
459  bool isRecovering() const;
460 
467  bool isRestarting() const;
468 
472  bool isSplitMesh() const;
473 
475 
478  bool hasRestartRecoverFileBase() const;
479  bool hasRecoverFileBase() const;
481 
483 
486  std::string getRestartRecoverFileBase() const { return _restart_recover_base; }
487  std::string getRecoverFileBase() const
488  {
489  mooseDeprecated("MooseApp::getRecoverFileBase is deprecated, use "
490  "MooseApp::getRestartRecoverFileBase() instead.");
491  return _restart_recover_base;
492  }
494 
498  void setRestartRecoverFileBase(const std::string & file_base)
499  {
500  if (file_base.empty())
502  else
503  _restart_recover_base = file_base;
504  }
505 
511 
520  void setOutputFileNumbers(const std::map<std::string, unsigned int> & numbers)
521  {
522  _output_file_numbers = numbers;
523  }
524 
532  const std::map<std::string, unsigned int> & getOutputFileNumbers() const
533  {
534  return _output_file_numbers;
535  }
536 
541 
546  const SystemInfo * getSystemInfo() const { return _sys_info.get(); }
547 
549 
554  void dynamicAllRegistration(const std::string & app_name,
555  Factory * factory,
556  ActionFactory * action_factory,
557  Syntax * syntax,
558  std::string library_path,
559  const std::string & library_name);
560  void dynamicAppRegistration(const std::string & app_name,
561  std::string library_path,
562  const std::string & library_name,
563  bool lib_load_deps);
565 
572  std::string appNameToLibName(const std::string & app_name) const;
573 
577  std::string libNameToAppName(const std::string & library_name) const;
578 
582  std::set<std::string> getLoadedLibraryPaths() const;
583 
587  std::set<std::string> getLibrarySearchPaths(const std::string & library_path_from_param) const;
588 
593 
594  /*
595  * Register a piece of restartable data. This is data that will get
596  * written / read to / from a restart file.
597  *
598  * @param data The actual data object.
599  * @param tid The thread id of the object. Use 0 if the object is not threaded.
600  * @param read_only Restrict the data for read-only
601  * @param metaname (optional) register the data to the meta data storage (tid must be 0)
602  */
603  RestartableDataValue & registerRestartableData(std::unique_ptr<RestartableDataValue> data,
604  THREAD_ID tid,
605  bool read_only,
606  const RestartableDataMapName & metaname = "");
607 
608  /*
609  * Deprecated method to register a piece of restartable data.
610  *
611  * Use the call without a data name instead.
612  */
613  RestartableDataValue & registerRestartableData(const std::string & name,
614  std::unique_ptr<RestartableDataValue> data,
615  THREAD_ID tid,
616  bool read_only,
617  const RestartableDataMapName & metaname = "");
618 
619  /*
620  * Check if a restartable meta data exists or not.
621  *
622  * @param name The full (unique) name.
623  * @param metaname The name to the meta data storage
624  */
625  bool hasRestartableMetaData(const std::string & name,
626  const RestartableDataMapName & metaname) const;
627 
628  /*
629  * Retrieve restartable meta data from restartable data map
630  *
631  * @param name The full (unique) name.
632  * @param metaname The name to the meta data storage
633  * @return A reference to the restartable meta data value
634  */
635  RestartableDataValue & getRestartableMetaData(const std::string & name,
636  const RestartableDataMapName & metaname,
637  THREAD_ID tid);
638 
644  const std::filesystem::path & folder_base);
649  void loadRestartableMetaData(const std::filesystem::path & folder_base);
650 
656  std::vector<std::filesystem::path>
658  const std::filesystem::path & folder_base);
664  std::vector<std::filesystem::path>
665  writeRestartableMetaData(const std::filesystem::path & folder_base);
666 
671  const std::vector<RestartableDataMap> & getRestartableData() const { return _restartable_data; }
673  std::vector<RestartableDataMap> & getRestartableData() { return _restartable_data; }
675 
680 
685 
695  void registerRestartableDataMapName(const RestartableDataMapName & name, std::string suffix = "");
696 
700  const std::string & getRestartableDataMapName(const RestartableDataMapName & name) const;
701 
707 
713  std::vector<std::filesystem::path> backup(const std::filesystem::path & folder_base);
719  std::unique_ptr<Backup> backup();
720 
724  virtual void preBackup() {}
725 
737  void restore(const std::filesystem::path & folder_base, const bool for_restart);
738 
750  void restore(std::unique_ptr<Backup> backup, const bool for_restart);
751 
758  virtual void postRestore(const bool /* for_restart */) {}
759 
772  void restoreFromInitialBackup(const bool for_restart);
773 
783  std::unique_ptr<Backup> finalizeRestore();
784 
788  virtual std::string header() const;
789 
794  unsigned int multiAppLevel() const { return _multiapp_level; }
795 
800  unsigned int multiAppNumber() const { return _multiapp_number; }
801 
805  bool isUltimateMaster() const { return !_multiapp_level; }
806 
810  const MooseMesh * masterMesh() const { return _master_mesh; }
811 
816 
821 
831  void addMeshGenerator(const std::string & type,
832  const std::string & name,
833  const InputParameters & params)
834  {
836  }
837 
841  bool hasMeshGenerator(const MeshGeneratorName & name) const
842  {
844  }
845 
849  const MeshGenerator & getMeshGenerator(const std::string & name) const
850  {
852  }
853 
857  std::unique_ptr<MeshBase> getMeshGeneratorMesh()
858  {
860  }
861 
867  std::vector<std::string> getMeshGeneratorNames() const
868  {
870  }
871 
881  const MeshGenerator &
882  appendMeshGenerator(const std::string & type, const std::string & name, InputParameters params)
883  {
885  }
886 
893  virtual bool constructingMeshGenerators() const;
894 
896 
900  void setRestart(bool value);
901  void setRecover(bool value);
903 
905  bool checkInput() const { return _check_input; }
906 
908  bool getFPTrapFlag() const { return _trap_fpe; }
909 
913  bool hasRelationshipManager(const std::string & name) const;
914 
921  bool addRelationshipManager(std::shared_ptr<RelationshipManager> relationship_manager);
922 
924  static const std::string & checkpointSuffix();
926  static std::filesystem::path metaDataFolderBase(const std::filesystem::path & folder_base,
927  const std::string & map_suffix);
929  std::filesystem::path restartFolderBase(const std::filesystem::path & folder_base) const;
930 
938  const hit::Node * getCurrentActionHitNode() const;
939 
940 private:
951  void removeRelationshipManager(std::shared_ptr<RelationshipManager> relationship_manager);
952 
953 public:
960  bool attach_geometric_rm_final = false);
961 
968  void attachRelationshipManagers(MeshBase & mesh, MooseMesh & moose_mesh);
969 
973  const std::vector<std::shared_ptr<RelationshipManager>> & getReleationshipManagers();
974 
978  std::vector<std::pair<std::string, std::string>> getRelationshipManagerInfo() const;
979 
983  const ExecFlagEnum & getExecuteOnEnum() const { return _execute_flags; }
984 
990  bool hasInitialBackup() const
991  {
992  return _initial_backup != nullptr && *_initial_backup != nullptr;
993  }
994 
999 
1000  // Return the communicator for this application
1001  const std::shared_ptr<Parallel::Communicator> getCommunicator() const { return _comm; }
1002 
1006  const std::set<std::shared_ptr<RelationshipManager>> & relationshipManagers() const
1007  {
1008  return _relationship_managers;
1009  }
1010 
1014  void checkMetaDataIntegrity() const;
1015 
1017 
1023 
1026 
1032  virtual bool errorOnJacobianNonzeroReallocation() const { return false; }
1033 
1039  template <class T>
1040  void registerInterfaceObject(T & interface);
1041 
1047  template <class T>
1048  const std::vector<T *> & getInterfaceObjects() const;
1049 
1050  static void addAppParam(InputParameters & params);
1051 
1052 protected:
1056  void dynamicRegistration(const Parameters & params);
1057 
1062  void loadLibraryAndDependencies(const std::string & library_filename,
1063  const Parameters & params,
1064  bool load_dependencies = true);
1065 
1068 
1078  void registerRestartableNameWithFilter(const std::string & name,
1079  Moose::RESTARTABLE_FILTER filter);
1080 
1085  void errorCheck();
1086 
1088  const std::string _name;
1089 
1092 
1094  const std::string _type;
1095 
1097  const std::shared_ptr<Parallel::Communicator> _comm;
1098 
1100  std::string _output_file_base;
1101 
1104 
1107 
1110 
1113 
1116 
1119 
1121  std::shared_ptr<CommandLine> _command_line;
1122 
1125 
1128  std::unique_ptr<InputParameterWarehouse> _input_parameter_warehouse;
1129 
1132 
1135 
1138 
1140  const std::shared_ptr<Parser> _parser;
1141 
1144 
1146  std::vector<RestartableDataMap> _restartable_data;
1147 
1153 
1156 
1159 
1162 
1164  std::shared_ptr<Executioner> _executioner;
1165 
1167  std::shared_ptr<Executor> _executor;
1168 
1170  std::map<std::string, std::shared_ptr<Executor>> _executors;
1171 
1174  std::unordered_map<std::string, std::pair<std::string, std::unique_ptr<InputParameters>>>
1176 
1180 
1183  const bool _use_executor;
1184 
1186  std::shared_ptr<NullExecutor> _null_executor;
1187 
1190 
1193 
1195  std::unique_ptr<SystemInfo> _sys_info;
1196 
1199  {
1204 
1206 
1210 
1213 
1215  std::shared_ptr<ExodusII_IO> _ex_reader;
1216 
1219 
1221  bool _recover;
1222 
1224  bool _restart;
1225 
1228 
1230  const bool _use_split;
1231 
1234 
1237 
1240 
1242  std::map<std::string, unsigned int> _output_file_numbers;
1243 
1246 
1248  std::set<std::shared_ptr<RelationshipManager>> _relationship_managers;
1249 
1251  std::map<Moose::RelationshipManagerType, std::set<const RelationshipManager *>>
1253 
1258  std::unordered_map<RelationshipManager *, std::shared_ptr<GhostingFunctor>> _undisp_to_disp_rms;
1259 
1261  {
1263  std::string full_path;
1264  std::unordered_set<std::string> entry_symbols;
1265  };
1266 
1268  std::unordered_map<std::string, DynamicLibraryInfo> _lib_handles;
1269 
1270 private:
1274  {
1276  };
1277 
1278  template <class T>
1280  {
1281  std::vector<T *> _objects;
1282  };
1284 
1309  void createMinimalApp();
1310 
1315  void setCheckUnusedFlag(bool warn_is_error = false);
1316 
1324  bool hasRMClone(const RelationshipManager & template_rm, const MeshBase & mesh) const;
1325 
1330  RelationshipManager & getRMClone(const RelationshipManager & template_rm,
1331  const MeshBase & mesh) const;
1332 
1344  MooseMesh & moose_mesh,
1345  MeshBase & mesh,
1346  const DofMap * dof_map = nullptr);
1347 
1355 
1363 
1368  bool showInputs() const;
1369 
1373  virtual std::string getInstallableInputs() const;
1374 
1381  bool copyInputs() const;
1382 
1388  bool runInputs() const;
1389 
1391  std::unordered_map<RestartableDataMapName, std::pair<RestartableDataMap, std::string>>
1393 
1396  {
1399  };
1400 
1402  std::unique_ptr<TheWarehouse> _the_warehouse;
1403 
1405  unsigned int _multiapp_level;
1406 
1408  unsigned int _multiapp_number;
1409 
1411  const MooseMesh * const _master_mesh;
1412 
1415 
1418 
1420 
1429 
1431  std::streambuf * _output_buffer_cache;
1432 
1435 
1437  bool _cpu_profiling = false;
1438 
1440  bool _heap_profiling = false;
1441 
1444  std::map<const RelationshipManager *,
1445  std::map<const MeshBase *, std::unique_ptr<RelationshipManager>>>
1447 
1449  std::map<std::type_index, std::unique_ptr<InterfaceRegistryObjectsBase>> _interface_registry;
1450 
1455  std::unique_ptr<Backup> * const _initial_backup;
1456 
1457  // Allow FEProblemBase to set the recover/restart state, so make it a friend
1458  friend class FEProblemBase;
1459  friend class Restartable;
1460  friend class SubProblem;
1461 };
1462 
1463 template <typename T>
1464 const T &
1465 MooseApp::getParam(const std::string & name)
1466 {
1467  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
1468 }
1469 
1470 template <typename T>
1471 const T &
1472 MooseApp::getParam(const std::string & name) const
1473 {
1474  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0), this);
1475 }
1476 
1477 template <typename T>
1478 const T &
1479 MooseApp::getRenamedParam(const std::string & old_name, const std::string & new_name) const
1480 {
1481  // this enables having a default on the new parameter but bypassing it with the old one
1482  // Most important: accept new parameter
1483  if (isParamSetByUser(new_name) && !isParamValid(old_name))
1484  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), this);
1485  // Second most: accept old parameter
1486  else if (isParamValid(old_name) && !isParamSetByUser(new_name))
1487  return InputParameters::getParamHelper(old_name, _pars, static_cast<T *>(0), this);
1488  // Third most: accept default for new parameter
1489  else if (isParamValid(new_name) && !isParamValid(old_name))
1490  return InputParameters::getParamHelper(new_name, _pars, static_cast<T *>(0), this);
1491  // Refuse: no default, no value passed
1492  else if (!isParamValid(old_name) && !isParamValid(new_name))
1493  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
1494  "' is being retrieved without being set.\n"
1495  "Did you mispell it?");
1496  // Refuse: both old and new parameters set by user
1497  else
1498  mooseError(_pars.blockFullpath() + ": parameter '" + new_name +
1499  "' may not be provided alongside former parameter '" + old_name + "'");
1500 }
1501 
1502 template <class T>
1503 void
1505 {
1506  static_assert(!std::is_base_of<MooseObject, T>::value, "T is not an interface");
1507 
1508  InterfaceRegistryObjects<T> * registry = nullptr;
1509  auto it = _interface_registry.find(typeid(T));
1510  if (it == _interface_registry.end())
1511  {
1512  auto new_registry = std::make_unique<InterfaceRegistryObjects<T>>();
1513  registry = new_registry.get();
1514  _interface_registry.emplace(typeid(T), std::move(new_registry));
1515  }
1516  else
1517  registry = static_cast<InterfaceRegistryObjects<T> *>(it->second.get());
1518 
1519  mooseAssert(std::count(registry->_objects.begin(), registry->_objects.end(), &interface) == 0,
1520  "Interface already registered");
1521  registry->_objects.push_back(&interface);
1522 }
1523 
1524 template <class T>
1525 const std::vector<T *> &
1527 {
1528  static_assert(!std::is_base_of<MooseObject, T>::value, "T is not an interface");
1529 
1530  const auto it = _interface_registry.find(typeid(T));
1531  if (it != _interface_registry.end())
1532  return static_cast<InterfaceRegistryObjects<T> *>(it->second.get())->_objects;
1533  const static std::vector<T *> empty;
1534  return empty;
1535 }
std::list< std::string > getCheckpointFiles() const
Extract all possible checkpoint file names.
Definition: MooseApp.C:1753
virtual bool constructingMeshGenerators() const
Whether this app is constructing mesh generators.
Definition: MooseApp.C:2849
std::list< std::string > getCheckpointDirectories() const
Get all checkpoint directories.
Definition: MooseApp.C:1721
bool _use_eigen_value
Boolean to indicate whether to use an eigenvalue executioner.
Definition: MooseApp.h:1192
RelationshipManager & createRMFromTemplateAndInit(const RelationshipManager &template_rm, MooseMesh &moose_mesh, MeshBase &mesh, const DofMap *dof_map=nullptr)
Take an input relationship manager, clone it, and then initialize it with provided mesh and optional ...
Definition: MooseApp.C:2493
static const std::string & checkpointSuffix()
The file suffix for the checkpoint mesh.
Definition: MooseApp.C:2397
std::string getFileName(bool stripLeadingPath=true) const
Return the primary (first) filename that was parsed Note: When stripLeadingPath is false...
Definition: MooseApp.C:1767
Parser & parser()
Definition: MooseApp.C:1353
void addExecutorParams(const std::string &type, const std::string &name, const InputParameters &params)
Adds the parameters for an Executor to the list of parameters.
Definition: MooseApp.C:1345
bool defaultAutomaticScaling() const
Whether to enable automatic scaling by default.
Definition: MooseApp.h:998
bool & useNonlinear()
Returns a writable Boolean indicating whether this app will use a Nonlinear or Eigen System...
Definition: MooseApp.h:386
virtual std::string getPrintableName() const
Get printable name of the application.
Definition: MooseApp.h:107
unsigned int _multiapp_level
Level of multiapp, the master is level 0. This used by the Console to indent output.
Definition: MooseApp.h:1405
virtual std::string getInstallableInputs() const
Method to retrieve the installable inputs from a given applications <app>Revision.h file.
Definition: MooseApp.C:1585
PerfGraph & _perf_graph
The PerfGraph object for this application (recoverable)
Definition: MooseApp.h:1155
void setOutputPosition(const Point &p)
Tell the app to output in a specific position.
Definition: MooseApp.C:1710
bool hasMeshGenerator(const MeshGeneratorName &name) const
Definition: MooseApp.h:841
std::vector< std::string > sub_transformed_vars
The names of variables to transform for fixed point solve algorithms (e.g. secant, etc.).
Definition: MooseApp.h:90
const std::string _type
The string representation of the type of this object as registered (see registerApp(AppName)) ...
Definition: MooseApp.h:1094
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
const std::shared_ptr< Parallel::Communicator > getCommunicator() const
Definition: MooseApp.h:1001
void setExecutioner(std::shared_ptr< Executioner > &&executioner)
Set the Executioner for this App.
Definition: MooseApp.h:327
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:1175
A class for creating restricted objects.
Definition: Restartable.h:28
bool isUltimateMaster() const
Whether or not this app is the ultimate master app.
Definition: MooseApp.h:805
bool _initial_from_file
This variable indicates when a request has been made to restart from an Exodus file.
Definition: MooseApp.h:1212
Stores configuration options relating to the fixed-point solving capability.
Definition: MooseApp.h:84
Storage container for all InputParamter objects.
const MeshGenerator & getMeshGenerator(const std::string &name) const
Definition: MooseApp.h:849
std::map< Moose::RelationshipManagerType, std::set< const RelationshipManager * > > _attached_relationship_managers
The relationship managers that have been attached (type -> RMs)
Definition: MooseApp.h:1252
auto getRestartableDataMapBegin()
Iterator based access to the extra RestartableDataMap objects; see Checkpoint.C for use case...
Definition: MooseApp.h:1022
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...
Definition: MooseApp.h:1236
bool hasRestartableMetaData(const std::string &name, const RestartableDataMapName &metaname) const
Definition: MooseApp.C:1859
std::vector< PostprocessorName > sub_transformed_pps
The names of postprocessors to transform for fixed point solve algorithms (e.g. secant, etc.).
Definition: MooseApp.h:92
virtual void setupOptions()
Setup options based on InputParameters.
Definition: MooseApp.C:688
PerfGraph & createRecoverablePerfGraph()
Creates a recoverable PerfGraph.
Definition: MooseApp.C:2818
std::string libNameToAppName(const std::string &library_name) const
Converts a library name to an application name:
Definition: MooseApp.C:1795
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:876
const std::shared_ptr< Parser > _parser
Parser for parsing the input file.
Definition: MooseApp.h:1140
std::string getFrameworkVersion() const
Returns the framework version.
Definition: MooseApp.C:670
Base class for everything in MOOSE with a name and a type.
Definition: MooseBase.h:32
void setRecover(bool value)
Definition: MooseApp.C:2243
std::vector< std::pair< std::string, std::string > > getRelationshipManagerInfo() const
Returns the Relationship managers info suitable for printing.
Definition: MooseApp.C:2674
void setExecutor(std::shared_ptr< Executor > &&executor)
Definition: MooseApp.h:328
Real _global_time_offset
Offset of the local App time to the "global" problem time.
Definition: MooseApp.h:1118
bool hasOutputPosition() const
Whether or not an output position has been set.
Definition: MooseApp.h:260
bool hasRMClone(const RelationshipManager &template_rm, const MeshBase &mesh) const
Definition: MooseApp.C:2428
bool _file_base_set_by_user
Whether or not file base is set through input or setOutputFileBase by MultiApp.
Definition: MooseApp.h:1103
const std::vector< RestartableDataMap > & getRestartableData() const
Return reference to the restartable data object.
Definition: MooseApp.h:672
bool _output_position_set
Whether or not an output position has been set for this app.
Definition: MooseApp.h:1106
Generic factory class for build all sorts of objects.
Definition: Factory.h:28
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...
Definition: MooseApp.h:532
std::unique_ptr< TheWarehouse > _the_warehouse
The combined warehouse for storing any MooseObject based object.
Definition: MooseApp.h:1402
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:1315
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:299
InputParameters & parameters()
Get the parameters of the object.
Definition: MooseApp.h:122
std::shared_ptr< CommandLine > commandLine() const
Get the command line.
Definition: MooseApp.h:413
std::vector< std::string > getMeshGeneratorNames() const
Definition: MooseApp.h:867
bool hasInitialBackup() const
Definition: MooseApp.h:990
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:2404
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2225
std::unordered_map< RelationshipManager *, std::shared_ptr< GhostingFunctor > > _undisp_to_disp_rms
A map from undisplaced relationship managers to their displaced clone (stored as the base GhostingFun...
Definition: MooseApp.h:1258
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
Definition: MooseApp.h:983
bool _use_nonlinear
Boolean to indicate whether to use a Nonlinear or EigenSystem (inspected by actions) ...
Definition: MooseApp.h:1189
static const RestartableDataMapName MESH_META_DATA
Definition: MooseApp.h:95
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:1392
void dynamicRegistration(const Parameters &params)
Helper method for dynamic loading of objects.
Definition: MooseApp.C:2025
FixedPointConfig & fixedPointConfig()
This info is stored here because we need a "globalish" place to put it in order to allow communicatio...
Definition: MooseApp.h:381
virtual std::string appBinaryName() const
Definition: MooseApp.h:109
std::string getOutputFileBase(bool for_non_moose_build_output=false) const
Get the output file base name.
Definition: MooseApp.C:1073
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:2436
void registerRestartableNameWithFilter(const std::string &name, Moose::RESTARTABLE_FILTER filter)
NOTE: This is an internal function meant for MOOSE use only!
Definition: MooseApp.C:1200
virtual void run()
Run the application.
Definition: MooseApp.C:1495
void removeRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Purge this relationship manager from meshes and DofMaps and finally from us.
Definition: MooseApp.C:2451
std::unique_ptr< MeshBase > getSavedMesh(const std::string &name)
Get the saved mesh by name.
Real _start_time
The time at which to start the simulation.
Definition: MooseApp.h:1115
void createExecutors()
After adding all of the Executor Params - this function will actually cause all of them to be built...
Definition: MooseApp.C:1412
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:1360
Builds lists and maps that help in knowing which physical hardware nodes each rank is on...
Definition: RankMap.h:23
std::vector< std::string > getMeshGeneratorNames() const
Get names of all mesh generators Note: This function should be called after all mesh generators are a...
std::filesystem::path restartFolderBase(const std::filesystem::path &folder_base) const
The file suffix for restartable data.
Definition: MooseApp.C:2412
const bool _use_split
Whether or not we are using a (pre-)split mesh (automatically DistributedMesh)
Definition: MooseApp.h:1230
unsigned int multiAppLevel() const
The MultiApp Level.
Definition: MooseApp.h:794
const std::string _name
The name of this object.
Definition: MooseApp.h:1088
bool hasRelationshipManager(const std::string &name) const
Returns a Boolean indicating whether a RelationshipManater exists with the same name.
Definition: MooseApp.C:2323
Base class for MOOSE-based applications.
Definition: MooseApp.h:73
Storage for action instances.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
bool _check_input
true if we want to just check the input file
Definition: MooseApp.h:1245
const std::vector< std::shared_ptr< RelationshipManager > > & getReleationshipManagers()
Retrieve the relationship managers.
bool isParamValid(const std::string &name) const
Definition: MooseApp.h:163
bool hasRestartableDataMap(const RestartableDataMapName &name) const
Definition: MooseApp.C:2793
Syntax _syntax
Syntax of the input file.
Definition: MooseApp.h:1124
Syntax & syntax()
Returns a writable reference to the syntax object.
Definition: MooseApp.h:209
std::map< std::string, std::shared_ptr< Executor > > _executors
Pointers to all of the Executors for this run.
Definition: MooseApp.h:1170
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:1910
bool _trap_fpe
Whether or not FPE trapping should be turned on.
Definition: MooseApp.h:1233
void setExReaderForRestart(std::shared_ptr< ExodusII_IO > &&exreader)
Set the Exodus reader to restart variables from an Exodus mesh file.
Definition: MooseApp.h:430
processor_id_type processor_id() const
Returns the MPI processor ID of the current processor.
Definition: MooseApp.h:406
Real getStartTime() const
Definition: MooseApp.h:284
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...
Definition: MooseApp.h:1242
const hit::Node * getCurrentActionHitNode() const
Definition: MooseApp.C:2420
ExodusII_IO * getExReaderForRestart() const
Get the Exodus reader to restart variables from an Exodus mesh file.
Definition: MooseApp.h:435
ActionWarehouse _action_warehouse
Where built actions are stored.
Definition: MooseApp.h:1134
RestartableDataReader _rd_reader
Definition: MooseApp.h:1419
void checkMetaDataIntegrity() const
Function to check the integrity of the restartable meta data structure.
Definition: MooseApp.C:2750
static InputParameters validParams()
Definition: MooseApp.C:96
bool isRestarting() const
Whether or not this is a "restart" calculation.
Definition: MooseApp.C:1174
unsigned int multiAppNumber() const
The MultiApp number.
Definition: MooseApp.h:800
bool isSplitMesh() const
Whether or not this is a split mesh operation.
Definition: MooseApp.C:1180
RestartableDataMap & getRestartableDataMap(const RestartableDataMapName &name)
Return a reference to restartable data for the specific type flag.
Definition: MooseApp.C:2782
std::unique_ptr< SystemInfo > _sys_info
System Information.
Definition: MooseApp.h:1195
ActionFactory & getActionFactory()
Retrieve a writable reference to the ActionFactory associated with this App.
Definition: MooseApp.h:401
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
SolutionInvalidity & _solution_invalidity
The SolutionInvalidity object for this application.
Definition: MooseApp.h:1158
FEProblemBase & feProblem() const
Definition: MooseApp.C:1327
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition: MooseApp.h:396
std::vector< RestartableDataMap > _restartable_data
Where the restartable data is held (indexed on tid)
Definition: MooseApp.h:1146
void setOutputFileBase(const std::string &output_file_base)
Override the selection of the output file base name.
Definition: MooseApp.C:1082
std::string getRecoverFileBase() const
Definition: MooseApp.h:487
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:1161
This class wraps provides and tracks access to command line parameters.
Definition: CommandLine.h:33
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.
Storage for restartable data that is ordered based on insertion order.
bool checkInput() const
Returns whether the Application is running in check input mode.
Definition: MooseApp.h:905
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...
Definition: MooseApp.h:425
const RankMap & rankMap()
The RankMap is a useful object for determining how the processes are laid out on the physical nodes o...
Definition: MooseApp.h:128
MeshGeneratorSystem _mesh_generator_system
The system that manages the MeshGenerators.
Definition: MooseApp.h:1417
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...
Definition: MooseApp.C:2559
uint8_t processor_id_type
bool getDistributedMeshOnCommandLine() const
Returns true if the user specified –distributed-mesh (or –parallel-mesh, for backwards compatibilit...
Definition: MooseApp.h:452
bool _start_time_set
Whether or not an start time has been set.
Definition: MooseApp.h:1112
void setRestartRecoverFileBase(const std::string &file_base)
mutator for recover_base (set by RecoverBaseAction)
Definition: MooseApp.h:498
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:1888
bool copyInputs() const
Handles the copy_inputs input parameter logic: Checks to see whether the passed argument is valid (a ...
Definition: MooseApp.C:1591
bool showInputs() const
Prints a message showing the installable inputs for a given application (if getInstallableInputs has ...
Definition: MooseApp.C:1554
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
Definition: MooseApp.C:2349
RestartableDataValue & getRestartableMetaData(const std::string &name, const RestartableDataMapName &metaname, THREAD_ID tid)
Definition: MooseApp.C:1869
std::vector< RestartableDataMap > & getRestartableData()
Definition: MooseApp.h:673
std::shared_ptr< NullExecutor > _null_executor
Used to return an executor that does nothing.
Definition: MooseApp.h:1186
bool & useEigenvalue()
Returns a writable Boolean indicating whether this app will use an eigenvalue executioner.
Definition: MooseApp.h:391
const std::string & getLastInputFileName() const
Definition: MooseApp.C:1066
virtual void preBackup()
Insertion point for other apps that is called before backup()
Definition: MooseApp.h:724
void setErrorOverridden()
Set a flag so that the parser will throw an error if overridden parameters are detected.
Definition: MooseApp.C:1489
const std::set< std::shared_ptr< RelationshipManager > > & relationshipManagers() const
Return the container of relationship managers.
Definition: MooseApp.h:1006
virtual void postRestore(const bool)
Insertion point for other apps that is called after restore()
Definition: MooseApp.h:758
std::shared_ptr< CommandLine > _command_line
Command line object.
Definition: MooseApp.h:1121
bool _restart
Whether or not this is a restart run.
Definition: MooseApp.h:1224
std::unique_ptr< Backup > backup()
Backs up the application memory in a Backup.
Definition: MooseApp.C:1226
RESTARTABLE_FILTER
The filter type applied to a particular piece of "restartable" data.
Definition: MooseTypes.h:704
Moose::Builder & builder()
Returns a writable reference to the builder.
Definition: MooseApp.h:204
const SystemInfo * getSystemInfo() const
Get SystemInfo object.
Definition: MooseApp.h:546
std::string getLatestCheckpointFilePrefix(const std::list< std::string > &checkpoint_files)
Returns the most recent checkpoint prefix (the four numbers at the begining) If a suitable file isn&#39;t...
Definition: MooseUtils.C:805
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...
Definition: MooseApp.h:419
std::map< std::type_index, std::unique_ptr< InterfaceRegistryObjectsBase > > _interface_registry
Registration for interface objects.
Definition: MooseApp.h:1449
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
Definition: MooseApp.h:138
RestartableDataValue & registerRestartableData(std::unique_ptr< RestartableDataValue > data, THREAD_ID tid, bool read_only, const RestartableDataMapName &metaname="")
Definition: MooseApp.C:1807
std::unique_ptr< MeshBase > getMeshGeneratorMesh()
Definition: MooseApp.h:857
bool runInputs() const
Handles the run input parameter logic: Checks to see whether a directory exists in user space and lau...
Definition: MooseApp.C:1655
Specialized factory for generic Action System objects.
Definition: ActionFactory.h:50
An inteface for the _console for outputting to the Console object.
void setRestart(bool value)
Sets the restart/recover flags.
Definition: MooseApp.C:2237
TheWarehouse is a container for MooseObjects that allows querying/filtering over various customizeabl...
Definition: TheWarehouse.h:185
std::shared_ptr< Executioner > _executioner
Pointer to the executioner of this run (typically build by actions)
Definition: MooseApp.h:1164
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...
Definition: MooseApp.h:520
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
ActionFactory _action_factory
The Factory responsible for building Actions.
Definition: MooseApp.h:1131
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
void restoreFromInitialBackup(const bool for_restart)
Restores from a "initial" backup, that is, one set in _initial_backup.
Definition: MooseApp.C:1276
const ActionWarehouse & actionWarehouse() const
Return a const reference to the ActionWarehouse associated with this app.
Definition: MooseApp.h:199
ActionWarehouse & actionWarehouse()
Return a writable reference to the ActionWarehouse associated with this app.
Definition: MooseApp.h:195
RegistrationType
Enumeration for holding the valid types of dynamic registrations allowed.
Definition: MooseApp.h:1395
Executioners are objects that do the actual work of solving your problem.
Definition: Executioner.h:30
enum MooseApp::UNUSED_CHECK _enable_unused_check
bool _recover
Whether or not this is a recovery run.
Definition: MooseApp.h:1221
Point _output_position
The output position.
Definition: MooseApp.h:1109
const MooseMesh * masterMesh() const
Returns a pointer to the master mesh.
Definition: MooseApp.h:810
bool testCheckpointHalfTransient() const
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:510
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:350
bool _error_overridden
Indicates whether warnings or errors are displayed when overridden parameters are detected...
Definition: MooseApp.h:1208
virtual std::string getVersion() const
Returns the current version of the framework or application (default: framework version).
Definition: MooseApp.C:676
SolutionInvalidity & createRecoverableSolutionInvalidity()
Creates a recoverable SolutionInvalidity.
Definition: MooseApp.C:2836
bool _heap_profiling
Memory profiling.
Definition: MooseApp.h:1440
const MooseMesh *const _master_displaced_mesh
The displaced mesh from master app.
Definition: MooseApp.h:1414
Class for storing and utilizing output objects.
Interface for objects interacting with the PerfGraph.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:1483
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:2199
void setGlobalTimeOffset(Real offset)
Each App has it&#39;s own local time.
Definition: MooseApp.h:290
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.
Definition: MooseApp.h:1268
Point getOutputPosition() const
Get the output position.
Definition: MooseApp.h:266
Definition: MooseApp.h:58
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.
Definition: MooseApp.h:882
std::shared_ptr< ExodusII_IO > _ex_reader
The Exodus reader when _initial_from_file is set to true.
Definition: MooseApp.h:1215
static std::string mainMeshGeneratorName()
The name reserved for the "main" mesh generator which is the one used for the numerical solver downst...
const std::string & getRestartableDataMapName(const RestartableDataMapName &name) const
Definition: MooseApp.C:2809
FixedPointConfig _fixed_point_config
Multiapp-related fixed point algorithm configuration details primarily intended to be passed to and u...
Definition: MooseApp.h:1179
const ExecFlagEnum _execute_flags
Execution flags for this App.
Definition: MooseApp.h:1428
UNUSED_CHECK
Indicates whether warnings, errors, or no output is displayed when unused parameters are detected...
Definition: MooseApp.h:1198
bool hasRecoverFileBase() const
Definition: MooseApp.C:1192
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:1446
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
const MooseMesh * masterDisplacedMesh() const
Returns a pointer to the master displaced mesh.
Definition: MooseApp.h:815
bool hasRestartRecoverFileBase() const
Return true if the recovery file base is set.
Definition: MooseApp.C:1186
void registerRestartableDataMapName(const RestartableDataMapName &name, std::string suffix="")
Reserve a location for storing custom RestartableDataMap objects.
Definition: MooseApp.C:2799
void restore(const std::filesystem::path &folder_base, const bool for_restart)
Restore an application from file.
Definition: MooseApp.C:1241
InputParameters _pars
Parameters of this object.
Definition: MooseApp.h:1091
void loadRestartableMetaData(const std::filesystem::path &folder_base)
Loads all available restartable meta data if it is available with the folder base folder_base...
Definition: MooseApp.C:1903
const T & getParam(const std::string &name)
Retrieve a parameter for the object.
Definition: MooseApp.h:1465
virtual void executeExecutioner()
Execute the Executioner that was built.
Definition: MooseApp.C:1137
Real sub_relaxation_factor
relaxation factor to be used for a MultiApp&#39;s subapps.
Definition: MooseApp.h:88
bool _distributed_mesh_on_command_line
This variable indicates that DistributedMesh should be used for the libMesh mesh underlying MooseMesh...
Definition: MooseApp.h:1218
void addExecutor(const std::string &type, const std::string &name, const InputParameters &params)
Definition: MooseApp.C:1333
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
Definition: MooseApp.h:320
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
bool getFPTrapFlag() const
Returns whether FPE trapping is turned on (either because of debug or user requested) ...
Definition: MooseApp.h:908
Moose::Builder _builder
Builder for building app related parser tree.
Definition: MooseApp.h:1143
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.
Definition: MooseApp.h:831
bool _test_checkpoint_half_transient
Whether or not this simulation should only run half its transient (useful for testing recovery) ...
Definition: MooseApp.h:1239
std::string RestartableDataMapName
Definition: MooseTypes.h:203
std::set< std::shared_ptr< RelationshipManager > > _relationship_managers
The relationship managers that have been added.
Definition: MooseApp.h:1248
OutputWarehouse _output_warehouse
OutputWarehouse object for this App.
Definition: MooseApp.h:1137
std::string _output_file_base
The output file basename.
Definition: MooseApp.h:1100
std::streambuf * _output_buffer_cache
Cache output buffer so the language server can turn it off then back on.
Definition: MooseApp.h:1431
const std::shared_ptr< Parallel::Communicator > _comm
The MPI communicator this App is going to use.
Definition: MooseApp.h:1097
static void addAppParam(InputParameters &params)
Definition: MooseApp.C:85
bool _cpu_profiling
CPU profiling.
Definition: MooseApp.h:1437
auto getRestartableDataMapEnd()
Definition: MooseApp.h:1024
virtual void runInputFile()
Actually build everything in the input file.
Definition: MooseApp.C:1098
bool hasStartTime() const
Definition: MooseApp.h:279
virtual std::string header() const
Returns a string to be printed at the beginning of a simulation.
Definition: MooseApp.C:2231
std::string blockFullpath() const
Holding syntax for parsing input files.
Definition: Syntax.h:21
std::unordered_set< std::string > DataNames
static const std::string MESH_META_DATA_SUFFIX
Definition: MooseApp.h:96
const bool _automatic_automatic_scaling
Whether to turn on automatic scaling by default.
Definition: MooseApp.h:1434
Factory _factory
Definition: MooseApp.h:1205
std::unique_ptr< InputParameterWarehouse > _input_parameter_warehouse
Input parameter storage structure; unique_ptr so we can control its destruction order.
Definition: MooseApp.h:1128
const T & getRenamedParam(const std::string &old_name, const std::string &new_name) const
Retrieve a renamed parameter for the object.
Definition: MooseApp.h:1479
bool hasMeshGenerator(const MeshGeneratorName &name) const
const std::vector< std::string > & getInputFileNames() const
Definition: MooseApp.C:1059
const std::vector< T * > & getInterfaceObjects() const
Gets the registered interface objects for a given interface.
Definition: MooseApp.h:1526
TheWarehouse & theWarehouse()
Definition: MooseApp.h:102
const MeshGenerator & getMeshGenerator(const std::string &name) const
MooseApp(InputParameters parameters)
Constructor is protected so that this object is constructed through the AppFactory object...
Definition: MooseApp.C:365
std::unique_ptr< Backup > finalizeRestore()
Finalizes (closes) the restoration process done in restore().
Definition: MooseApp.C:1283
System that manages MeshGenerators.
unsigned int _multiapp_number
Numbering in all the sub-apps on the same level.
Definition: MooseApp.h:1408
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.
Definition: MooseApp.C:1996
void loadLibraryAndDependencies(const std::string &library_filename, const Parameters &params, bool load_dependencies=true)
Recursively loads libraries and dependencies in the proper order to fully register a MOOSE applicatio...
Definition: MooseApp.C:2038
MeshGeneratorSystem & getMeshGeneratorSystem()
Gets the system that manages the MeshGenerators.
Definition: MooseApp.h:820
const DataNames & getRecoverableData() const
Return a reference to the recoverable data object.
Definition: MooseApp.h:706
std::unordered_set< std::string > entry_symbols
Definition: MooseApp.h:1264
Parses MOOSE input using HIT/WASP.
Definition: Builder.h:56
std::string getPrintableVersion() const
Non-virtual method for printing out the version string in a consistent format.
Definition: MooseApp.C:682
void createMinimalApp()
Method for creating the minimum required actions for an application (no input file) ...
Definition: MooseApp.C:2249
bool isRecovering() const
Whether or not this is a "recover" calculation.
Definition: MooseApp.C:1168
DataNames _recoverable_data_names
Data names that will only be read from the restart file during RECOVERY.
Definition: MooseApp.h:1152
Executor * getExecutor() const
Definition: MooseApp.h:319
bool _ready_to_exit
Definition: MooseApp.h:1209
The PerfGraph will hold the master list of all registered performance segments and the head PerfNode...
Definition: PerfGraph.h:43
virtual bool errorOnJacobianNonzeroReallocation() const
Whether this application should by default error on Jacobian nonzero reallocations.
Definition: MooseApp.h:1032
Real getGlobalTimeOffset() const
Each App has it&#39;s own local time.
Definition: MooseApp.h:296
std::string getRestartRecoverFileBase() const
The file_base for the recovery file.
Definition: MooseApp.h:486
const MooseMesh *const _master_mesh
The mesh from master app.
Definition: MooseApp.h:1411
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:32
void disableCheckUnusedFlag()
Removes warnings and error checks for unrecognized variables in the input file.
Definition: MooseApp.C:1321
bool useExecutor() const
Definition: MooseApp.h:321
bool _split_mesh
Whether or not we are performing a split mesh operation (–split-mesh)
Definition: MooseApp.h:1227
const bool _use_executor
Indicates whether we are operating in the new/experimental executor mode instead of using the legacy ...
Definition: MooseApp.h:1183
Abstract definition of a RestartableData value.
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition: MooseApp.h:133
Class for parsing input files.
Definition: Parser.h:112
OutputWarehouse & getOutputWarehouse()
Get the OutputWarehouse objects.
Definition: MooseApp.C:1773
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)
Definition: MooseApp.C:1779
void registerInterfaceObject(T &interface)
Registers an interface object for accessing with getInterfaceObjects.
Definition: MooseApp.h:1504
virtual ~MooseApp()
Definition: MooseApp.C:638
unsigned int THREAD_ID
Definition: MooseTypes.h:198
void setStartTime(Real time)
Set the starting time for the simulation.
Definition: MooseApp.C:1760
std::shared_ptr< Executor > _executor
Pointer to the Executor of this run.
Definition: MooseApp.h:1167
The Executor class directs the execution flow of simulations.
Definition: Executor.h:26
void errorCheck()
Runs post-initialization error checking that cannot be run correctly unless the simulation has been f...
Definition: MooseApp.C:1123
std::set< std::string > getLoadedLibraryPaths() const
Return the paths of loaded libraries.
Definition: MooseApp.C:2188
void dynamicAppRegistration(const std::string &app_name, std::string library_path, const std::string &library_name, bool lib_load_deps)
Definition: MooseApp.C:1939
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:1455
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.
bool isParamSetByUser(const std::string &nm) const
Definition: MooseApp.h:165
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type, const MooseBase *moose_base=nullptr)