smash.save_mesh#
- smash.save_mesh(mesh, path)[source]#
Save Model initialization mesh dictionary.
- Parameters:
- meshdict
The mesh dictionary to be saved to HDF5 file.
- pathstr
The file path. If the path not end with
.hdf5, the extension is automatically added to the file path.
See also
read_meshRead Model initialization mesh dictionary.
Examples
>>> setup, mesh = smash.load_dataset("cance") >>> mesh {'dx': 1000.0, 'nac': 383, 'ncol': 28, 'ng': 3, 'nrow': 28 ...}
Save mesh
>>> smash.save_mesh(mesh, "mesh.hdf5")
Read mesh
>>> mesh_rld = smash.read_mesh("mesh.hdf5") {'dx': 1000.0, 'nac': 383, 'ncol': 28, 'ng': 3, 'nrow': 28, ...}