pyLOM.io#

Module contents#

pyLOM.io.h5_append_dset(fname, xyz, varDict, fieldDict, ordering, point, ptable, mode='a', mpio=True, nopartition=False)#

Save a Dataset in HDF5

pyLOM.io.h5_load_DMD(fname, vars, nmod, ptable=None)#

Load DMD variables from an HDF5 file.

pyLOM.io.h5_load_POD(fname, vars, nmod, ptable=None)#

Load POD variables from an HDF5 file.

pyLOM.io.h5_load_QR(fname, vars, ptable=None)#

Load QR variables from an HDF5 file.

Parameters:
  • fname (string) – file name

  • vars (list) – variables to load, it must be any of Q, B, Y.

  • ptable (PartitionTable, optional) – partition table used to load the data (default, None)

Returns:

list of the np.ndarray requested to load.

Return type:

list

pyLOM.io.h5_load_SPOD(fname, vars, nmod, ptable=None)#

Load SPOD variables from an HDF5 file.

pyLOM.io.h5_load_dset(fname, ptable=None, mpio=True)#

Load a dataset in HDF5

pyLOM.io.h5_load_mesh(fname, mpio=True)#

Load a mesh in HDF5

pyLOM.io.h5_save_DMD(fname, muReal, muImag, Phi, bJov, ptable, nvars=1, pointData=True, mode='w')#

Store DMD variables into an HDF5 file. Can be appended to another HDF by setting the mode to ‘a’. Then no partition table will be saved.

pyLOM.io.h5_save_POD(fname, U, S, V, ptable, nvars=1, pointData=True, mode='w')#

Store POD variables into an HDF5 file. Can be appended to another HDF by setting the mode to ‘a’. Then no partition table will be saved.

pyLOM.io.h5_save_QR(fname, Q, Y, B, ptable, nvars=1, pointData=True, mode='w')#

Store QR variables into an HDF5 file. Can be appended to another HDF by setting the mode to ‘a’. Then no partition table will be saved.

Parameters:
  • fname (string) – file name

  • Q (np.ndarray) – Q matrix

  • Y (np.ndarray) – Randomized matrix before QR

  • B (np.ndarray) – R upper triangular matrix or B in case of doing randomized QR

  • ptable (PartitionTable) – partition table

  • nvars (int, optional) – number of variables analyzed jointly (default=1)

  • pointData (bool, optional) – whether is point data or cell data (default=True)

  • mode (Writing) – the h5 will be written again or appended.

pyLOM.io.h5_save_SPOD(fname, L, P, f, ptable, nvars=1, pointData=True, mode='w')#

Store SPOD variables into an HDF5 file. Can be appended to another HDF by setting the mode to ‘a’. Then no partition table will be saved.

pyLOM.io.h5_save_VAE(fname, kld, mse, val_loss, train_loss_avg, corrcoef, mode='w')#

Store VAE results.

pyLOM.io.h5_save_dset(fname, xyz, varDict, fieldDict, ordering, point, ptable, mode='w', mpio=True, nopartition=False)#

Save a Dataset in HDF5

pyLOM.io.h5_save_mesh(fname, mtype, xyz, conec, eltype, cellO, pointO, ptable, mode='w', mpio=True, nopartition=False)#

Save a Mesh in HDF5

pyLOM.io.pkl_load(fname)#

Load an object in pkl format

pyLOM.io.pkl_save(fname, obj)#

Save an object in pkl format

pyLOM.io.pv_writer(Mesh, Dataset, casestr, basedir='./', idim=0, instants=[0], times=[0.], vars=[], fmt='vtkh5', mode='w')#

Store the data using various formats for ParaView.

This method differs from save in the fact that save is used to recover the field, write only outputs the data.

Link the mesh component into a VTKH5 file

pyLOM.io.vtkh5_save_field(fname, instant, time, point, varDict, ptable, mpio=True, mode='a')#

Save the mesh component into a VTKH5 file

pyLOM.io.vtkh5_save_mesh(fname, mesh, ptable, mpio=True, mode='w')#

Save the mesh component into a VTKH5 file