[petsc-users] KSPComputeOperator in petsc4py

Lisandro Dalcin dalcinl at gmail.com
Sun Jan 5 04:28:26 CST 2020


On Thu, 26 Dec 2019 at 21:36, Mark Cunningham <
mark.cunningham at ariacoustics.com> wrote:

> 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.
>

Could you share the modifications you implemented? This way I could quickly
add them to petsc4py to make them available in next release.


> 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,
>

If you "cd" to the top level petsc4py source directory with your
modifications, then you may need

$ pip install --no-cache-dir . # note the final dot "."

otherwise pip may just reinstall petsc4py from a previously built wheel
file stored in the pip cache.

-- 
Lisandro Dalcin
============
Research Scientist
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200105/689f80ce/attachment.html>


More information about the petsc-users mailing list