23 #include "openPMD/IterationEncoding.hpp" 24 #include "openPMD/Mesh.hpp" 25 #include "openPMD/ParticleSpecies.hpp" 26 #include "openPMD/Streaming.hpp" 27 #include "openPMD/auxiliary/Option.hpp" 28 #include "openPMD/auxiliary/Variant.hpp" 29 #include "openPMD/backend/Attributable.hpp" 30 #include "openPMD/backend/Container.hpp" 42 template <
typename T,
typename T_key,
typename T_container>
158 struct DeferredParseAccess
169 uint64_t iteration = 0;
174 bool fileBased =
false;
179 std::string filename;
180 bool beginStep =
false;
188 void deferParseAccess(DeferredParseAccess);
208 void reread(std::string
const &path);
210 std::string filePath, std::string
const &groupPath,
bool beginStep);
211 void readGorVBased(std::string
const &groupPath,
bool beginStep);
212 void read_impl(std::string
const &groupPath);
218 enum class CloseStatus
238 std::shared_ptr<CloseStatus> m_closed =
239 std::make_shared<CloseStatus>(CloseStatus::Open);
248 std::shared_ptr<StepStatus> m_stepStatus =
249 std::make_shared<StepStatus>(StepStatus::NoStep);
251 std::shared_ptr<auxiliary::Option<DeferredParseAccess> >
252 m_deferredParseAccess =
253 std::make_shared<auxiliary::Option<DeferredParseAccess> >(
256 std::shared_ptr<auxiliary::Option<std::string> >
257 m_overrideFilebasedFilename =
258 std::make_shared<auxiliary::Option<std::string> >(
307 bool dirtyRecursive()
const;
314 virtual void linkHierarchy(
Writable &w);
321 void runDeferredParseAccess();
324 extern template float Iteration::time<float>()
const;
326 extern template double Iteration::time<double>()
const;
328 extern template long double Iteration::time<long double>()
const;
330 template <
typename T>
333 return this->readFloatingpoint<T>(
"time");
336 extern template float Iteration::dt<float>()
const;
338 extern template double Iteration::dt<double>()
const;
340 extern template long double Iteration::dt<long double>()
const;
342 template <
typename T>
345 return this->readFloatingpoint<T>(
"dt");
T time() const
Definition: Iteration.hpp:331
Iteration & setDt(T newDt)
Set the time step used to reach this iteration.
Definition: Iteration.cpp:57
double timeUnitSI() const
Definition: Iteration.cpp:67
Logical compilation of data from one snapshot (e.g.
Definition: Iteration.hpp:40
Iteration & open()
Open an iteration.
Definition: Iteration.cpp:146
StepStatus
Used in step-based mode (i.e.
Definition: Streaming.hpp:44
T dt() const
Definition: Iteration.hpp:343
Iteration & close(bool flush=true)
Close an iteration.
Definition: Iteration.cpp:80
AdvanceStatus
In step-based mode (i.e.
Definition: Streaming.hpp:20
Writing side of the streaming API.
Definition: WriteIterations.hpp:46
bool closed() const
Has the iteration been closed? A closed iteration may not (yet) be reopened.
Definition: Iteration.cpp:161
Simple Option type based on variantSrc::variant.
Definition: Option.hpp:45
Public definitions of openPMD-api.
Definition: Date.cpp:28
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:63
Definition: ReadIterations.hpp:48
Parameters recursively passed through the openPMD hierarchy when flushing.
Definition: AbstractIOHandler.hpp:103
Implementation for the root level of the openPMD hierarchy.
Definition: Series.hpp:110
Iteration & setTime(T newTime)
Set the global reference time for this iteration.
Definition: Iteration.cpp:46
bool closedByWriter() const
Has the iteration been closed by the writer? Background: Upon calling Iteration::close(), the openPMD API will add metadata to the iteration in form of an attribute, indicating that the iteration has indeed been closed.
Definition: Iteration.cpp:181
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:105
Iteration & setTimeUnitSI(double newTimeUnitSI)
Set the conversion factor to convert time and dt to seconds.
Definition: Iteration.cpp:72
Definition: Attributable.hpp:444