<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 26 Dec 2019 at 21:36, Mark Cunningham <<a href="mailto:mark.cunningham@ariacoustics.com">mark.cunningham@ariacoustics.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I have an application written in python and using petsc4py.  I would like to study the effects of different preconditioners on my eigenvalue spectrum and thought to use KSPComputeOperator to obtain the preconditioned matrix.  This, apparently, is not disclosed through the petsc4py implementation. </div></div></blockquote><div><br></div><div>Could you share the modifications you implemented? This way I could quickly add them to petsc4py to make them available in next release.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> I found KSP.pyx, where I believe that the KSP object is defined, and added a definition for the function but, after a pip install,  </div></div></blockquote><div><br></div><div>If you "cd" to the top level petsc4py source directory with your modifications, then you may need</div><div><br></div><div>$ pip install --no-cache-dir . # note the final dot "."</div><div><br></div><div>otherwise pip may just reinstall petsc4py from a previously built wheel file stored in the pip cache.</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>