ogstools.meshlib.mesh_series module#

A class to handle Meshseries data.

class ogstools.meshlib.mesh_series.TimeSeriesReader[source]#

Bases: TimeSeriesReader

__init__(filename)[source]#
read_data(k)[source]#
Parameters:

k (int) –

class ogstools.meshlib.mesh_series.MeshSeries[source]#

Bases: object

A wrapper around pyvista and meshio for reading of pvd and xdmf timeseries.

Will be replaced by own module in ogstools with similar interface.

__init__(filepath)[source]#
Parameters:

filepath (str | Path) –

Return type:

None

read(timestep, lazy_eval=True)[source]#

Lazy read function.

Parameters:
  • timestep (int) –

  • lazy_eval (bool) –

Return type:

UnstructuredGrid

clear()[source]#
Return type:

None

property timesteps: range#

Return the timesteps of the timeseries data.

property timevalues: list[float]#

Return the timevalues of the timeseries data.

closest_timestep(timevalue)[source]#

Return the corresponding timestep from a timevalue.

Parameters:

timevalue (float) –

Return type:

int

closest_timevalue(timevalue)[source]#

Return the closest timevalue to a timevalue.

Parameters:

timevalue (float) –

Return type:

float

read_closest(timevalue)[source]#

Return the closest timestep in the data for a given timevalue.

Parameters:

timevalue (float) –

Return type:

UnstructuredGrid

read_interp(timevalue, lazy_eval=True)[source]#

Return the temporal interpolated mesh for a given timevalue.

Parameters:
  • timevalue (float) –

  • lazy_eval (bool) –

Return type:

UnstructuredGrid