Skip to content

Add lattice rules for (hyper)cubic grid integration#293

Open
Ao-chuba wants to merge 1 commit intotheochem:masterfrom
Ao-chuba:feature/lattice-rules
Open

Add lattice rules for (hyper)cubic grid integration#293
Ao-chuba wants to merge 1 commit intotheochem:masterfrom
Ao-chuba:feature/lattice-rules

Conversation

@Ao-chuba
Copy link
Contributor

This PR implements lattice rules for efficient numerical integration over (hyper)cubic grids, addressing issue #241 .

Following the references provided in the issue (Sloan's paper and the UNSW lattice rules database), I've implemented rank-1 lattice rules as a new integration method.
Implementation :

  • New Lattice class using tabulated generating vectors from UNSW database
  • Supports embedded lattice rules (powers of 2, up to 2²⁰ points)
  • Equal-weight integration with formula: $\mathbf{x}_k = { \frac{k \cdot \mathbf{z}}{n} }$
  • Works with arbitrary parallelepipeds via affine transformation
  • Supports up to 50 dimensions (extensible to 3600+ if needed)
  • Includes basic interpolation via scipy.interpolate.LinearNDInterpolator

Testing:

  • Input validation, point generation, integration accuracy
  • Embedded property verification, interpolation, file I/O
Screenshot 2026-02-11 023415 closes #241

- Implement Lattice class with rank-1 lattice rules
- Support embedded lattice rules (powers of 2)
- Include tabulated generating vectors from UNSW (Order-2 weights)
- Add comprehensive test suite (25 tests, all passing)
- Support arbitrary parallelepipeds via affine transformation
- Addresses issue theochem#241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lattice rules for (hyper)cubic grids

1 participant