There are several examples in the SLEPc distribution that use shell matrices. http://www.grycap.upv.es/slepc/documentation/current/src/eps/examples/tutorials/ex3.c.html http://www.grycap.upv.es/slepc/documentation/current/src/eps/examples/tutorials/ex9.c.html http://www.grycap.upv.es/slepc/documentation/current/src/eps/examples/tutorials/ex6f.F.html
See also section 8.2 of the users guide. Jose El 13/08/2014, a las 07:11, Satish Balay escribió: > 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 >
