Dear Renard, Well I am just testing and the problem (convergence is not an issue before it is solved) is that the solver never ends! It seems that it is stuck in a loop! I mean can it be due to ill-conditioned (not sparse enough) matrix?
Thanks, Danesh On 2010-09-13 11:16, Yves Renard wrote: > > Dear Danesh, > > A priori, it is not a good idea to use sparse preconditionners on nearly > dense > matrices because it will correspond more or less to a full (not optimized at > all) decomposition. So it will be less efficient than a direct solver. A > sparse > preconditionner should be used when the number of non-zero components on a > row > is more or less independent of the problem size. In your case, you probably > have to adapt some specific preconditionners if you want to use iterative > solvers. > > Yves. > > > > On lundi 13 septembre 2010, Danesh Daroui wrote: >> Dear Renard, >> >> I have another question. When I run iterative solvers in GMM++, it takes >> very very long time and sometimes (specially when ILU precond. is used) >> the method >> doesn't even converge. With ILUT and ILUTP I got the error "pivot is too >> small" and i don't know why. But, with direct solvers, it is possible to >> solve it in less time. >> Is it because my matrix is not sparse enough? But I am wondering, if I >> solve a dense system with iterative solver, shouldn't it take in worse >> case, the time equal to >> direct solver? I have run all my tests using GMRES solver. Do you think >> that I may get better result with other iterative solvers in GMM++? >> >> Thanks, >> >> Danesh >> >> On 2010-09-13 08:51, Yves Renard wrote: >>> Dear Danesh >>> >>> If your matrix is nearly dense (if I understand well, in your case, you >>> have more than 30% of nonzero components) the dense format is the better >>> because the linear algebra operations are far more optimized for dense >>> matrices (using blas) than for sparse matrices. >>> >>> Yves. >>> >>> On dimanche 12 septembre 2010, Danesh Daroui wrote: >>>> Dear Renard, >>>> >>>> Thanks for your answer. Yes you are right. In principle, using iterative >>>> solvers for a dense matrix is not a good idea. Maybe for special cases, >>>> but not in general. Please correct me if I am wrong. The reason that I >>>> am using a dense matrix type is that I am using a very large matrix >>>> where I fill each quarter separately. Two of quarters are dense and the >>>> others are very sparse. It is also possible to make the dense quarters >>>> more sparse that I am working on it. For this purpose I thought maybe it >>>> is better to use a dense matrix, however I leave mane zero cells in the >>>> memory. Do you have any suggestion? Is it possible to reference each >>>> quarter using a sparse format matrix like dense format in GMM++? >>>> >>>> Regards, >>>> >>>> D. >>>> >>>> On 2010-09-12 17:09, Renard Yves wrote: >>>>> Dear Danesh, >>>>> >>>>> The template argument for the preconditionner is the matrix type. So >>>>> you should declare >>>>> >>>>> gmm::dense_matrix<double> A(100, 100); >>>>> >>>>> filling the matrix >>>>> >>>>> gmm::ilu_precond<gmm::dense_matrix<double> > P1(A); >>>>> >>>>> >>>>> >>>>> Of course, this is not very satisfactory because an incomplete LU >>>>> decomposition on a dense matrix is a complete LU decomposition. You >>>>> should work with sparse matrices instead. >>>>> >>>>> You can see on the following page of the documentation how to declare >>>>> each preconditionner : >>>>> >>>>> http://download.gna.org/getfem/html/homepage/gmm/iter.html#precondition >>>>> er s >>>>> >>>>> Yves. >>>>> >>>>> Danesh Daroui <[email protected]> a écrit : >>>>>> Dear all, >>>>>> >>>>>> I would like to use GMM++ iterative solvers. The problem is that I can >>>>>> not use for example incomplete LU factorization preconditioner. Let >>>>>> say that I have the equation Ax=b. The I define the preconditioner >>>>>> as: >>>>>> >>>>>> gmm::dense_matrix<double> A(100, 100); >>>>>> >>>>>> // filling the matrix >>>>>> >>>>>> gmm::ilu_precond<double> P1(A); >>>>>> >>>>>> but I get compilation errors. It just compiled successfullt when I >>>>>> define: >>>>>> >>>>>> gmm::ilu_precond<double> P1; >>>>>> >>>>>> but there is no hint and neither sample code to show which function >>>>>> should I call to create the preconditioner. >>>>>> >>>>>> Can anybody help? >>>>>> >>>>>> Regards, >>>>>> >>>>>> D. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Getfem-users mailing list >>>>>> [email protected] >>>>>> https://mail.gna.org/listinfo/getfem-users >>>>> _______________________________________________ >>>>> Getfem-users mailing list >>>>> [email protected] >>>>> https://mail.gna.org/listinfo/getfem-users > -- Danesh Daroui Ph.D Student Lulea University of Technology http://www.ltu.se [email protected] Tel: +46-(0)920-492451 Cell phone: +46-(0)704-399847 _______________________________________________ Getfem-users mailing list [email protected] https://mail.gna.org/listinfo/getfem-users
