-
Notifications
You must be signed in to change notification settings - Fork 15
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
ROM hyper reduction for density evaluation #268
Conversation
@jeanlucf22 , this PR is still work-in-progress, but I'm wondering if I can get checked with you on one part. Can you take a look at line 517-550 of In essence, it computes the density rho only on sampled grid points, using libROM Matrix and Vector.
I'm wondering these assumptions are okay. These assumptions are also checked within the routines, so users won't misuse it unknowingly. Comparing with the slide, and also with |
TODO(kevin): need to figure out what these functions do. | ||
and probably need to make ROM-equivalent functions with another hyper-reduction? | ||
*/ | ||
// gatherSpin(); |
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.
"spin" can be ignored for now. when spin is on, it is like having two replicated copy of everything, on two different sets of processors, and in this case rho is the sum of these two parts -> gather op
and probably need to make ROM-equivalent functions with another hyper-reduction? | ||
*/ | ||
// gatherSpin(); | ||
// rescaleTotalCharge(); |
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.
this is to make sure the charge is numerically exactly the physical charge. Sometimes, a slight rescaling is needed for that.
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.
We'll have to discuss this next week, but hyperreduction is not applicable for rescaleTotalCharge
. We can still perform rescaling after (unscaled) density is projected onto ROM basis.
I mentioned a caveat for code verification above in the description.
Indeed subdivx can be 1. It is an implementation optimization, sometimes using subdivx>1 to divide a subdomain associated with 1 MPI tasks into several sub-subdomains. |
…s to be accounted.
…ging for restart files..
…djusting tolerance.
For now, |
The factor 2 should be in localX |
@dreamer2368 Can you squash your commits so that at least the git commit comments are meaningful? Thanks |
@jeanlucf22 , if you're okay, I can do the |
Yes, please go ahead |
testROMRhoOperator
tests hyper-reduction for electron density evaluation.computeRhoOnSamplePts
evaluates electron density at the sampled grid points, given density matrix, orbital POD basis and ROM orbital coefficients.Rho::computeRho
withoutrescaleTotalCharge
.rescaleTotalCharge
requires every grid point information, it cannot be executed with hyper-reduction. It can be still performed after the electron density is projected onto ROM space via hyperreduction.