31 virtual void act()
override;
52 static_assert(std::is_base_of<RestartableModelInterface, T>::value,
53 "You must derive from RestartableModelInterface to use this action");
56 std::vector<T *> objects;
57 static const auto attribute_name = T::validParams().getSystemAttributeName();
59 _app.theWarehouse().query().template condition<AttribSystem>(attribute_name).queryInto(objects);
60 for (
auto object_ptr : objects)
61 if (object_ptr->hasModelData())
69 if (
object.hasExplicitModelData())
73 _app, _app.getRestartableDataMap(
object.modelMetaDataName()), _app.forceRestart());
77 const std::string filename =
object.getModelDataFileName();
85 paramError(
"filename",
"The supplied file '", filename,
"' failed to load.");
88 else if (_app.isRecovering())
90 _app.possiblyLoadRestartableMetaData(
object.modelMetaDataName(),
91 _app.getRestartRecoverFileBase() +
92 MooseApp::checkpointSuffix());
static InputParameters validParams()
Action for loading the model data for the mapping objects.
virtual void act() override
static InputParameters validParams()
LoadModelDataAction(const InputParameters ¶ms)
void load(const T &object)
Load the necessary information for the given model.
void setErrorOnLoadWithDifferentNumberOfProcessors(bool value)
void restore(const DataNames &filter_names={})
void setInput(std::unique_ptr< std::stringstream > header_stream, std::unique_ptr< std::stringstream > data_stream)