23 #include "openPMD/IterationEncoding.hpp" 24 #include "openPMD/Mesh.hpp" 25 #include "openPMD/ParticleSpecies.hpp" 26 #include "openPMD/Streaming.hpp" 27 #include "openPMD/auxiliary/Variant.hpp" 28 #include "openPMD/backend/Attributable.hpp" 29 #include "openPMD/backend/Container.hpp" 68 uint64_t iteration = 0;
73 bool fileBased =
false;
79 bool beginStep =
false;
109 std::optional<DeferredParseAccess> m_deferredParseAccess{};
117 std::optional<std::string> m_overrideFilebasedFilename{};
128 template <
typename T,
typename T_key,
typename T_container>
138 using IterationIndex_t = uint64_t;
145 template <
typename T>
154 template <
typename T>
162 template <
typename T>
171 template <
typename T>
177 double timeUnitSI()
const;
183 Iteration &setTimeUnitSI(
double newTimeUnitSI);
236 [[deprecated(
"This attribute is no longer set by the openPMD-api.")]]
bool 237 closedByWriter()
const;
247 std::shared_ptr<internal::IterationData> m_iterationData{
252 return *m_iterationData;
257 return *m_iterationData;
285 void reread(std::string
const &path);
287 std::string filePath, std::string
const &groupPath,
bool beginStep);
288 void readGorVBased(std::string
const &groupPath,
bool beginStep);
289 void read_impl(std::string
const &groupPath);
290 void readMeshes(std::string
const &meshesPath);
291 void readParticles(std::string
const &particlesPath);
298 struct BeginStepStatus
300 using AvailableIterations_t = std::optional<std::deque<uint64_t> >;
307 AvailableIterations_t iterationsInOpenedStep;
321 inline operator std::tuple<AdvanceStatus &, AvailableIterations_t &>()
323 return std::tuple<AdvanceStatus &, AvailableIterations_t &>{
324 stepStatus, iterationsInOpenedStep};
335 BeginStepStatus beginStep(
bool reread);
342 static BeginStepStatus beginStep(
343 std::optional<Iteration> thisObject,
346 std::set<IterationIndex_t>
const &ignoreIterations = {});
383 bool dirtyRecursive()
const;
390 virtual void linkHierarchy(
Writable &w);
397 void runDeferredParseAccess();
400 extern template float Iteration::time<float>()
const;
402 extern template double Iteration::time<double>()
const;
404 extern template long double Iteration::time<long double>()
const;
406 template <
typename T>
409 return this->readFloatingpoint<T>(
"time");
412 extern template float Iteration::dt<float>()
const;
414 extern template double Iteration::dt<double>()
const;
416 extern template long double Iteration::dt<long double>()
const;
418 template <
typename T>
421 return this->readFloatingpoint<T>(
"dt");
T time() const
Definition: Iteration.hpp:407
The reader has not yet parsed this iteration.
std::string filename
If fileBased == true, the file name (without file path) of the file containing this iteration...
Definition: Iteration.hpp:78
Logical compilation of data from one snapshot (e.g.
Definition: Iteration.hpp:126
Definition: Iteration.hpp:57
StepStatus
Used in step-based mode (i.e.
Definition: Streaming.hpp:45
T dt() const
Definition: Iteration.hpp:419
AdvanceStatus
In step-based mode (i.e.
Definition: Streaming.hpp:20
Definition: WriteIterations.hpp:53
Implementation for the root level of the openPMD hierarchy.
Definition: Series.hpp:186
Iteration has not been closed.
Public definitions of openPMD-api.
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:64
Definition: Attributable.hpp:56
Definition: ReadIterations.hpp:54
Parameters recursively passed through the openPMD hierarchy when flushing.
Definition: AbstractIOHandler.hpp:84
Definition: Iteration.hpp:82
CloseStatus
Whether an iteration has been closed yet.
Definition: Iteration.hpp:45
std::string path
The group path within /data containing this iteration.
Definition: Iteration.hpp:64
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:131
Layer to manage storage of attributes associated with file objects.
Definition: Attributable.hpp:93