-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix a bunch of small errors. #1301
base: develop
Are you sure you want to change the base?
Conversation
/style |
mfem::out << "Energy using subspace solver from: " << base_energy << ", to: " << subspace_energy << " / " | ||
<< energy_change << ". Min eig: " << leftvals[0] << std::endl; | ||
<< energy_change << ". Min eig: " << leftval << std::endl; |
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.
It looks like the minimum eigenvalue estimate will be reported as 1.0 when no min eigenvalues estimates have been requested. I'm fine with this for now, since it's really an inconsistent request from the user, but it is misleading. An option to consider is to check if leftvals.size() == 0
once at the beginning of the step and echo a warning saying that the min eigenvalue will be reported as 1.0 in this case.
DenseMat(const DenseMat& a) | ||
{ | ||
MatDuplicate(a.A, MAT_COPY_VALUES, &A); | ||
MatCopy(a.A, A, SAME_NONZERO_PATTERN); | ||
MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY); | ||
MatAssemblyEnd(A, MAT_FINAL_ASSEMBLY); | ||
} |
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've done the testing, so I trust you on this. If you actually wanted me to double check, let me know. Otherwise mark as resolved.
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.
The assembly are definitely needed. The Copy, maybe not. But I'm sick of trying to guess what PETSc is going to do, best be safe. It costs nothing in practice.
Petsc was printing lots of errors. This makes it a bit more quiet. Also, a possible indexing error is fixed if no leftmost eigenvectors are asked for.