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

BandrangeKPM(::Hamiltonian) support for non-scalar eltype #71

Merged
merged 6 commits into from
Jun 18, 2020

Conversation

pablosanjose
Copy link
Owner

@pablosanjose pablosanjose commented Jun 16, 2020

Closes #62

This introduces BandrangeKPM(::Hamiltonian), that is called whenever momentaKPM(::Hamiltonian) receives a bandrange === missing. BandrangeKPM(h) now supports flattening bloch(h) through the bloch!/similarmatrix machinery, and hence properly deals with non-scalar eltypes. This PR does not cover the case where momentaKPM is called on an AbstractArray with non-scalar eltype, as the mentioned machinery is only defined on Hamiltonians. It might be interesting to generalize in the future.

We need to make sure some basic KPM tests pass before merging.

dosKPM(ham) and densityKPM(ham)

typo

rebase
@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2020

Codecov Report

Merging #71 into master will increase coverage by 4.41%.
The diff coverage is 69.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage   56.72%   61.13%   +4.41%     
==========================================
  Files          15       15              
  Lines        2267     2267              
==========================================
+ Hits         1286     1386     +100     
+ Misses        981      881     -100     
Impacted Files Coverage Δ
src/diagonalizer.jl 53.48% <50.00%> (+0.64%) ⬆️
src/KPM.jl 63.26% <72.22%> (+63.26%) ⬆️
src/hamiltonian.jl 67.98% <100.00%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e29975...b714f29. Read the comment docs.

@pablosanjose pablosanjose merged commit 041a5c8 into master Jun 18, 2020
@pablosanjose pablosanjose deleted the flatbandrange branch October 21, 2020 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing bandrange calculations in KPM with non-scalar eltypes
2 participants