[petsc-users] Create 2 matrix with the same OwnershipRanges

2019-01-22 Thread NENNIG Benoit via petsc-users
Hi, I would like to create a matrix aij with the same OwnershipRanges as an other existing matrix with petsc4py. The two matrices have not the same non zeros patern. Any ideas ? Regards, Benoit

[petsc-users] create a block matrix from existing petsc matrices and/or vectors

2018-11-30 Thread NENNIG Benoit via petsc-users
Dear petsc users, I have parallel matrix A (mpiaij) and I would like to create a matrix B like B = [A v wT 0 ] where wT and v are vectors. A is involved in eigenvalue computation (slepc4py) and B will be used by a direct solver. Currently, the matrix A is built from a sparse scipy matrix th

[petsc-users] petsc4py and mumps (or other direct sparse solver)

2015-04-15 Thread NENNIG Benoit
Dear petsc-users, I am a beginner in petsc and I have some question with the python interface. I am trying to solve problem with mumps (or other direct sparse solver) I have written the following piece of code ksp = PETSc.KSP() ksp.create(PETSc.COMM_WORLD) ksp.setOperators(A) ks