TimeSeriesHDF5.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
TimeSeriesHDF5
¶ Parent class(es)
This class stores a time series of objects to file(s) in a binary format which is efficient for reading and writing.
When objects are retrieved, the object stored at the time closest to the given time will be used.
A new time series will check if values have been stored to file before (for a series with the same name) and in that case reuse those values. If new values are stored, old values will be cleared.
-
TimeSeriesHDF5
(std::string name)¶ Create empty time series
- Arguments
- name (std::string)
- The time series name
-
void
store
(const GenericVector &vector, double t)¶ Store vector at given time
- Arguments
- vector (
GenericVector
) - The vector to be stored.
- t (double)
- The time.
- vector (
-
void
store
(const Mesh &mesh, double t)¶ Store mesh at given time
- Arguments
- mesh (
Mesh
) - The mesh to be stored.
- t (double)
- The time.
- mesh (
-
void
retrieve
(GenericVector &vector, double t, bool interpolate = true) const¶ Retrieve vector at given time
- Arguments
- vector (
GenericVector
) - The vector (values to be retrieved).
- t (double)
- The time.
- interpolate (bool)
- Optional argument: If true (default), interpolate time samples closest to t if t is not present.
- vector (
-
void
retrieve
(Mesh &mesh, double t) const¶ Retrieve mesh at given time
- Arguments
- mesh (
Mesh
) - The mesh (values to be retrieved).
- t (double)
- The time.
- mesh (
-
std::vector<double>
vector_times
() const¶ Return array of sample times for vectors
- Returns
- std::vector<double>
- The times.
-
std::vector<double>
mesh_times
() const¶ Return array of sample times for meshes
- Returns
- std::vector<double>
- The times.
-
void
clear
()¶ Clear time series
-
std::string
str
(bool verbose) const¶ Return informal string representation (pretty-print)
-
static Parameters
default_parameters
()¶ Default parameter values
-