Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Green's Functions #13
base: master
Are you sure you want to change the base?
Green's Functions #13
Changes from 10 commits
e95c43f
dbea9ae
88353d3
c4704b2
90c234a
2f9d5ee
e23c537
a5946ab
2ffd1e2
91e506b
5175a96
ebb7ef4
84b219d
65f56b3
e0ef771
9ab4627
414fdd1
302feef
a806f13
f02e8b0
a08ebf0
5baea2e
74702c2
d56989c
3241bc4
d4a7e4a
3d3277d
41cc116
a51b754
ff65ee7
b797e30
f838450
65db897
93e48e8
18415d5
e38bdbf
fa2442a
b2d334e
365a871
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this indirection here? Generally we want to avoid things like this (to e.g. allow for better usage of Level-3 BLAS when possible), but if its completely necessary, it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the use of the effective index
true_indx
? (I'm afraid I don't know what you mean by indirection)This is what I came up with to apply the matvecs in the right order to the right vector, since in band Lanczos, unlike in the regular one, at every iteration you act on a different vector in your set of
nbands
. Why is this a problem for BLAS? Shouldn't it be fine as long as you pass the right memory sector to act on?I guess that a way to avoid this
true_indx
variable could be to turn the for loop overit
into two, one external loop going overnLanIts // nbands
and one internal loop going overnbands
. I think that should be completely equivalent, and then the index in the internal loop would be essentially iterating over which vector in the basis to act on with the Hamiltonian. Do you think this would make the code better?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd either use
scal
withalpha=0
or amemset
here since it's contiguousThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an
axpy
withalpha = 1.0/bandH(it-1,jt-1)
andbeta = 0