ndiffusion.save_result

ndiffusion.save_result(path, result, solver=None, **metadata)[source]

Write a solver result to an .npz file.

Every field the result carries is saved (flux, keff, precursors, …), along with the ndiffusion version, the result type and, if solver is given, its class name and size. Extra keyword arguments are stored as metadata and must be JSON serializable.