-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow QPTDualize with only lin. inequality #12
Conversation
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.
Looks great. I've added just a few comments.
@jkruzik Looking at the output of the new test, even with very high rtol
I get quite a high residual for QP #0
I'm quite afraid whether everything is mathematically correct in this case. I'm investigating further. |
With n=100, atol=1e-14, the last component of lambda is -0.0944291, when multiplied by Kplus this component is 3.27418e-14 which yields the correct solution (zero Dirichlet in the last component. However, Ax -b + B'lambda is almost zero everywhere except for the last component. The examples solves the same problem as ex1. The difference between solutions is 1e-12 in the Euclidean norm. |
Suggested-By: haplav <vaclav.hapla@erdw.ethz.ch>
@jkruzik Should I interpret this that you deem this behavior correct? |
I would say that the primal solution is close to correct. I thought that the problem is with either the algorithm or Hessian/Hessian inversion. Turns out the latter is the case as there is an issue with MUMPS:
SuperLU_DIST (-dual_mat_inv_pc_factor_mat_solver_type superlu_dist):
CG (-dual_mat_inv_ksp_type cg -dual_mat_inv_pc_type none):
Stopping criteria is on atol=1e-8. Note that the norm of the solution is the same in all cases. Maybe MUMPS has some problem with the enforcement of the Dirichlet BCs in Hessian (it seems there is the largest difference between the solutions)? |
OK. Since something similar happens for me in ex4 in #20, I think it's probably not related to this pull request. So I think we can merge this and create a separate issue - it definitely requires further attention. |
Works OK with MUMPS LU (-dual_mat_inv_pc_type lu):
I will switch to LU, add require: mumps and merge this. |
Nice! So a problem with Cholesky - could be a symmetry broken or something? |
OK, I am stupid :( The assembly of the tridiag matrix does not enforce Dirichlet correctly - which breaks symmetry. |
Nice, so it seems #22 gets solved before I really got to that ;-) |
I'm just a bit surprised MUMPS proceeds without any error/warning... |
Fixed. I am going to fix ex1 and ex2 as well in a separate PR. |
Sounds good. |
+ fix unused variable warnings in nest