Closed ykempf closed 7 months ago
Identified yet why, some issue with how the loops are constructed?
https://github.com/fmihpc/vlasiator/blob/master/projects/Flowthrough/Flowthrough.cpp#L149 Division by zero which is not being caught, then empty vspace, density = 0, B = 0, dt = 1e-15.
Note that Alfven uses a global nSpaceSamples whereas e.g. Magnetosphere has a population-specific one. Which one do we prefer? Or do we leave it inconsistent for now?
Nice find - I see no reason to leave it unfixed.
I'll first port the general version allowing 1 to many, and in a second phase check whether I make nSpaceSamples population-specific or not.
So I did see your suggestion @markusbattarbee to put this in a wrapper function, which I like a lot as it will save me a whole lot of copy-pasting, but I don't see it here. Did you remove the comment? I'll start with that anyway, and be most likely done by the time you have a chance to comment back, but I think it is very sensible to have one function instead of 15ish identical implementations.
The response about the wrapper was made to the actual commit :)
At least Flowthrough breaks with 1 velocity sample. This should be made consistent across projects.