with assemble_system you might use cg, if the variational form is symmetric. For mass matrix with bc I've used CG + Jacobi prec.
Kent > Question #108259 on DOLFIN changed: > https://answers.launchpad.net/dolfin/+question/108259 > > N.A. Borggren proposed the following answer: > Hello, > It seems that my Krylov solver was working better a few weeks ago than > now as well. I applied the assemble_system suggestion above but I still > get > an error message for a humble 756x756 matrix that works just fine without > the 'gmres' option in solve. I was relying on 'gmres' before to solve > problems when just "solve(A, self.u1.vector(), b)" (PETSc LU solver, > umfpack) would run out of memory. So I've returned to the conundrum of > how > to solve larger systems when neither of these options work. Any > suggestions? I'm running on Fedora 12 and had quite an adventure (still > unsuccesful on my home computer) making dorsal with the Fedora 11 platform > run. Is it something wrong with my build? > Thanks, > Nathan Borggren > > > Assembling linear system and applying boundary conditions... > Matrix of size 756 x 756 has 9910 nonzero entries. > Solving linear system of size 756 x 756 (Krylov solver). > Traceback (most recent call last): > File "Lorenz.py", line 120, in <module> > z.Run() > File "/home/nborggren/Codes/Aleph/Dynamics/DynSys.py", line 166, in Run > solve(A, self.u1.vector(), b,'gmres') > File > "/home/nborggren/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/cpp.py", > line 3834, in solve > return _cpp.solve(*args) > RuntimeError: *** Error: Krylov solver did not converge. > > > On Mon, Apr 26, 2010 at 1:06 PM, Kent > <[email protected]>wrote: > >> Question #108259 on DOLFIN changed: >> https://answers.launchpad.net/dolfin/+question/108259 >> >> Status: Open => Answered >> >> Kent proposed the following answer: >> > Anders Logg wrote: >> >> Question #108259 on DOLFIN changed: >> >> https://answers.launchpad.net/dolfin/+question/108259 >> >> >> >> Status: Open => Answered >> >> >> >> Anders Logg proposed the following answer: >> >> On Sat, Apr 24, 2010 at 03:38:42AM -0000, Murtazo Nazarov wrote: >> >> >> >>> New question #108259 on DOLFIN: >> >>> https://answers.launchpad.net/dolfin/+question/108259 >> >>> >> >>> Hi, >> >>> >> >>> My solver was working until I recompiled dolfin for some reasons. >> The >> >>> Petcs Krylov solver does not converges: >> >>> >> >>> Solving linear system of size 4184 x 4184 (PETSc Krylov solver). >> >>> terminate called after throwing an instance of 'std::runtime_error' >> >>> what(): *** Error: PETSc Krylov solver did not converge (PETSc >> >>> reason -4). >> >>> >> >>> However it works well with LUSolver. >> >>> >> >>> Does anyone had similar problem? >> >>> >> >> >> >> Are you sure it used to converge? We recently changed a warning to an >> >> error, so it might be that your old solver didn't converge but you >> >> only thought it did. >> >> >> >> >> > >> > I checked now the output of my old solver. It converged with hypre. >> But, >> > now it converges with LUSolver but not with Krylov solver. >> > >> > I simple solve the mass matrix, after applying Dirichlet boundary >> > conditions. >> > >> > murtazo >> > >> >> I've also seen this a number of times. The problem goes away when >> using assemble_system that makes the matrix symmetric. >> >> I don't have a good explaination, though. And I think it is a bit >> strange. >> >> Kent >> >> -- >> You received this question notification because you are a member of >> DOLFIN Team, which is an answer contact for DOLFIN. >> >> _______________________________________________ >> Mailing list: >> https://launchpad.net/~dolfin<https://launchpad.net/%7Edolfin> >> Post to : [email protected] >> Unsubscribe : >> https://launchpad.net/~dolfin<https://launchpad.net/%7Edolfin> >> More help : https://help.launchpad.net/ListHelp >> > > -- > You received this question notification because you are a member of > DOLFIN Team, which is an answer contact for DOLFIN. > > _______________________________________________ > Mailing list: https://launchpad.net/~dolfin > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

