El 25/11/2014, a las 23:00, Denis Davydov escribió:

> 
>> 
>> 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
> 
> 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.
> It does not seem to be related. Here is an output without shift-and-invert
> 
> EPS Object: 1 MPI processes
>   type: krylovschur
>     Krylov-Schur: 50% of basis vectors kept after restart
>   problem type: generalized symmetric eigenvalue problem
>   selected portion of the spectrum: smallest real parts
>   computing true residuals explicitly
>   number of eigenvalues (nev): 5
>   number of column vectors (ncv): 20
>   maximum dimension of projected problem (mpd): 20
>   maximum number of iterations: 2890
>   tolerance: 1e-07
>   convergence test: absolute
> BV Object: 1 MPI processes
>   type: svec
>   21 columns of global length 289
>   orthogonalization method: classical Gram-Schmidt
>   orthogonalization refinement: if needed (eta: 0.7071)
>   non-standard inner product
>   Mat Object:   1 MPI processes
>     type: seqaij
>     rows=289, cols=289
>     total: nonzeros=1913, allocated nonzeros=5491
>     total number of mallocs used during MatSetValues calls =0
>       not using I-node routines
> DS Object: 1 MPI processes
>   type: hep
>   solving the problem with: Implicit QR method (_steqr)
> ST Object: 1 MPI processes
>   type: shift
>   shift: 0
>   number of matrices: 2
>   all matrices have different nonzero pattern
>   KSP Object:  (st_)   1 MPI processes
>     type: preonly
>     maximum iterations=10000, initial guess is zero
>     tolerances:  relative=1e-08, absolute=1e-50, divergence=10000
>     left preconditioning
>     using NONE norm type for convergence test
>   PC Object:  (st_)   1 MPI processes
>     type: redundant
>       Redundant preconditioner: First (color=0) of 1 PCs follows
>       KSP Object:      (st_redundant_)       1 MPI processes
>         type: preonly
>         maximum iterations=10000, initial guess is zero
>         tolerances:  relative=1e-05, absolute=1e-50, divergence=10000
>         left preconditioning
>         using NONE norm type for convergence test
>       PC Object:      (st_redundant_)       1 MPI processes
>         type: lu
>           LU: out-of-place factorization
>           tolerance for zero pivot 2.22045e-14
>           matrix ordering: nd
>           factor fill ratio given 5, needed 2.99686
>             Factored matrix follows:
>               Mat Object:               1 MPI processes
>                 type: seqaij
>                 rows=289, cols=289
>                 package used to perform factorization: petsc
>                 total: nonzeros=5733, allocated nonzeros=5733
>                 total number of mallocs used during MatSetValues calls =0
>                   not using I-node routines
>         linear system matrix = precond matrix:
>         Mat Object:         1 MPI processes
>           type: seqaij
>           rows=289, cols=289
>           total: nonzeros=1913, allocated nonzeros=5491
>           total number of mallocs used during MatSetValues calls =0
>             not using I-node routines
>     linear system matrix = precond matrix:
>     Mat Object:     1 MPI processes
>       type: seqaij
>       rows=289, cols=289
>       total: nonzeros=1913, allocated nonzeros=5491
>       total number of mallocs used during MatSetValues calls =0
>         not using I-node routines


Once again, do not use the -eps_true_residual option.


> 
>> 
>>> 
>>> 2) Another peculiarity is that `-eps_smallest_real` and `-eps_target 0 
>>> -st_type sinvert` return different sets of eigenvalues. 
>> 
>> The matrix from the 2D Laplace operator is positive definite, so both should 
>> give the same eigenvalues.
>> 
>>> In the latter case there are degenerate eigenvalues. 
>>> Those are consistent with the results given by ARPACK with shift and invert 
>>> around 0.
>>> The matrices I sent you originally correspond to the eigenvalues of the 2D 
>>> Laplace operator on a uniform mesh with 256 cells.
>>> If more refined mesh is used (1024 cells instead of 256), same set with 
>>> degenerate eigenvalues is returned in both cases.
>>> This is not directly related to SLEPc and is a question out of curiosity.
>> 
>> 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.
> 
> i see… 
> 
> so technically, one could try asking for more eigenvectors to resolve those 
> degenerate eigenvalues?

Yes, or force more restarts by setting a small value of ncv or mpd.

Jose


> 
>> 
>>> 
>>> 3) It is not stated in the documentation explicitly, but I suppose the 
>>> residual discussed in ‘SolverControl’ section 
>>> always corresponds to the direct problem (even in case when, say, 
>>> shift-and-invert is applied) and so 
>>> EPSComputeRelativeError and EPSComputeResidualNorm?
>> 
>> The convergence criterion is applied to the transformed problem 
>> (shift-and-invert).
> 
> understood, thanks.
> 
> 
> Regards,
> Denis.

Reply via email to