<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>OK, got it. <br></div><div><br></div><div>Thanks,<br></div><div><br></div><div>Franck<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>De: </b>"Hong" <hzhang@mcs.anl.gov><br><b>À: </b>"Franck Houssen" <franck.houssen@inria.fr><br><b>Cc: </b>"For users of the development version of PETSc" <petsc-dev@mcs.anl.gov><br><b>Envoyé: </b>Jeudi 24 Août 2017 18:29:46<br><b>Objet: </b>Re: [petsc-dev] How to get L and D from cholesky factorisation ?<br><div><br></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Franck:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" data-mce-style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000;"><div>OK. I 'll try to shed some light on this when I have a MUMPS's guy around !... And try to ask to get that exposed if possible (?).<br></div><div>I guess the answer is the same for getting L and U from LU factorisation (using MUMPS).<br></div></div></div></blockquote><div>Why do you want to see L and U? </div></div></div></div></blockquote><div><br></div><div>Wanted to test an idea "quick and fast" as I supposed I could get L and U easily (as it has been computed somewhere !). Anyway, no big deal.<br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" data-mce-style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000;"><div><br></div><div><br></div><div>What about the same question when using any other package ? (say SUPERLU)<br></div></div></div></blockquote><div>Would Same response, same response from PETSc as well. Logical L and U are actually stored in strange data structures for efficient data accessing</div><div>(see our paper attached),  which are not intended to be exposed to users.</div></div></div></div></blockquote><div><br></div><div>OK, thanks. I'll try to read the paper.<br><div><br></div></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000" data-mce-style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000;"><div><br></div><hr id="m_6666544639857361503zwchr"><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt" data-mce-style="border-left: 2px solid #1010ff; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>De: </b>"Hong" <<a href="mailto:hzhang@mcs.anl.gov" target="_blank" data-mce-href="mailto:hzhang@mcs.anl.gov">hzhang@mcs.anl.gov</a>><br><b>À: </b>"Franck Houssen" <<a href="mailto:franck.houssen@inria.fr" target="_blank" data-mce-href="mailto:franck.houssen@inria.fr">franck.houssen@inria.fr</a>><br><b>Cc: </b>"For users of the development version of PETSc" <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank" data-mce-href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>><br><b>Envoyé: </b>Jeudi 24 Août 2017 17:00:40<br><b>Objet: </b>Re: [petsc-dev] How to get L and D from cholesky factorisation ?<div><div class="h5"><br><div><br></div><div dir="ltr">mumps stores <span style="color:rgb(0,0,0);font-family:"times new roman","new york",times,serif;font-size:16px" data-mce-style="color: #000000; font-family: 'times new roman','new york',times,serif; font-size: 16px;"> LDLt using its private internal data structure, which is not exposed to user and can be used only via mumps API. </span><div><span style="color:#000000;font-family:times new roman,new york,times,serif" data-mce-style="color: #000000; font-family: times new roman,new york,times,serif;"><span style="font-size:16px" data-mce-style="font-size: 16px;">Either ask mumps developer about it or use a debugger to step into mumps source code.</span></span></div><div><span style="color:#000000;font-family:times new roman,new york,times,serif" data-mce-style="color: #000000; font-family: times new roman,new york,times,serif;"><span style="font-size:16px" data-mce-style="font-size: 16px;"><br></span></span></div><div><span style="color:#000000;font-family:times new roman,new york,times,serif" data-mce-style="color: #000000; font-family: times new roman,new york,times,serif;"><span style="font-size:16px" data-mce-style="font-size: 16px;">Hong<br></span></span><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 24, 2017 at 9:46 AM, Franck Houssen <span dir="ltr"><<a href="mailto:franck.houssen@inria.fr" target="_blank" data-mce-href="mailto:franck.houssen@inria.fr">franck.houssen@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" data-mce-style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><div><div style="font-family:"times new roman","new york",times,serif;font-size:12pt;color:rgb(0,0,0)" data-mce-style="font-family: 'times new roman','new york',times,serif; font-size: 12pt; color: #000000;"><div>How to get L (as a Mat) and D (probably as a Vec) from cholesky factorisation ?</div><div><br></div><div>I googled and looked in the doc but didn't find any obvious answer. I am not sure to get the steps to follow: is there a dedicated example ?<br></div><div><br></div><div>To make it short, I have:<br></div><div>PCSetType(pc, PCCHOLESKY); // LDLt<br></div><div>PCFactorSetMatSolverPackage(pc, "mumps");</div><div>PCFactorGetMatrix(pc, &f);</div><div>MatGetInertia(f, ....); // OK !<br></div><div><br></div><div>Now, I would like to get/see L and D: how to get them ?<br></div><div><br></div><div>From petsc/src/ksp/ksp/examples/tutorials/ex52.c, I would say MatGetDiagonal(f, D) returns D: correct ? If so, how to get L as well ?<br></div><div><br></div><div>A related question would be : how to get L and U from a PCLU factorisation ?<span class="m_6666544639857361503gmail-HOEnZb"><span style="color:#888888" data-mce-style="color: #888888;"><br></span></span></div><div><br></div><div>Franck<br></div></div></div></blockquote></div><br></div></div></div></div></div></blockquote><div><br></div></div></div></blockquote></div><br></div></div></blockquote><div><br></div></div></body></html>