fmihpc / vlasiator

Vlasiator - ten letters you can count on
https://www.helsinki.fi/en/researchgroups/vlasiator
Other
44 stars 35 forks source link

Enable 1 to inf nVelocitySamples and nSpaceSamples in all projects #256

Closed ykempf closed 7 months ago

ykempf commented 8 years ago

At least Flowthrough breaks with 1 velocity sample. This should be made consistent across projects.

galfthan commented 8 years ago

Identified yet why, some issue with how the loops are constructed?

ykempf commented 8 years ago

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.

ykempf commented 6 years ago

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?

markusbattarbee commented 6 years ago

Nice find - I see no reason to leave it unfixed.

ykempf commented 6 years ago

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.

ykempf commented 6 years ago

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.

markusbattarbee commented 6 years ago

The response about the wrapper was made to the actual commit :)