SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
86 stars 19 forks source link

Remove arbitrary-dimension lattices and systems #10

Closed ColeMiles closed 2 years ago

ColeMiles commented 2 years ago

This PR removes the arbitrary-dimensionality functionality of many types throughout Sunny, as some components were effectively locking the dimensionality to 3 anyway. Additionally, 1D + 2D simulations can easily still be performed in the 3D framework, and nobody wants to do >3D simulations.

Effectively, three type parameters can be removed from many types throughout Sunny, and the dimensionality of many arrays is now fixed and statically known. This should buy us some budget for complexity when we inevitably need to add more type parameters for SU(N) simulations.

We also can remove OnSiteQuadratic, which only existed in the first place to dodge an awkward unknown-dimensionality problem we previously had.

ColeMiles commented 2 years ago

Note: There is some code throughout Sunny (particularly in StructureFactors.jl) which is written in a way such that it works for arbitrary-dimension input arrays. All of the code still works after this PR, but could maybe be re-written more simply since we know we're fixing 3D.