def setup(self, system):
        if not system.is_active():
            return

        lsize = np.sum(system._local_unknown_sizes[None][system.comm.rank, :])
        size = np.sum(system._local_unknown_sizes[None])
        if trace: debug("creating petsc matrix of size (%d,%d)" % (lsize, size))
        jac_mat = PETSc.Mat().createPython([(lsize, size), (lsize, size)],
                                           comm=system.comm)
        if trace: debug("petsc matrix creation DONE")
        jac_mat.setPythonContext(self)
        jac_mat.setUp()

        if trace:  # pragma: no cover
            debug("creating KSP object for system",system.pathname)
        self.ksp = PETSc.KSP().create(comm=system.comm)
        if trace: debug("KSP creation DONE")
        self.ksp.setOperators(jac_mat)
        self.ksp.setType('fgmres')
        self.ksp.setGMRESRestart(1000)
        self.ksp.setPCSide(PETSc.PC.Side.RIGHT)
        self.ksp.setMonitor(Monitor(self))

        if trace:  # pragma: no cover
            debug("ksp.getPC()")
            debug("rhs_buf, sol_buf size: %d" % lsize)
        pc_mat = self.ksp.getPC()
        pc_mat.setType('python')
        pc_mat.setPythonContext(self)
        if trace:  # pragma: no cover
            debug("ksp setup done")

        self.rhs_buf = np.zeros((lsize, ))
        self.sol_buf = np.zeros((lsize, ))

        if self.preconditioner:
            self.preconditioner.setup(system)
Initialise the store
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/solvers/petsc_ksp.py/PetscKSP.setup--crossover with--dataset/ETHPy150Open correl/Transmission-XBMC/resources/lib/basictypes/xmlgenerator.py/Store.__init__