<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">sinvert should give you more that 2 eigenvalues if you set eps_nev > 2. You may need to increase the number of iterations with eps_max_it</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div><div>i would expect that it should, but it is not the case. I tried setting number of iterations 10 times the number of DoFs, and no change.</div><div>It does not seem to be related. Here is an output without shift-and-invert</div><div><br class=""></div><div><div><div><div><div>EPS Object: 1 MPI processes</div><div>  type: krylovschur</div><div>    Krylov-Schur: 50% of basis vectors kept after restart</div><div>  problem type: generalized symmetric eigenvalue problem</div><div>  selected portion of the spectrum: smallest real parts</div><div>  computing true residuals explicitly</div><div>  number of eigenvalues (nev): 5</div><div>  number of column vectors (ncv): 20</div><div>  maximum dimension of projected problem (mpd): 20</div><div>  maximum number of iterations: 2890</div><div>  tolerance: 1e-07</div><div>  convergence test: absolute</div><div>BV Object: 1 MPI processes</div><div>  type: svec</div><div>  21 columns of global length 289</div><div>  orthogonalization method: classical Gram-Schmidt</div><div>  orthogonalization refinement: if needed (eta: 0.7071)</div><div>  non-standard inner product</div><div>  Mat Object:   1 MPI processes</div><div>    type: seqaij</div><div>    rows=289, cols=289</div><div>    total: nonzeros=1913, allocated nonzeros=5491</div><div>    total number of mallocs used during MatSetValues calls =0</div><div>      not using I-node routines</div><div>DS Object: 1 MPI processes</div><div>  type: hep</div><div>  solving the problem with: Implicit QR method (_steqr)</div><div>ST Object: 1 MPI processes</div><div>  type: shift</div><div>  shift: 0</div><div>  number of matrices: 2</div><div>  all matrices have different nonzero pattern</div><div>  KSP Object:  (st_)   1 MPI processes</div><div>    type: preonly</div><div>    maximum iterations=10000, initial guess is zero</div><div>    tolerances:  relative=1e-08, absolute=1e-50, divergence=10000</div><div>    left preconditioning</div><div>    using NONE norm type for convergence test</div><div>  PC Object:  (st_)   1 MPI processes</div><div>    type: redundant</div><div>      Redundant preconditioner: First (color=0) of 1 PCs follows</div><div>      KSP Object:      (st_redundant_)       1 MPI processes</div><div>        type: preonly</div><div>        maximum iterations=10000, initial guess is zero</div><div>        tolerances:  relative=1e-05, absolute=1e-50, divergence=10000</div><div>        left preconditioning</div><div>        using NONE norm type for convergence test</div><div>      PC Object:      (st_redundant_)       1 MPI processes</div><div>        type: lu</div><div>          LU: out-of-place factorization</div><div>          tolerance for zero pivot 2.22045e-14</div><div>          matrix ordering: nd</div><div>          factor fill ratio given 5, needed 2.99686</div><div>            Factored matrix follows:</div><div>              Mat Object:               1 MPI processes</div><div>                type: seqaij</div><div>                rows=289, cols=289</div><div>                package used to perform factorization: petsc</div><div>                total: nonzeros=5733, allocated nonzeros=5733</div><div>                total number of mallocs used during MatSetValues calls =0</div><div>                  not using I-node routines</div><div>        linear system matrix = precond matrix:</div><div>        Mat Object:         1 MPI processes</div><div>          type: seqaij</div><div>          rows=289, cols=289</div><div>          total: nonzeros=1913, allocated nonzeros=5491</div><div>          total number of mallocs used during MatSetValues calls =0</div><div>            not using I-node routines</div><div>    linear system matrix = precond matrix:</div><div>    Mat Object:     1 MPI processes</div><div>      type: seqaij</div><div>      rows=289, cols=289</div><div>      total: nonzeros=1913, allocated nonzeros=5491</div><div>      total number of mallocs used during MatSetValues calls =0</div><div>        not using I-node routines</div></div></div></div></div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">2) Another peculiarity is that `-eps_smallest_real` and `-eps_target 0 -st_type sinvert` return different sets of eigenvalues.<span class="Apple-converted-space"> </span><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">The matrix from the 2D Laplace operator is positive definite, so both should give the same eigenvalues.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">In the latter case there are degenerate eigenvalues.<span class="Apple-converted-space"> </span><br class="">Those are consistent with the results given by ARPACK with shift and invert around 0.<br class="">The matrices I sent you originally correspond to the eigenvalues of the 2D Laplace operator on a uniform mesh with 256 cells.<br class="">If more refined mesh is used (1024 cells instead of 256), same set with degenerate eigenvalues is returned in both cases.<br class="">This is not directly related to SLEPc and is a question out of curiosity.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Some eigenvalues of the 2D Laplacian have multiplicity 2. The default SLEPc solver may not return the two copies of the eigenvalue, because the second copy appears much later and the iteration stops as soon as nev eigenvalues have been computed.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>i see… </div><div><br class=""></div><div>so technically, one could try asking for more eigenvectors to resolve those degenerate eigenvalues?</div><div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="">3) It is not stated in the documentation explicitly, but I suppose the residual discussed in ‘SolverControl’ section<span class="Apple-converted-space"> </span><br class="">always corresponds to the direct problem (even in case when, say, shift-and-invert is applied) and so<span class="Apple-converted-space"> </span><br class="">EPSComputeRelativeError and EPSComputeResidualNorm?<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">The convergence criterion is applied to the transformed problem (shift-and-invert).</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>understood, thanks.</div><div><br class=""></div><br class=""><div class="">Regards,</div><div class="">Denis.</div></body></html>