void initialize() override
Called before execute() is ever called so that data can be cleared.
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.
void meshChanged() override
Called on this object when the mesh changes.
void execute() override
Execute method.
NEML2BatchIndexGenerator(const InputParameters ¶ms)
void finalize() override
Finalize.
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
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)
Base class for user-specific data.
NEML2BatchIndexGenerator iterates over the mesh and generates a map from element ID to batch index wh...