1
$\begingroup$

I am solving a structural mechanics problem that involves setting constraints, and I use Lagrange multipliers to set it. Consequently, some diagonal entries of the tangent stiffness matrix vanish, and I couldn't solve the system using the KSP solver.

I will appreciate any help.

$\endgroup$
  • $\begingroup$ Are you using the name "pivots" to mean "diagonal entries of $A$"? I always used it to mean "diagonal elements of the $U$ factor of $A=LU$", so I am a bit confused: if a matrix has $U_{kk}=0$ it is singular, at least up to perturbations of the order of machine precision. $\endgroup$ – Federico Poloni Nov 29 '20 at 16:03
  • 1
    $\begingroup$ Why can't you use the KSP solvers? That's pretty much exactly what they're meant to be used for. $\endgroup$ – Wolfgang Bangerth Nov 29 '20 at 17:51
  • $\begingroup$ Also, what are your constraints? $\endgroup$ – Wolfgang Bangerth Nov 29 '20 at 17:51
  • $\begingroup$ @FedericoPoloni Yes, diagonal entries of A. $\endgroup$ – ARUN KUMAR Nov 29 '20 at 18:31
  • $\begingroup$ @WolfgangBangerth Sir, I used linear solve PCLU. The PETSC couldn't set up the preconditioner even. I got this error- PCSETUP_FAILED due to FACTOR_NUMERIC_ZEROPIVOT. As pointed out in the answer below I tried using PCFIELDSPLIT. I used options " -ksp_type gmres -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_detect_saddle point " . Still I could not succeed. I am not sure if made any mistake. $\endgroup$ – ARUN KUMAR Nov 29 '20 at 18:45
4
$\begingroup$

Use of Lagrange multipliers produces a saddle-point problem, $$ \begin{pmatrix} A & B^T \\ B & 0 \end{pmatrix} \begin{pmatrix} u \\ \lambda \end{pmatrix} = \begin{pmatrix} b \\ 0 \end{pmatrix} $$

As you've noticed, many preconditioners break down for this sort of system. One can use direct solvers that support pivoting, but if you want iterative solvers, a common flexible strategy is to use PCFIELDSPLIT; see the factorization (Schur) methods in the Users Manual section on Solving Block Matrices.

Note that the fact that you cannot use conjugate gradients because this problem is not positive definite. You can use MINRES with some preconditioners, but it's sometimes more effective to use nonsymmetric (usually block triangular) preconditioners.

$\endgroup$
  • $\begingroup$ "One can use direct solvers that support pivoting", could you suggest one. I used PCLU and got this error - "PCSETUP_FAILED due to FACTOR_NUMERIC_ZEROPIVOT". $\endgroup$ – ARUN KUMAR Nov 29 '20 at 19:00
  • $\begingroup$ I tried field split with two field sets and options: " -ksp_type gmres -pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_detect_saddle point " . I am not sure if any made any mistake, but I could not succeed. $\endgroup$ – ARUN KUMAR Nov 29 '20 at 19:01
  • $\begingroup$ MUMPS, SuperLU, SuiteSparse, Pardiso are some of the external packages interface with PETSc and they all support pivoting. However, if the linear system is large (for example >300k, depending on your machine and amount of available RAM) then direct solvers are not advisable. I would suggest following Jed's suggestion related to the iterative solvers. $\endgroup$ – Abdullah Ali Sivas Nov 29 '20 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.