MatNestSetVecType in petsc4py

Issue #78 closed
Miguel Salazar created an issue

It would be nice if we had this functionality in petsc4py. Now when using a MatNest, the associated vector cannot be VecNest, which difficults its assembly given that it is necessary to assemble a different vector created from the matrix which is MatNest

A = PETSc.Mat()
A.create(PETSc.COMM_WORLD)
A.createNest([[a_11, a_12], [a_21, None]]) # assume a_11, a_12 and a_21 are regular PETSc matrices
x, b = A.createVecs()

and now we have to assemble b from the different vectors, when we could create a VecNest directly and use it with A.

Comments (3)

  1. Log in to comment