Hello,

Is there a way to set different number of local rows for each processor when 
using createAIJ with csr option with petsc4py? In petsc documentation it is 
clearly shown ( set int m) but I couldn't figure it out with petsc4py.

I tried the following  but it did not work (ploc is the local number of rows, 
ptot is the total number of rows and it is square sparse matrix)

pA = PETSc.Mat().createAIJ(size=(ploc, ptot, ptot, ptot), 
csr=(indptr.astype(dtype='int32'), indices.astype(dtype='int32'), data))

For petsc4py the createAIJ inputs are as follows:
def 
petsc.Mat.Mat.createAIJ<https://sourcecodebrowser.com/petsc4py/0.7.5/classpetsc_1_1_mat_1_1_mat.html#a341230aed3f44e60da185aaf83572399>

(



self,




size,




bsize = None,




nz = None,




d_nz = None,




o_nz = None,




csr = None,




comm = None


)



Thanks,

Firat

Reply via email to