Closed HannoSpreeuw closed 1 year ago
Are the solver parameters really missing? We have
storage = FileStorage(stored_results, info=kwargs)
and kwargs
also includes solver parameters.
Oh, sorry. Yes, all parameters from kwargs
are saved. I thought solver parameters would also include things like solver="explicit", scheme = "rk", adaptive = True
etc.
So I should close #19 ?
Yeah, o now I see what you mean. Yes, this only includes the parameters from the parameters.Solver dataclass.
So good point!
How about me adding arguments like the ones you mentioned, i.e. solver="explicit", scheme = "rk", adaptive = True
to the Solver dataclass?
I don't know to what extent we were going to change these arguments in the future. I still have in mind what Karline suggested (and seems in line with many textbooks) that implicit solvers would be more appropriate for our case. So if we are going to do runs with different solvers, it would be worth adding. But then you'd probably have to consider the whole range of parameters different solvers can take, as in https://py-pde.readthedocs.io/en/latest/packages/pde.solvers.html ?
Yes, but it seems fine to accommodate for all these solvers and beyond, i.e. solve_ivp
without the py-pde wrapper, which gives more options, such as a functional Jacobian, see the Use_solve_ivp_without_py-pde_wrapper
branch.
To control this through the parameters.Solver dataclass is indeed the most elegant solution. I just published a commit to provide for this.
This simple addition
info=kwargs
is enough to save metadata.To read the attributes added to the hdf5 file written in this way, run something like
Btw,
hf.keys()
will give you the names of the datasets saved infile_just_created.h5
.Fixes #19