DOLFIN
DOLFIN C++ interface
|
#include <TimeSeries.h>
Public Member Functions | |
TimeSeries (std::string name) | |
TimeSeries (MPI_Comm mpi_comm, std::string name) | |
~TimeSeries () | |
Destructor. | |
void | store (const GenericVector &vector, double t) |
void | store (const Mesh &mesh, double t) |
void | retrieve (GenericVector &vector, double t, bool interpolate=true) const |
void | retrieve (Mesh &mesh, double t) const |
std::vector< double > | vector_times () const |
std::vector< double > | mesh_times () const |
void | clear () |
Clear time series. | |
std::string | str (bool verbose) const |
Return informal string representation (pretty-print) | |
Public Member Functions inherited from dolfin::Variable | |
Variable () | |
Create unnamed variable. | |
Variable (const std::string name, const std::string label) | |
Create variable with given name and label. | |
Variable (const Variable &variable) | |
Copy constructor. | |
virtual | ~Variable () |
Destructor. | |
const Variable & | operator= (const Variable &variable) |
Assignment operator. | |
void | rename (const std::string name, const std::string label) |
Rename variable. | |
std::string | name () const |
Return name. | |
std::string | label () const |
Return label (description) | |
std::size_t | id () const |
Static Public Member Functions | |
static Parameters | default_parameters () |
Default parameter values. | |
Additional Inherited Members | |
Public Attributes inherited from dolfin::Variable | |
Parameters | parameters |
Parameters. | |
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.
|
inline |
Create empty time series
Arguments mpi_comm (MPI_Comm) An MPI communicator name (std::string) The time series name
TimeSeries::TimeSeries | ( | MPI_Comm | mpi_comm, |
std::string | name | ||
) |
Create empty time series
Arguments mpi_comm (MPI_Comm) An MPI communicator name (std::string) The time series name
std::vector< double > TimeSeries::mesh_times | ( | ) | const |
Return array of sample times for meshes
Returns std::vector<double> The times.
void TimeSeries::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.
void TimeSeries::retrieve | ( | Mesh & | mesh, |
double | t | ||
) | const |
Retrieve mesh at given time
Arguments mesh (Mesh) The mesh (values to be retrieved). t (double) The time.
void TimeSeries::store | ( | const GenericVector & | vector, |
double | t | ||
) |
Store vector at given time
Arguments vector (GenericVector) The vector to be stored. t (double) The time.
void TimeSeries::store | ( | const Mesh & | mesh, |
double | t | ||
) |
Store mesh at given time
Arguments mesh (Mesh) The mesh to be stored. t (double) The time.
std::vector< double > TimeSeries::vector_times | ( | ) | const |
Return array of sample times for vectors
Returns std::vector<double> The times.