wavefunction91 / IntegratorXX

Reusable DFT Grids for the Masses
BSD 3-Clause "New" or "Revised" License
13 stars 9 forks source link

Extend tests to higher numbers of nodes and other rules #49

Closed susilehtola closed 1 year ago

susilehtola commented 1 year ago

46 includes tests for low orders of nodes.

I think it would be good to also include tests for higher numbers of nodes, since quadrature grids often use even several hundreds of points.

However, not every number of points needs to be tested. I think that going from 100, it might be reasonable to test rules every 20 points, (100, 120, 140, 160, 180, 200), then maybe every 25 points (225, 250, 275, 300, 325, 350, 375, 400), then every 50 points (450, 500, 550, 600).

Reducing the spacing of the tests is a big reduction storage space, and the cost to generate the tests; even the 100-point rules take some seconds to generate on my laptop with SymPy...

The Gauss-Chebyshev rules 1 and 2 are found in SciPy; one just has to modify the weights, which can be done in the generator.

susilehtola commented 1 year ago

However, the Chevyshev rules are analytic, so the tests don't need to be as extensive compared to those of Legendre and Lobatto that actually involve root finding...

wavefunction91 commented 1 year ago

Just to note that having this in place will be useful if we move faster algorithms for e.g. Gauss-Legendre ala

SIAM J. Sci. Comput., 36 (2014), C1008–C1026.

https://github.com/cenit/jburkardt/tree/master/fastgl

wavefunction91 commented 1 year ago

@susilehtola I have a workstation working on this now, but if you're already working on it, I can cancel the jobs. Let me know.

susilehtola commented 1 year ago

@susilehtola I have a workstation working on this now, but if you're already working on it, I can cancel the jobs. Let me know.

See #52 for a tentative fix. I changed the nodes again since I realized that the increments should be always odd; the script in that PR is up-to-date but the files still need to be regenerated. I am running the generation on my laptop, but that might finish by tonight.

I am pretty sure we don't need to check every order. So far, the tests looked clean up to 500 points!

wavefunction91 commented 1 year ago

This will be closed by #52