Open ykempf opened 9 years ago
Let's fix it yes. T=0 corresponds to a delta function so it should be just in 1 cell (or a few more position just at interface. But do we have any actual usage of such a case?
If one wants to get rid of the second dist function setting density to zero is easier.
Now it won't hang in findBlocksToInitialize in triAxisSearch projects any more, that bugfix should have been ported there as well when it was made. However setting T=0 will still cause NaNs, so avoid that value. Use 1e-6 or less... Fixing #64 will avoid trying to get rid of the second population by setting all values to 0.
In fact it's all projects, one could add a generic temperature sanity check or assume T=0 means a Dirac in that place (but you get that with a very small temperature as well).
I fixed the triAxisSearch eternal loop issue as well somewhere, but I can't remember if I pushed it to master. I also have adaptive sampling algorithm in amr branch now (Multipeak), the error in volume averages are non-negligible with a fixed number of sampling points (of the order of 10 percent or something). Adaptive sampling is much slower, however..
@ykempf Did you change MultiPeak.cfg to have 120 spatial cells and 5 nT magnetic field on purpose (the old Multipeak.cfg was very useful for testing)? Another change is max_timesteps=0
, which causes vlasiator to exit immediately.
Sorry, I didn't know that for once an "old" cfg was actually actively being used... We have a track record of having stale cfgs in the repo and not updating them. Shall I restore one with the old contents/setup and new parameters or can you do it?
I can make a copy of the old one
@ykempf, this is fixed and the issue can be closed?
I think this stuff has been taken care of
Well there probably is cases (not using triAxisSearch) which will hang but we can also assume that users won't set T=0? Otherwise one should quickly check all projects and add a warning to relevant places...
When one wants to use a single population in MultiPeak and sets T=0 for the second one, the initialisation does not complete. This is an old bug which was fixed for the ionosphere and setmaxwellian iniital conditions but not for the triAxisSearch class of projects. The cause is that the test if the value returned by calcPhaseSpaceDensity() is below the threshold never succeeds if avg = NaN.