Open SebastianM-C opened 3 years ago
That's a great idea! The current version is pretty hacky 😄
Feel free to open a PR. I can help if you have any questions as well.
Do you have an estimate for how long a simulation should take? I tried running examples from the README and from the tests, but they did not complete (I left them to run for couple of hours).
They are very heavy. I'm working on making them faster right now – they currently take a few hours. My tip is to test changes with as low a dimension as possible (so 1D1V).
10x speed improvements are my current focus (basically integration is really inefficient right now, and that can be sped up).
Do you have a MWE for that? I tried using the example in runtests.jl
but I saw that the loss decreased for some time and then started increasing.
With regards to performance, I saw some things that might cause type instabilities, but I'm not sure if those are optimized by MTK when constructing the equations symbolically.
I'll push some pre-trained weights and an MWE asap :)
What do you see that would cause type instabilities?
What do you see that would cause type instabilities?
I did not look too close at the code, but https://github.com/killah-t-cell/Plasma.jl/blob/41476321f30f2ac3f8c33e0f8442ad1b23d77720/src/solve.jl#L68-L72
might lead to some Any
s because qs
and ms
are initialized as Vector{Any}
. I'm not sure if this will create any notable performance problems though (I didn't benchmark or profile the code yet).
I'll try to take a close look at the code and open an issue if I find something else.
Oh nice catch. I don't think this will cause problems, but I think normalisation would matter more here. Setting m to 1 instead of to the electron mass, for example.
Hi! Thanks for writing this package. I was looking over the code and I noticed that for plotting the GLMakie backend is hardcoded. I think that if would be better to define (Makie) plot recipes for
PlasmaSolution
types and thus depend on Makie / MakieCore and not on a specific backend. This will mean that WGLMakie will work "for free" and in the case of 2D plots, CairoMakie too.I'd like to help with a PR that implements this if you want.