fedoo.DataSet
- class DataSet(mesh: Mesh | None = None, data: dict | None = None, data_type: str = 'node')
Object to store, save, load and plot data associated to a mesh.
DataSet have a multiframe version
fedoo.MultiFrameDataSet
that is a class that encapsulate several DataSet mainly usefull for time dependent data.- Parameters:
mesh (Mesh, optional) – Mesh object associated to the data. The default is None.
data (dict, optional) – dict containing the data. The default is None.
data_type (str in {'node', 'element', 'gausspoint', 'scalar', 'all'}) – type of data. The default is ‘node’.
- __init__(mesh: Mesh | None = None, data: dict | None = None, data_type: str = 'node') None
Methods
DataSet.__getitem__
(items)DataSet.add_data
(data_set)Update the DataSet object including all the node, element and gausspoint data from antoher DataSet object data_set.
DataSet.get_data
(field[, component, ...])DataSet.load
(data[, load_mesh, iteration])Load data from a data object.
DataSet.load_dict
(data)Load data from a dict generated with the to_dict method.
DataSet.plot
([field, component, data_type, ...])Plot a field on the surface of the associated mesh.
DataSet.read
(filename[, file_format])DataSet.save
(filename[, save_mesh, compressed])Save data to a file.
DataSet.save_mesh
(filename)Save the mesh using a vtk file.
DataSet.savez
(filename[, save_mesh])Write a npz file using the numpy savez function.
DataSet.savez_compressed
(filename[, save_mesh])Write a compressed npz file using the numpy savez_compressed function.
DataSet.to_csv
(filename[, save_mesh])Write data in a csv file.
Return a dict with all the node, element and gausspoint data.
DataSet.to_excel
(filename[, save_mesh])Write data in a xlsx file (excel format).
DataSet.to_fdz
(filename[, save_mesh, ...])Write a fdz file from the dataset.
DataSet.to_msh
(filename)Write a msh (gmsh format) file with the mesh and associated data (gausspoint data not included).
DataSet.to_pyvista
([gp_data_to_node])DataSet.to_vtk
(filename[, binary, ...])Write vtk file with the mesh and associated data.