pynbody / genetIC

The GM initial conditions generator
GNU General Public License v3.0
21 stars 8 forks source link

Consistent computation of velocities #81

Closed cphyc closed 3 years ago

cphyc commented 3 years ago

Currently, genetIC uses by default a fourth-order finite difference method to compute velocities (for velocity and angular momentum modifications), but it uses a Fourier-based method to compute the displacements and velocities to generate the output.

For the sake of consistency, it would be arguably better to use finite-differences everywhere for gradient estimations.

Note after #80 is merged, the compilation flag ZELDOVICH_GRADIENT_FOURIER_SPACE can be deactivated to switch off the gradient computation in Fourier space. We would however need to update all the answer tests.

cphyc commented 3 years ago

Now that ZELDOVICH_GRADIENT_FOURIER_SPACE has been computed, this can be manually resolved.