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

Refactor: Preconditioner function library #5482

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

maki49
Copy link
Collaborator

@maki49 maki49 commented Nov 14, 2024

fix #5376

"precondition_funcs.h" is designed as a function library with following function types:

  1. single-value transformer: none / qe-pw hard coded formula)
  2. vector-vector operator: div(prevec) / div(trans(prevec-eig)
  3. (In the future, at one's need) Matrix-vector operator

Two ways to use this library:

  • Construct your own lambda / funciton with the library functions (or not), and pass it directly into the eigensolver (e.g. in module_lr)
  • Construct a PreOP object to preallocate the device memory at its construction, then use .get() interface to get the function to be called by the eigensolver (e.g. in hsolver_pw)

Now this library is applied to "dav" and "dav_subspace". The precondition method of "cg" and "bpcg" seems more complicated, so I will not change them before further investigation.

@maki49 maki49 changed the title Refactor: extract preconditioner as functions Refactor: Preconditioner function library Nov 14, 2024
@maki49 maki49 requested review from Cstandardlib, haozhihan, denghuilu and a1henu and removed request for Cstandardlib November 14, 2024 20:20
@maki49 maki49 force-pushed the precondition branch 4 times, most recently from d88022c to 4cc41f5 Compare November 14, 2024 21:00
@kirk0830
Copy link
Collaborator

@jieli-matrix Hi, do you have any suggestions on precondition operation?

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.

Numerical instability of Davidson iterative eigensolver in solving LR-TDDFT excited states
2 participants