19 mooseAssert(
data,
"Not set");
37 auto find_it = std::find_if(
43 mooseAssert(find_it ==
_data.
end(),
"Inconsistent map");
47 const auto index = find_index->second;
48 mooseAssert(index == (std::size_t)std::distance(
_data.
begin(), find_it),
"Inconsistent map");
49 mooseAssert(
_data.
size() > index,
"Invalid index");
69 mooseError(
"Restartable data with the name ",
name,
" is not registered");
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
RestartableDataMap::Data _data
The registered data.
const RestartableDataValue * findData(const std::string &name) const
Tries to find data with the name name; returns nullptr if not found.
RestartableDataValue & addData(std::unique_ptr< RestartableDataValue > data)
Adds the restartable data data to the map.
iterator begin()
Begin and end iterators to the underlying data.
RestartableDataValue & data(const std::string &name)
Storage for restartable data that is ordered based on insertion order.
bool hasData(const std::string &name) const
std::unordered_map< std::string, std::size_t > _name_to_data_index
Mapping from data name -> index in _data for quick indexing.
RestartableDataValue & addPointer(std::unique_ptr< RestartableDataValue > &&ptr, const WriteKey)
Abstract definition of a RestartableData value.
const std::string & name() const
The full (unique) name of this particular piece of data.