<div class="gmail_quote">On Thu, Feb 2, 2012 at 17:24, gouarin <span dir="ltr">&lt;<a href="mailto:loic.gouarin@math.u-psud.fr">loic.gouarin@math.u-psud.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">No. In those examples, you have the same grid for the velocity and
    the pressure. If I use 4Q1_Q1 elements, I have not the same grid. I
    have one for the velocity and an other for the pressure in the
    DMComposite. And for me, it is the difficulty because as you say
    after, I have to do my own preallocation step to have the good
    off-diagonal blocks.<br></div></blockquote><div><br>Okay, I misinterpreted your notation. For your mixed elements, you would couple with DMComposite.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
    <br>
    This is why I asked what is the best way to construct my matrix. I
    hoped that now it is not necessary to do this preallocation. </div></blockquote><div><br>As long as dynamic preallocation is slow, you need to provide it.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">This is
    also a difficulty to use a multigrid only on the velocity.</div></blockquote></div><br>What is hard about using multigrid only on velocity?<br><br>-pc_type fieldsplit -fieldsplit_velocity_pc_type mg -fieldsplit_velocity_pc_mg_levels 3<br>
<br>will do geometric MG on the velocity block. Note that your elements are slightly non-standard, so depending on how you want to work, you might provide your own coarsening and interpolation.<br>