Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type-instability in lattice-field of Cell #84

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

thchr
Copy link
Contributor

@thchr thchr commented Dec 3, 2021

MMatrix{3,3,L} is not a concrete type, unfortunately. I figured I'd suggest changing this so inference of getfield(::Cell, :lattice) isn't poisoned.

The same problem affects the positions but it cannot be fixed simply while retaining the MMatrix approach cf. JuliaLang/julia#18466: personally, I think it'd make more sense to treat that as a Vector{MVector{3,P}} - it doesn't seem worthwhile to specialize to how many atoms are in a cell. Anyway, that is a larger change and I just wanted to do the minimal change here.

`MMatrix{3,3,L}` is not a concrete type, unfortunately. I figured I'd suggest changing this so inference of `getfield(::Cell, :lattice)` isn't poisoned.

The same problem affects the `positions` but it cannot be fixed simply while retaining the `MMatrix` approach cf. JuliaLang/julia#18466: personally, I think it'd make more sense to treat that as a `Vector{MVector{3,P}}` - it doesn't seem worthwhile to specialize to how many atoms are in a cell. Anyway, that is a larger change and I just wanted to do the minimal change here.
@singularitti singularitti added the bug Something isn't working label Dec 7, 2021
@singularitti singularitti merged commit d1b27a1 into singularitti:master Dec 7, 2021
@singularitti
Copy link
Owner

Thank you! @thchr

@jaemolihm jaemolihm mentioned this pull request Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants