<div class="gmail_quote">On Mon, Aug 8, 2011 at 08:40, Clemens Domanig <span dir="ltr"><<a href="mailto:clemens.domanig@uibk.ac.at">clemens.domanig@uibk.ac.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I want my FE-program to be able to use LU- and LDLt-decomp (MUMPS). LU works fine and now I want to implement LDLt. My Questions:<br>
1.) How can I speed up the assembly of the upper triangle matrix?<br>
* '-mat_ignore_lower_triangular' makes it terrible slow<br>
(1000 elements -> 1s explode to 18s<br>
* MatSetValues with Blocks of 6x6 and single values at the diagonal is even worse.<br></blockquote><div><br></div><div>SBAIJ needs different preallocation. If you set it with Mat{Seq,MPI}SBAIJSetPreallocation(), assembly will be fast.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2.) SBAIJ doesn't like MatZeroRows. What are the alternatives to apply boundary conditions to my matrix?<br></blockquote><div><br></div><div>That function would make the matrix nonsymmetric because the columns aren't also zeroed, so you couldn't use it with a symmetric solver anyway. I believe in imposing boundary conditions symmetrically at the local level (either by removing them or by imposing them while computing residuals for those nodes), but many people like to do it differently.</div>
<div><br></div><div>To do boundary conditions by zeroing rows and columns after assembly, you would need to modify the right hand side in a compatible way. We could automate this by having the Mat "remember" the entries in the columns that it zeroed so that each right hand side could automatically be modified before starting the solve, but then solving A*x = b would either yield an x that doesn't satisfy this equation or modify b, both of which I think would be confusing.</div>
<div><br></div><div>Suggestions for imposing boundary conditions globally without ruining symmetry or having confusing semantics would be welcome.</div></div>