TimeSeries

class dolfin.cpp.fem.TimeSeries(*args)

Bases: dolfin.cpp.common.Variable

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.

Overloaded versions

  • TimeSeries(name)

    Create empty time series

    Arguments
    mpi_comm (MPI)

    An MPI communicator

    name (str)

    The time series name

  • TimeSeries(mpi_comm, name)

    Create empty time series

    Arguments
    mpi_comm (MPI)

    An MPI communicator

    name (str)

    The time series name

clear()

Clear time series

static default_parameters()

Default parameter values

mesh_times()

Return array of sample times for meshes

Returns
numpy.array(float)
The times.
retrieve()

Overloaded versions

  • retrieve(vector, t, interpolate=true)

    Retrieve vector at given time

    Arguments
    vector (GenericVector)

    The vector (values to be retrieved).

    t (float)

    The time.

    interpolate (bool)

    Optional argument: If true (default), interpolate time samples closest to t if t is not present.

  • retrieve(mesh, t)

    Retrieve mesh at given time

    Arguments
    mesh (Mesh)

    The mesh (values to be retrieved).

    t (float)

    The time.

store()

Overloaded versions

  • store(vector, t)

    Store vector at given time

    Arguments
    vector (GenericVector)

    The vector to be stored.

    t (float)

    The time.

  • store(mesh, t)

    Store mesh at given time

    Arguments
    mesh (Mesh)

    The mesh to be stored.

    t (float)

    The time.

thisown

The membership flag

vector_times()

Return array of sample times for vectors

Returns
numpy.array(float)
The times.