The closest I’ve seen is Parallelisation, petsc4py, slepc4py, and dolfinx , search for setPythonContext
which in my opinion is the key point you need to adopt. Note that in the class LHS_Class
there is a KSPs[..].solve
, that you will need for inverting Bzz
.