Currently, PlanewaveWavefunction{D,T} subtypes AbstractArray{T,D}. This runs into serious problems, primarily with indexing behavior.
I propose that we subtype DenseArray{ReciprocalDataGrid{D,T},3} for the following reasons:
DenseArray is a stronger bound than AbstractArray and better reflects the layout of the data. (on a related note, more data structures in this package should probably subtype DenseArray)
- Indexing a
PlanewaveWavefunction{D,T} at a single spin, k-point, and band index should return a ReciprocalSpaceData{D,T}. Indices beyond that reach into the contents to be interpreted as a ReciprocalSpaceData{D,T}, and so have fundamentally different behavior.
Such a change would be breaking (warranting a 0.2 release). I may implement this change as a set of unexported structs/methods before the 0.2 release.
Currently,
PlanewaveWavefunction{D,T}subtypesAbstractArray{T,D}. This runs into serious problems, primarily with indexing behavior.I propose that we subtype
DenseArray{ReciprocalDataGrid{D,T},3}for the following reasons:DenseArrayis a stronger bound thanAbstractArrayand better reflects the layout of the data. (on a related note, more data structures in this package should probably subtypeDenseArray)PlanewaveWavefunction{D,T}at a single spin, k-point, and band index should return aReciprocalSpaceData{D,T}. Indices beyond that reach into the contents to be interpreted as aReciprocalSpaceData{D,T}, and so have fundamentally different behavior.Such a change would be breaking (warranting a 0.2 release). I may implement this change as a set of unexported structs/methods before the 0.2 release.