brainandforce / Electrum.jl

A Julian toolkit for solid-state chemical theory.
MIT License
31 stars 0 forks source link

Increasing the flexibility of `DataGrid` #197

Open brainandforce opened 1 year ago

brainandforce commented 1 year ago

Currently, DataGrid{D,B<:LatticeBasis,S<:AbstractVector{<:Real},T} wraps an Array{T,D} and provides some extra data regarding the basis vectors, shift of the data off of the origin, etc. However, the design may be limiting: what if a user wants to wrap a custom array type such as CuArray from CUDA.jl?

Additionally, it might be useful to construct a view of a DataGrid that preserves the indices associated with the view.

All proposed changes here would be breaking and would require a 0.2.0 release.