- Dave
David Knezevic wrote:
I've been trying to add support for ShellMatrix in SlepcEigenSolver, following the approach in PetscLinearSolver, where a private function _petsc_shell_matrix_mult is used to define the shell matrix's vector_mult function.This works fine for standard eigenvalue problems -- a modifed version of ex16 using a ShellMatrix works fine. But I haven't yet got it working for generalized eigenproblems. I've attached a patch (slepc-patch) for the changes I've made to EigenSolver and SlepcEigenSolver, as well as a modified version of ex17 that uses shell matrices (in this case, both A and B are shell matrices -- I've also tried it when only matrix_A is a shell matrix, but I get the same error). The gdb stack trace when the modified ex17 crashes is pasted below.If anyone has some insights into what is going wrong here (and why the generalized eigenvalue problem behaves differently to the standard eigenvalue problem), that'd be a big help!Best wishes, Dave Program received signal SIGABRT, Aborted. [Switching to Thread 0x21aa770 (LWP 17661)] 0x00110416 in __kernel_vsyscall () (gdb) bt #0 0x00110416 in __kernel_vsyscall () #1 0x040ed660 in raise () from /lib/libc.so.6 #2 0x040ef028 in abort () from /lib/libc.so.6 #3 0x01f11771 in PetscAbortErrorHandler (line=283, fun=0x485104 "EPSSetOperators", file=0x484f51 "setup.c", dir=0x484f59 "src/eps/interface/", n=64, p=1, mess=0xbfd6dd80 "Invalid Pointer to Object: Parameter # 1", ctx=0x0) at errabort.c:62 #4 0x01f12f0f in PetscError (line=283, func=0x485104 "EPSSetOperators", file=0x484f51 "setup.c", dir=0x484f59 "src/eps/interface/", n=64, p=1, mess=0x484f88 "Invalid Pointer to Object: Parameter # %d") at err.c:482#5 0x003f6352 in EPSSetOperators (eps=0x65702d65, A=0x8a8ecf8, B=0x8a8f868)at setup.c:283warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)#6 0x01920dbd in SlepcEigenSolver<double>::_solve_generalized_helper (this=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)warning: (Internal error: pc 0x1920c14 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)0x8a411d0, mat_A=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)0x8a8ecf8, mat_B=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)0x8a8f868, nev=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)5, ncv=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)15, tol=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)9.9999999999999887e-11, m_its=warning: (Internal error: pc 0x1920dbc in read in psymtab, but not in symtab.)1000) at src/numerics/slepc_eigen_solver.C:367warning: (Internal error: pc 0x1922558 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)#7 0x01922558 in SlepcEigenSolver<double>::solve_generalized (this=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0x1922274 in read in psymtab, but not in symtab.)warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)0x8a411d0,shell_matrix_A=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)@0xbfd6ebc0, shell_matrix_B=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)@0xbfd6ebb8, nev=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)5, ncv=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)15, tol=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)9.9999999999999887e-11, m_its=warning: (Internal error: pc 0x1922557 in read in psymtab, but not in symtab.)1000) at src/numerics/slepc_eigen_solver.C:336 #8 0x0809499e in ShellEigenSystem::shell_solve (this=0x8a41070) at shell_eigen_system.C:93 #9 0x0806e422 in main (argc=4, argv=0xbfd6f0d4) at ex17.C:168 ------------------------------------------------------------------------ ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ------------------------------------------------------------------------ _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
ex17-shell-matrix.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com
_______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
