[petsc-users] [SLEPc] any restriction on the calling order of EPS functions?
Denis Davydov
davydden at gmail.com
Tue Oct 27 08:15:11 CDT 2015
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