fmihpc / vlasiator

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

use better normalized cell coordinate #99

Open galfthan opened 9 years ago

galfthan commented 9 years ago

Now we use in vlasovsolvers a normalized cell coordinate between 0 and 1. Accuracy would be better with, e.g., -0.5 to 0.5:

http://stackoverflow.com/questions/24415970/is-it-a-defect-to-center-a-simulation-in-0-5-0-5-0-5-with-a-box-size-of-1

iljah commented 9 years ago

Now we use in vlasovsolvers a normalized cell coordinate between 0 and

  1. Accuracy would be better with, e.g., -0.5 to 0.5: http://stackoverflow.com/questions/24415970/is-it-a-defect-to-center-a-simulation-in-0-5-0-5-0-5-with-a-box-size-of-1

For the best accuracy you could use integers or unsigned ones, latest multimedia extensions even give the same benefit to integer arithmetic as floating point. I think Pekka said that this worked nicely for particles at least...

galfthan commented 9 years ago

Yes, that is mentioned also in the stackoverflow discussion. Then one would get completely even accuracy over the range. It would be possible I guess, but it would be a much bigger change...

Integers can also be considered whenever this is done (not right now ).