Is it a defect to center the simulation at [0.5, 0.5, 0.5] with box size 1?

I am a numerical physicist, and I saw some simulation codes in my community that use a 3D simulator centered at [0.5, 0.5, 0.5] and a normalized length of 1 (so the box coordinates go from 0. to 1. ). Many physical calculations are performed in this field and the best accuracy is usually required.

I think that doing such a thing can be considered a defect, but I would like to confirm this. I am inclined to think that this is a defect because, because we have more accurate accuracy near 0. , the numerical accuracy is not balanced in the whole box.

To have a good balance, I think a box like this:

  • should be centered around 0. ( -0.5 to 0.5 ) if symmetrical accuracy is required around the center of the window
  • should be centered around 1.5 (from 1. to 2. ) if you want quasi-uniform accuracy throughout the field

Am I right or wrong?

+6
source share
1 answer

You're right.

Accuracy from 1.0 to 2.0 will be uniform over the entire surface, for example, you use a fixed point.

Accuracy from -0.5 to 0.5 will be highest around the center point and lower near the edges (but still not bad).

Accuracy from 0.0 to 1.0 will be the highest around the corner (0.0, 0.0) and the lowest level around (1.0, 1.0), so it will behave somewhat unevenly.

+7
source

Source: https://habr.com/ru/post/971351/


All Articles