[petsc-users] slepc external matrix-vector product subroutine

Satish Balay balay at mcs.anl.gov
Wed Aug 13 00:11:16 CDT 2014


On Tue, 12 Aug 2014, Tijo Vazhappilly wrote:

> Hi Balay,
> 
> I am a new user to Slepc. Is there any option to give a external matrix-vector
> subroutine to Slepc program or  include with in the Slepc code.

check MatShell in petsc
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATSHELL.html

> 
> Our matrix is symmetric and very sparse (DVR basis)  for  the eigenvalue
> problem.  It  is a 3dimensional matrix and in the current  implementation,
> the full
> matrix is not constructed for the diagonalization. We are using arpack in our
> current code.
> 
> My test slepc program takes a lot of time as expected by building the full
> matrix. It wasn't clear from the manual or examples about other options.

perhaps the matrix was not preallocated correctly.

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqAIJSetPreallocation.html

> Thank you for your time.
> 
> Best,
> Tijo
> 
> ps: If you want I could post this to the slepc mailing list.

cc:ing list. thats the better location to discuss issues.

Satish



More information about the petsc-users mailing list