30 virtual void act()
override;
51 static_assert(std::is_base_of<RestartableModelInterface, T>::value,
52 "You must derive from RestartableModelInterface to use this action");
55 std::vector<T *> objects;
56 static const auto attribute_name = T::validParams().getSystemAttributeName();
58 _app.theWarehouse().query().template condition<AttribSystem>(attribute_name).queryInto(objects);
59 for (
auto object_ptr : objects)
60 if (object_ptr->hasModelData())
70 _app, _app.getRestartableDataMap(
object.modelMetaDataName()), _app.forceRestart());
74 const std::string filename =
object.getModelDataFileName();
82 paramError(
"filename",
"The supplied file '", filename,
"' failed to load.");
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)