[petsc-users] [SLEPc] any restriction on the calling order of EPS functions?
Jose E. Roman
jroman at dsic.upv.es
Tue Oct 27 09:39:02 CDT 2015
Yes, in principle you can set options in any order. Let us know if anything does not work for you.
Jose
> El 27/10/2015, a las 9:15, Denis Davydov <davydden at gmail.com> escribió:
>
> 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
>
More information about the petsc-users
mailing list