amep.reader.ContinuumReader#

class amep.reader.ContinuumReader(directory: str, savedir: str, start: float = 0.0, stop: float = 1.0, nth: int = 1, trajfile: str = 'traj.h5amep', deleteold: bool = False, dumps: str = 'dump*.txt', gridfile: str = 'grid.txt', delimiter: str = ' ', timestep: float | None = None, verbose: bool = False)#

Bases: BaseReader

A reader for continuum data

__init__(directory: str, savedir: str, start: float = 0.0, stop: float = 1.0, nth: int = 1, trajfile: str = 'traj.h5amep', deleteold: bool = False, dumps: str = 'dump*.txt', gridfile: str = 'grid.txt', delimiter: str = ' ', timestep: float | None = None, verbose: bool = False) None#

Reader for continuum simulation data.

Parameters:
  • directory (str) – Simulation directory.

  • savedir (str) – Directory in which the trajectory file will be stored.

  • start (float, optional) – Start reading data from this fraction of the whole trajectory. The default is None.

  • stop (float, optional) – Stop reading data from this fraction of the whole trajectory. The default is None.

  • nth (int, optional) – Read each nth dump file. The default is None.

  • dumps (str, optional) – File name of the dump files. The default is ‘dump*.txt’.

  • trajfile (str, optional) – Name of the hdf5 trajectory file that is created when an object of this class is initialized. The default is TRAJFILENAME.

  • deleteold (bool, optional) – If True, an existing old h5amep trajectory file #<trajfile> will be removed. The default is False.

  • delimiter (str, optional) – Delimiter used in the data files. The default is ‘ ‘.

  • timestep (float or None, optional) – Timestep size used in the simulation. The default is None.

  • gridfile (str, optional) – File name that contains the information about the grid used in the simulation. The default is ‘grid.txt’.

  • verbose (bool, optional) – If True, runtime information is printed. The default is False.

Return type:

None.

Methods

__init__(directory, savedir[, start, stop, ...])

Reader for continuum simulation data.

Attributes

d

dt

filename

The path to the HDF5-file that contains the writers data.

nth

savedir

start

steps

The array of simulation steps for each saved frame.

stop

times

The array of physical times for each saved frame.

property filename: Path#

The path to the HDF5-file that contains the writers data.

property steps: ndarray#

The array of simulation steps for each saved frame.

The simulation steps are also used to index the frame data in the HDF5-File.

property times#

The array of physical times for each saved frame.