[petsc-users] EVP Solutions with Subspace

Barry Smith bsmith at mcs.anl.gov
Fri Apr 5 08:26:39 CDT 2013


   For each matrix, after you finish calling MatSetValues() for that matrix you need to call MatAssemblyBegin(mat,MAT_FINAL_ASSEMBLY) then MatAssemblyEnd(mat,MAT_FINAL_ASSEMBLY)   See the manual page.


   Barry

On Apr 5, 2013, at 8:20 AM, Sonya Blade <sonyablade2010 at hotmail.com> wrote:

> Dear All,
> 
> I'd like to solve the problem of Generalized EVP where A is positive definite
> and where B has products only on its diagonal and some of them might be zeros.
> 
> I started implementation with modifying the existing example(namely example 2
> in the official Slepc site). Instead of using the Matrix viewer object I used 
> reading A and B matrices directly from text file. Program produces the following 
> error message, this has been triggered right after ierr = EPSSolve(eps);CHKERRQ(ierr);
> call. I supply with main program body and required matrices stored in files.
> 
> [0]PETSC ERROR: --------------------- Error Message ----------------------------
> --------
> [0]PETSC ERROR: Object is in wrong state!
> [0]PETSC ERROR: Not for unassembled matrix!
> [0]PETSC ERROR: ----------------------------------------------------------------
> --------
> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 6, Mon Feb 11 12:26:34 CST 20
> 13
> 
> I appreciated your help, any other example of solving GEVP with subspace, arnoldi 
> or Lanczos methods is also wellcome.
> 
> Regards, 		 	   		  <main.c><IN.txt><mass.txt>



More information about the petsc-users mailing list