Hi,&nbsp;Lisandro<br> <br>I have tried to use BoomerAMG for my problem. My problem is a set of elliptic-type linear PDEs. They  are strong coupled.&nbsp;The&nbsp;convergence&nbsp;was&nbsp;bad.&nbsp;I tried to adjust some parameters, the convergence had some improvements and was always bad. I&nbsp;have&nbsp;little&nbsp;knowledge&nbsp;about&nbsp;your&nbsp;problem.&nbsp;I&nbsp;have&nbsp;discussed&nbsp;my&nbsp;problem&nbsp;with&nbsp;Hypre&nbsp;developers,<br>
 they told me that if the PDEs are strong coupled, it is difficult to use BoomerAMG. <br><br>Regards,<br>Yujie<br><br><div><span class="gmail_quote">On 2/5/08, <b class="gmail_sendername">Lisandro Dalcin</b> &lt;<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
Ben, some time ago I was doing some testing with PETSc for solving<br>incompressible NS eqs with fractional step method. I&#39;ve found that in<br>our software and hardware setup, the best way to solve the pressure<br>problem was by using HYPRE BoomerAMG. This preconditioner usually have<br>
some heavy setup, but if your Poison matrix does not change, then the<br>sucessive solves at each time step are really fast.<br><br>If you still want to use a direct method, you should use the<br>combination &#39;-ksp_type preonly -pc_type lu&#39; (by default, this will<br>
only work on sequential mode, unless you build PETSc with an external<br>package like MUMPS). This way, PETSc computes the LU factorization<br>only once, and at each time step, the call to KSPSolve end-up only<br>doing the triangular solvers.<br>
<br>The nice thing about PETSc is that, if you next realize the<br>factorization take a long time (as it usually take in big problems),<br>you can switch BoomerAMG by only passing in the command line<br>&#39;-ksp_type cg -pc_type hypre -pc_hypre_type boomeramg&#39;. And that&#39;s<br>
all, you do not need to change your code. And more, depending on your<br>problem you can choose the direct solvers or algebraic multigrid as<br>you want, by simply pass the appropriate combination options in the<br>command line (or a options file, using the -options_file option).<br>
<br>Please, if you ever try HYPRE BoomerAMG preconditioners, I would like<br>to know about your experience.<br><br>Regards,<br><br>On 2/5/08, Ben Tay &lt;<a href="mailto:zonexo@gmail.com">zonexo@gmail.com</a>&gt; wrote:<br>
&gt; Hi everyone,<br>&gt;<br>&gt; I was reading about the topic abt inversing a sparse matrix. I have to<br>&gt; solve a poisson eqn for my CFD code. Usually, I form a system of linear<br>&gt; eqns and solve Ax=b. The &quot;A&quot; is always the same and only the &quot;b&quot; changes<br>
&gt; every timestep. Does it mean that if I&#39;m able to get the inverse matrix<br>&gt; A^(-1), in order to get x at every timestep, I only need to do a simple<br>&gt; matrix multiplication ie x=A^(-1)*b ?<br>&gt;<br>&gt; Hi Timothy, if the above is true, can you email me your Fortran code<br>
&gt; template? I&#39;m also programming in fortran 90. Thank you very much<br>&gt;<br>&gt; Regards.<br>&gt;<br>&gt; Timothy Stitt wrote:<br>&gt; &gt; Yes Yujie, I was able to put together a parallel code to invert a<br>&gt; &gt; large sparse matrix with the help of the PETSc developers. If you need<br>
&gt; &gt; any help or maybe a Fortran code template just let me know.<br>&gt; &gt;<br>&gt; &gt; Best,<br>&gt; &gt;<br>&gt; &gt; Tim.<br>&gt; &gt;<br>&gt; &gt; Waad Subber wrote:<br>&gt; &gt;&gt; Hi<br>&gt; &gt;&gt; There was a discussion between Tim Stitt and petsc developers about<br>
&gt; &gt;&gt; matrix inversion, and it was really helpful. That was in last Nov.<br>&gt; &gt;&gt; You can check the emails archive<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; <a href="http://www-unix.mcs.anl.gov/web-mail-archive/lists/petsc-users/2007/11/threads.html">http://www-unix.mcs.anl.gov/web-mail-archive/lists/petsc-users/2007/11/threads.html</a><br>
&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Waad<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; */Yujie &lt;<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>&gt;/* wrote:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; what is the difference between sequantial and parallel AIJ matrix?<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Assuming there is a matrix A, if<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; I partitaion this matrix into A1, A2, Ai... An.<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; A is a parallel AIJ matrix at the whole view, Ai<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; is a sequential AIJ matrix? I want to operate Ai at each node.<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; In addition, whether is it possible to get general inverse using<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; MatMatSolve() if the matrix is not square? Thanks a lot.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Regards,<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; Yujie<br>
&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; On 2/4/08, *Barry Smith* &lt;<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a><br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>&gt;&gt; wrote:<br>
&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For sequential AIJ matrices you can fill the B matrix<br>&gt; &gt;&gt; with the<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; identity and then use<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MatMatSolve().<br>
&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note since the inverse of a sparse matrix is dense the B<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; matrix is<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a SeqDense matrix.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Barry<br>
&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On Feb 4, 2008, at 12:37 AM, Yujie wrote:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Hi,<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Now, I want to inverse a sparse matrix. I have browsed the<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; manual,<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; however, I can&#39;t find some information. could you give me<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; some advice?<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; thanks a lot.<br>
&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Regards,<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Yujie<br>&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; ------------------------------------------------------------------------<br>
&gt; &gt;&gt; Looking for last minute shopping deals? Find them fast with Yahoo!<br>&gt; &gt;&gt; Search.<br>&gt; &gt;&gt; &lt;<a href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping">http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping</a>&gt;<br>
&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt;<br><br><br>--<br>Lisandro Dalcín<br>---------------<br>Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)<br>Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)<br>
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)<br>PTLC - Güemes 3450, (3000) Santa Fe, Argentina<br>Tel/Fax: +54-(0)342-451.1594<br><br></blockquote></div><br>