Skip to content

get the last iteration with iteration_encoding=variable_based #1611

@costeastefan

Description

@costeastefan

I wish to access the last iteration in a series saved to disk with "iteration_encoding": "variable_based" option and writeIterations().

To access the first iteration, I figured out the following example:

SeriesIterator it_it = series.readIterations().begin();
IndexedIteration it = *it_it;
  1. Is there a way to access the last iteration in a similar way?
  2. Is there a way to have a reverse iterator (e.g. std::vector::rbegin) for the cases when a simulation creates checkpoints using "iteration_encoding": "variable_based" and needs to restore from the latest useful iteration?

Software Environment:

  • version of openPMD-api: 0.15.1
  • installed openPMD-api via: from source

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions