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

Implement block tridiagonal inversion for NEGF class #49

Open
sofiasanz opened this issue Mar 5, 2020 · 6 comments
Open

Implement block tridiagonal inversion for NEGF class #49

sofiasanz opened this issue Mar 5, 2020 · 6 comments

Comments

@sofiasanz
Copy link
Member

It could be nice to implement in the NEGF class a method to invert the Green's function using the block tridiagonal inversion algorithm to reduce the time that this operation consumes.

@sofiasanz
Copy link
Member Author

@zerothi, you implemented this algorithm in a template file called btd.py a yer ago o so, right?
Thomas showed me a little bit how it works, and I was wondering if you mind if I use your implementation as a reference to try to adapt it to the Hubbard package :)

@zerothi
Copy link
Collaborator

zerothi commented Mar 6, 2020

I will have no problem with that. As long as it is disclosed that it originates from me, ;)
Then you can do whatever with it ;)

@zerothi
Copy link
Collaborator

zerothi commented Mar 6, 2020

Note however, that for small systems <500 it may not be faster than full inversion since the overhead of managing the blocks in Python is pretty high (compared to fortran).

@sofiasanz
Copy link
Member Author

I will have no problem with that. As long as it is disclosed that it originates from me, ;)
Then you can do whatever with it ;)

Of course! Thanks :)

Note however, that for small systems <500 it may not be faster than full inversion since the overhead of managing the blocks in Python is pretty high (compared to fortran).

I see, maybe we can profile the two methods and then see if it's worth to make the NEGF class to choose between the direct inversion or the btd for small or large systems, respectively. Or something similar :)

@zerothi
Copy link
Collaborator

zerothi commented Mar 6, 2020

Yes, you could use sisl.selector code to let it automatically decide which one to use.
It basically runs through all available methods, and then once it has tried them all, uses the one which takes the least amount of time. :)

@sofiasanz
Copy link
Member Author

Excellent! Thanks ;)

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

No branches or pull requests

2 participants