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

Deflating Schur algorithm for quasi1D Green functions #161

Merged
merged 5 commits into from
May 14, 2021

Conversation

pablosanjose
Copy link
Owner

Closes #154

This implements a deflating Schur algorithm that is far more precise, performant and stable than the one in master. It is developed in detail in a paper to be submitted, will post here when available. I just post a plot from the paper here

Screen Shot 2021-05-14 at 18 27 49

I leave some branches open for a while with alternative algorithms that were explored in developing this.

When writing tests for this I realized that the fact that unitcell sometimes changes the shape of the unit cell (probably because of #117) and the algorithm enlarges the unit cell using unticell when there are next-nearest-cell hoppings, the result can be wrong. Must fix unitcell in a future PR to always preserve cell shape, at least in 1D.

@pablosanjose pablosanjose force-pushed the c1deflate_smalljordan branch from 4e894a6 to 7b77e2a Compare May 14, 2021 16:30
draft

heavy wip debugging

wip

wip

Jordan chain works

new method for Jordan

compromise: r0 = 1

wip

one example down

working!

atol = 0 defaults to Wimmer

refactor + fastpaths

fixes

improved rank-defect handling

cleanup

fix type instabilities from schur

another fix in recursion

consistency fix

safety cutoff in jordan loop

C1 deflate method

remove debug print

Deflating Schur

hessenberg approach
reducing allocations

reduce more allocations

elliminate more allocations

cleanup

fix memory overwrite + bugfix

optimize 1=>n green by using dense invG

simplify

again, inplace lu! for g(1=>n)

same in-place opt for local-infinite-fastpath

in-place optimizations on top of the QR C1 deflate

removed debug print

tweak show greens

remove redundant shiftw!

remove SpecialFunctions dep

cover the case with zero h_+-

flatten/unflatten greens

r x r Jordan reconstruction with tests

unflatten! fix

test fix
@pablosanjose pablosanjose force-pushed the c1deflate_smalljordan branch from 7b77e2a to a5df211 Compare May 14, 2021 16:31
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2021

Codecov Report

Merging #161 (4825d77) into master (9770320) will decrease coverage by 0.19%.
The diff coverage is 81.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
- Coverage   71.28%   71.09%   -0.20%     
==========================================
  Files          16       16              
  Lines        3382     3494     +112     
==========================================
+ Hits         2411     2484      +73     
- Misses        971     1010      +39     
Impacted Files Coverage Δ
src/Quantica.jl 100.00% <ø> (ø)
src/plot_vegalite.jl 0.00% <0.00%> (ø)
src/bandstructure.jl 85.77% <66.66%> (-0.20%) ⬇️
src/greens.jl 78.59% <79.92%> (-10.04%) ⬇️
src/tools.jl 58.92% <86.36%> (+7.55%) ⬆️
src/hamiltonian.jl 86.84% <89.47%> (+0.62%) ⬆️
src/diagonalizer.jl 63.51% <100.00%> (ø)
src/lattice.jl 85.36% <100.00%> (+0.16%) ⬆️

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 9770320...4825d77. Read the comment docs.

@pablosanjose pablosanjose merged commit 6118d1a into master May 14, 2021
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.

2 participants