23 #include "openPMD/auxiliary/Option.hpp" 24 #include "openPMD/auxiliary/Variant.hpp" 25 #include "openPMD/backend/Attributable.hpp" 26 #include "openPMD/backend/Container.hpp" 27 #include "openPMD/IterationEncoding.hpp" 28 #include "openPMD/Mesh.hpp" 29 #include "openPMD/ParticleSpecies.hpp" 30 #include "openPMD/Streaming.hpp" 59 template<
typename T >
67 template<
typename T >
74 template<
typename T >
82 template<
typename T >
112 close(
bool flush =
true );
160 struct DeferredParseAccess
171 uint64_t iteration = 0;
176 bool fileBased =
false;
181 std::string filename;
184 void flushFileBased(std::string
const&, uint64_t);
185 void flushGroupBased(uint64_t);
186 void flushVariableBased(uint64_t);
188 void deferParseAccess( DeferredParseAccess );
207 void reread( std::string
const & path );
208 void readFileBased( std::string filePath, std::string
const & groupPath );
209 void readGorVBased( std::string
const & groupPath );
210 void read_impl( std::string
const & groupPath );
216 enum class CloseStatus
236 std::shared_ptr< CloseStatus > m_closed =
237 std::make_shared< CloseStatus >( CloseStatus::Open );
246 std::shared_ptr< StepStatus > m_stepStatus =
247 std::make_shared< StepStatus >( StepStatus::NoStep );
249 std::shared_ptr< auxiliary::Option< DeferredParseAccess > >
250 m_deferredParseAccess =
251 std::make_shared< auxiliary::Option< DeferredParseAccess > >(
304 dirtyRecursive()
const;
311 virtual void linkHierarchy(
Writable& w);
318 void runDeferredParseAccess();
323 Iteration::time< float >()
const;
327 Iteration::time< double >()
const;
331 Iteration::time< long double >()
const;
333 template<
typename T >
336 {
return this->readFloatingpoint< T >(
"time"); }
341 Iteration::dt< float >()
const;
345 Iteration::dt< double >()
const;
349 Iteration::dt< long double >()
const;
351 template<
typename T >
354 {
return this->readFloatingpoint< T >(
"dt"); }
T time() const
Definition: Iteration.hpp:335
Iteration & setDt(T newDt)
Set the time step used to reach this iteration.
Definition: Iteration.cpp:59
double timeUnitSI() const
Definition: Iteration.cpp:68
Logical compilation of data from one snapshot (e.g.
Definition: Iteration.hpp:39
Iteration & open()
Open an iteration.
Definition: Iteration.cpp:149
StepStatus
Used in step-based mode (i.e.
Definition: Streaming.hpp:44
T dt() const
Definition: Iteration.hpp:353
Iteration & close(bool flush=true)
Close an iteration.
Definition: Iteration.cpp:83
AdvanceStatus
In step-based mode (i.e.
Definition: Streaming.hpp:20
Writing side of the streaming API.
Definition: WriteIterations.hpp:47
bool closed() const
Has the iteration been closed? A closed iteration may not (yet) be reopened.
Definition: Iteration.cpp:165
Simple Option type based on variantSrc::variant.
Definition: Option.hpp:47
Public definitions of openPMD-api.
Definition: Date.cpp:29
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:64
Definition: ReadIterations.hpp:50
Implementation for the root level of the openPMD hierarchy.
Definition: Series.hpp:112
Iteration & setTime(T newTime)
Set the global reference time for this iteration.
Definition: Iteration.cpp:49
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:186
Map-like container that enforces openPMD requirements and handles IO.
Definition: Container.hpp:106
Iteration & setTimeUnitSI(double newTimeUnitSI)
Set the conversion factor to convert time and dt to seconds.
Definition: Iteration.cpp:74
Definition: Attributable.hpp:401