NEML2BatchIndexGenerator iterates over the mesh and generates a map from element ID to batch index wh...
void finalize() override
Finalize.
std::size_t _batch_index
Highest current batch index.
std::map< dof_id_type, std::size_t > _elem_to_batch_index
Map from element IDs to batch indices.
bool isEmpty() const
Whether the batch is empty.
void initialize() override
Called before execute() is ever called so that data can be cleared.
void execute() override
Execute method.
void threadJoin(const UserObject &) override
Must override.
static InputParameters validParams()
std::size_t getBatchIndex() const
Get the current batch index (in almost all cases this is the total batch size)
void meshChanged() override
Called on this object when the mesh changes.
bool _outdated
Whether the batch index map is outdated.
std::pair< dof_id_type, std::size_t > _elem_to_batch_index_cache
cache the index for the current element
Base class for user-specific data.