[petsc-users] EVP Solutions with Subspace
Jose E. Roman
jroman at dsic.upv.es
Fri Apr 5 13:19:54 CDT 2013
El 05/04/2013, a las 19:12, Sonya Blade escribió:
>> By default SLEPc uses a direct solver, so you would not get this message. Which options are you using for the KSP?
>> Jose
> I use Subspace if you mean that by option. Probably I'm misinterpreting
> something here. As far as I know KSP stands for the Kyrlov subspace, can
> you guide me on that?
>
> ierr = EPSCreate(PETSC_COMM_WORLD,&eps);CHKERRQ(ierr);
>
> ierr = EPSSetDimensions(eps,12,PETSC_NULL,PETSC_NULL);
> ierr = EPSSetType(eps, EPSSUBSPACE);
> ierr = EPSSetOperators(eps,B,C);CHKERRQ(ierr);
> ierr = EPSSetProblemType(eps,EPS_GNHEP);CHKERRQ(ierr);
> /*
> Set the initial vector. This is optional, if not done the initial
> vector is set to random values
> */
> ierr = MatGetVecs(B,&v0,PETSC_NULL);CHKERRQ(ierr);
> ierr = VecSet(v0,1.0);CHKERRQ(ierr);
> ierr = EPSSetInitialSpace(eps,1,&v0);CHKERRQ(ierr);
> /* - - - Solve the eigensystem - - - */
>
> ierr = EPSSolve(eps);CHKERRQ(ierr);
>
> Regards,
Do not use EPSSUBSPACE. Do not use any solver different from the default unless you know what you are doing.
KSP is PETSc's linear solver. Please read the documentation, not only SLEPc's but also PETSc's.
Run with the additional option "-eps_view before" and send the output. Also, send the complete error message, not just the last line.
Jose
More information about the petsc-users
mailing list