[petsc-users] [SLEPc] any restriction on the calling order of EPS functions?

Hong hzhang at mcs.anl.gov
Tue Oct 27 09:38:17 CDT 2015


Denis:
Your code looks fine to me. There are examples under
slepc/src/eps/examples/tutorials
using ST with SHELL, e.g., ex10.c

Hong

Dear developers,
>
> I wonder if there are any restriction (apart from obvious) on the calling
> order of EPS functions?
> Is the following logic correct:
>
> once I create EPS object (and specified it’s type)
>    ierr = EPSCreate (mpi_communicator, eps);
>    ierr = EPSSetType (eps, const_cast<char *>(EPSKRYLOVSCHUR)); // some
> solver, doesn’t matter which
>    ierr = EPSGetST(eps, st);
>    ierr = STSetType (st, const_cast<char *>(STSHIFT));
>
> I can execute the following in arbitrary order:
>     ierr = EPSSetOperators (eps, *opA, PETSC_NULL);
>     ierr = EPSSetProblemType (eps, GHEP);
>     ierr = EPSSetInitialVector (eps, *initial_vector);
>     int ierr = EPSSetTarget (eps, *target_eigenvalue );
>     ierr = EPSSetWhichEigenpairs (eps, set_which);
>     ierr = EPSSetConvergenceTest (eps, EPS_CONV_ABS);
>     ierr = EPSSetDimensions (eps, n_eigenpairs, PETSC_DECIDE,
> PETSC_DECIDE);
>     int ierr = STSetMatMode(st,SHELL );
>
> and solve:
>     ierr = EPSSetFromOptions (eps);
>     ierr = EPSSolve (eps);
>
>
> Kind regards,
> Denis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151027/1f46b200/attachment.html>


More information about the petsc-users mailing list