Skip to content

open_grid and fft_fact/fractional translation small fixes

Alberto Otero de la Roza requested to merge aoterodelaroza/q-e:pw2critic into develop

This commit fixes a bug in symm_base/sgam_at. fft_fact, used to determine good dimension numbers for efficient FFT, is constrained using the crystal's fractional translations. These can be negative, and fftxlib may get a negative fft_fact, which is internally converted to zero, and generates an invalid operation in fft_support/good_fft_order when the code tries to do a mod(x,0). This commit takes the ABS of the fractional translation, and includes a check so if a zero is received in good_fft_order, the program will stop. Also, fft_base is initialized to 1 in open_grid - otherwise the same problem in good_fft_order will happen, although for different reasons.

Merge request reports