[petsc-users] EVP Solutions with Subspace

Sonya Blade sonyablade2010 at hotmail.com
Fri Apr 5 12:12:00 CDT 2013


>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, 		 	   		  


More information about the petsc-users mailing list