openPMD-api
|
Logical compilation of data from one snapshot (e.g. More...
#include <Iteration.hpp>
Public Types | |
using | IterationIndex_t = uint64_t |
Public Types inherited from openPMD::Attributable | |
enum | ReadMode { IgnoreExisting , OverrideExisting , FullyReread } |
Public Member Functions | |
Iteration (Iteration const &)=default | |
Iteration & | operator= (Iteration const &)=default |
template<typename T > | |
T | time () const |
template<typename T > | |
Iteration & | setTime (T newTime) |
Set the global reference time for this iteration. More... | |
template<typename T > | |
T | dt () const |
template<typename T > | |
Iteration & | setDt (T newDt) |
Set the time step used to reach this iteration. More... | |
double | timeUnitSI () const |
Iteration & | setTimeUnitSI (double newTimeUnitSI) |
Set the conversion factor to convert time and dt to seconds. More... | |
Iteration & | close (bool flush=true) |
Close an iteration. More... | |
Iteration & | open () |
Open an iteration. More... | |
bool | closed () const |
Has the iteration been closed? A closed iteration may not (yet) be reopened. More... | |
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. More... | |
Public Member Functions inherited from openPMD::Attributable | |
Attributable (NoInit) | |
Attribute | getAttribute (std::string const &key) const |
Retrieve value of Attribute stored with provided key. More... | |
bool | deleteAttribute (std::string const &key) |
Remove Attribute of provided value both logically and physically. More... | |
std::vector< std::string > | attributes () const |
List all currently stored Attributes' keys. More... | |
size_t | numAttributes () const |
Count all currently stored Attributes. More... | |
bool | containsAttribute (std::string const &key) const |
Check whether am Attribute with a given key exists. More... | |
std::string | comment () const |
Retrieve a user-supplied comment associated with the object. More... | |
Attributable & | setComment (std::string const &comment) |
Populate Attribute corresponding to a comment with the user-supplied comment. More... | |
void | seriesFlush (std::string backendConfig="{}") |
Flush the corresponding Series object. More... | |
MyPath | myPath () const |
The path to this object within its containing Series. More... | |
protected Series | retrieveSeries () const |
void | seriesFlush (internal::FlushParams const &) |
void | flushAttributes (internal::FlushParams const &) |
void | readAttributes (ReadMode) |
template<typename T > | |
T | readFloatingpoint (std::string const &key) const |
Retrieve the value of a floating point Attribute of user-defined precision with ensured type-safety. More... | |
template<typename T > | |
std::vector< T > | readVectorFloatingpoint (std::string const &key) const |
Retrieve a vector of values of a floating point Attributes of user-defined precision with ensured type-safety. More... | |
AbstractIOHandler * | IOHandler () |
AbstractIOHandler const * | IOHandler () const |
Writable *& | parent () |
Writable const * | parent () const |
Writable & | writable () |
Writable const & | writable () const |
void | setData (std::shared_ptr< internal::AttributableData > attri) |
internal::AttributableData & | get () |
internal::AttributableData const & | get () const |
bool | dirty () const |
bool | dirtyRecursive () const |
O(1). | |
void | setDirty (bool dirty_in) |
void | setDirtyRecursive (bool dirty_in) |
bool | written () const |
bool & | written () |
template<typename T > | |
bool | setAttribute (std::string const &key, T value) |
Populate Attribute of provided name with provided value. More... | |
bool | setAttribute (std::string const &key, char const value[]) |
Iteration const & | containingIteration () const |
Returns the corresponding Iteration. More... | |
Iteration & | containingIteration () |
Public Attributes | |
Container< Mesh > | meshes {} |
Container< ParticleSpecies > | particles {} |
Friends | |
template<typename T , typename T_key , typename T_container > | |
class | Container |
class | Series |
class | WriteIterations |
class | SeriesIterator |
Additional Inherited Members | |
Protected Types inherited from openPMD::Attributable | |
using | Data_t = internal::AttributableData |
Protected Attributes inherited from openPMD::Attributable | |
std::shared_ptr< Data_t > | m_attri |
Logical compilation of data from one snapshot (e.g.
a single simulation cycle).
Iteration & openPMD::Iteration::close | ( | bool | flush = true | ) |
Close an iteration.
No further (backend-propagating) accesses may be performed on this iteration. A closed iteration may not (yet) be reopened.
With an MPI-parallel series, close is an MPI-collective operation.
bool openPMD::Iteration::closed | ( | ) | const |
Has the iteration been closed? A closed iteration may not (yet) be reopened.
bool openPMD::Iteration::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.
Useful mainly in streaming context when a reader inquires from a writer that it is done writing.
|
inline |
T | Floating point type of user-selected precision (e.g. float, double). |
Iteration & openPMD::Iteration::open | ( | ) |
Open an iteration.
Explicitly open an iteration. Usually, file-open operations are delayed until the first load/storeChunk operation is flush-ed. In parallel contexts where it is know that such a first access needs to be run non-collectively, one can explicitly open an iteration through this collective call. Also necessary when using defer_iteration_parsing. The Streaming API (i.e. Series::readIterations()) will call this method implicitly and users need not call it.
template Iteration & openPMD::Iteration::setDt< long double > | ( | T | newDt | ) |
Set the time step used to reach this iteration.
T | Floating point type of user-selected precision (e.g. float, double). |
newDt | Time step used to reach this iteration. |
template Iteration & openPMD::Iteration::setTime< long double > | ( | T | newTime | ) |
Set the global reference time for this iteration.
T | Floating point type of user-selected precision (e.g. float, double). |
newTime | Global reference time for this iteration. |
Iteration & openPMD::Iteration::setTimeUnitSI | ( | double | newTimeUnitSI | ) |
Set the conversion factor to convert time and dt to seconds.
newTimeUnitSI | new value for timeUnitSI |
|
inline |
T | Floating point type of user-selected precision (e.g. float, double). |
double openPMD::Iteration::timeUnitSI | ( | ) | const |