Sorry, this was meant to be sent to the Dolfin mailing list. ------- Forwarded message ------- From: "Mads Hoel" <[EMAIL PROTECTED]> To: "Matthew Knepley" <[EMAIL PROTECTED]> Cc: Subject: Re: [DOLFIN-dev] Solving eigenvalue problems with dolfin Date: Wed, 28 Nov 2007 23:21:02 +0100
On Tue, 27 Nov 2007 16:35:52 +0100, Matthew Knepley <[EMAIL PROTECTED]> wrote: > On Nov 27, 2007 9:33 AM, Anders Logg <[EMAIL PROTECTED]> wrote: >> On Tue, Nov 27, 2007 at 04:30:43PM +0100, Thomas Witkowski wrote: >> > Hi, >> > >> > I want to use dolfin for solving eigenvalue problems. I've installed >> > dolfin 0.7.1 with petsc and slepc. The matrix, for which the >> eigenvalues >> > should be computed, is defined in the following way: >> > >> > PETScMatrix C(TS, TS); >> > C.set(.....); >> > C.set(.....); >> >> Try calling >> >> C.apply(); > > Why change the name from assemble()? You even used it in your > description, > and apply() is easily confused with operator application. Perhaps they wanted to avoid confusion with assembling contributions from the element matrices, atleast I found that confusing when I started out with PETSc. The PETSc manual often refer to assembling the matrices, refering to MatAssemblyBegin/MatAssemblyEnd(), that has to be done once the precaching of values are done. But I agree, apply might be equally confusing. What about the name applyChanges? Or perhaps processValues? Then again, not using the name assemble might be confusing if one knows that it is a PETSc matrix one is working with. > > Matt > >> after the set functions. >> >> PETSc needs to "assemble" the changes you made when calling set() >> before you can do anything with the matrix. >> >> -- >> Anders >> >> >> >> > Now, when I'm trying to solve the problem with: >> > >> > SLEPcEigenvalueSolver esolver; >> > esolver.solve(C); >> > >> > I get the following error message: >> > >> > >> > [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 2.3.3, Patch 8, Fri Nov 16 >> > 17:03:40 CST 2007 HG revision: >> 414581156e67e55c761739b0deb119f7590d0f4b >> > [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> > [0]PETSC ERROR: See docs/index.html for manual pages. >> > [0]PETSC ERROR: >> > >> ------------------------------------------------------------------------ >> > [0]PETSC ERROR: ./mass on a linux-gnu named ... by witkowsk Tue Nov 27 >> > 16:17:51 2007 >> > [0]PETSC ERROR: Libraries linked from >> > /u/witkowski/local/petsc-2.3.3-p8/lib/linux-gnu-cxx >> > [0]PETSC ERROR: Configure run at Tue Nov 27 11:24:27 2007 >> > [0]PETSC ERROR: Configure options --with-mpi-dir=/u/witkowski/local >> > --with-clanguage=cxx --download-hypre=yes --with-hypre=1 >> > --download-umfpack=yes --with-umfpack=1 --with-shared=0 >> > [0]PETSC ERROR: >> > >> ------------------------------------------------------------------------ >> > [0]PETSC ERROR: MatMult() line 1616 in src/mat/interface/matrix.c >> > [0]PETSC ERROR: STApply_Shift() line 30 in src/st/impls/shift/shift.c >> > [0]PETSC ERROR: STApply() line 49 in src/st/interface/stsolve.c >> > [0]PETSC ERROR: EPSBasicArnoldi() line 86 in >> src/eps/impls/arnoldi/arnoldi.c >> > [0]PETSC ERROR: EPSSolve_KRYLOVSCHUR() line 91 in >> > src/eps/impls/krylovschur/krylovschur.c >> > [0]PETSC ERROR: EPSSolve() line 71 in src/eps/interface/solve.c >> > Eigenvalue solver (krylovschur) converged in 1 iterations. >> > >> > >> > What does it meen? And what have I made wrong? >> > >> > Regards, >> > >> > Thomas >> > _______________________________________________ >> > DOLFIN-dev mailing list >> > [email protected] >> > http://www.fenics.org/mailman/listinfo/dolfin-dev >> _______________________________________________ >> DOLFIN-dev mailing list >> [email protected] >> http://www.fenics.org/mailman/listinfo/dolfin-dev >> > > > -- Mads Hoel _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
