Skip to content

Commit

Permalink
Merge pull request #20 from MineralsCloud:StaticVectors
Browse files Browse the repository at this point in the history
Use `StaticVectors.Values` to replace `StaticArrays.SVector` in `Cell`
  • Loading branch information
singularitti authored Oct 7, 2023
2 parents 82f0870 + 92834f2 commit 9eaef6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version = "0.3.2"
[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StaticVectors = "20fadf95-9e3d-483c-97cd-cab2760e7998"
StructEquality = "6ec83bb0-ed9f-11e9-3b4c-2b04cb4e219c"

[compat]
Expand Down
5 changes: 3 additions & 2 deletions src/cell.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using StaticArrays: SVector, FieldVector
using StaticVectors: Values
using StructEquality: @struct_hash_equal_isequal

export ReducedCoordinates, CrystalCoordinates, Cell, natoms, atomtypes
Expand All @@ -13,8 +14,8 @@ const CrystalCoordinates = ReducedCoordinates
abstract type AbstractCell end
@struct_hash_equal_isequal struct Cell{N,L,P,T} <: AbstractCell
lattice::Lattice{L}
positions::SVector{N,ReducedCoordinates{P}}
atoms::SVector{N,T}
positions::Values{N,ReducedCoordinates{P}}
atoms::Values{N,T}
end
"""
Cell(lattice, positions, atoms)
Expand Down

0 comments on commit 9eaef6a

Please sign in to comment.