cape.pylava.dataiterfile: Interface to LAVA data.iters files

This class provdes the class DataIterFile, which can read data from the data.iter file written by LAVA. This file records the residual, force & moment, and potentially more while the LAVA solver is running.

The DataIterFile is configured so that it can read just metadata about the file (including the last iteration number) or all of the data in the file.

class cape.pylava.dataiterfile.DataIterFile(fname: str | None = 'data.iter', **kw)

LAVA data.iter file reader

Call:
>>> db = DataIterFile(fname=None, meta=False)
Inputs:
fname: {"data.iter"} | None`` | str

Name of file to read

meta: True | {False}

Option to just read column names and last iteration

Outputs:
db: DataIterFile

Instance of data.iter interface

Versions:
  • 2024-10-11 @ddalle: v1.0

read(fname: str, **kw)

Read a data.iter file

Call:
>>> db.read(fname)
Inputs:
db: DataIterFile

Instance of data.iter interface

fname: str

Name of file, usually data.iter

meta: True | {False}

Option to just read column names and last iteration

Versions:
  • 2024-10-11 @ddalle: v1.0