[petsc-users] Mat.createNest in petsc4py
Amit Itagi
gcfrai at gmail.com
Fri Apr 4 12:27:21 CDT 2014
I need to use the createNest for some application. I am trying it out on a
toy program. I created four 6x6 AIJ matrices on two processes. I am trying
to create a nest using
A=PETSc.Mat()
A.createNest([mA11,mA12,mA21,mA22])
I get the following error:
A.createNest([mA11,mA12,mA21,mA22])
File "Mat.pyx", line 409, in petsc4py.PETSc.Mat.createNest
(src/petsc4py.PETSc.c:85554)
A.createNest([mA11,mA12,mA21,mA22])
File "Mat.pyx", line 409, in petsc4py.PETSc.Mat.createNest
(src/petsc4py.PETSc.c:85554)
File "Mat.pyx", line 197, in petsc4py.PETSc.Mat.__getitem__
(src/petsc4py.PETSc.c:81516)
File "Mat.pyx", line 197, in petsc4py.PETSc.Mat.__getitem__
(src/petsc4py.PETSc.c:81516)
File "petscmat.pxi", line 870, in petsc4py.PETSc.mat_getitem
(src/petsc4py.PETSc.c:24830)
File "petscmat.pxi", line 870, in petsc4py.PETSc.mat_getitem
(src/petsc4py.PETSc.c:24830)
TypeError: 'int' object is not iterable
TypeError: 'int' object is not iterable
Any ideas ?
Also, is the following the correct way of setting the nest to a 2x2 block ?
ix=PETSc.IS()
ix.CreateGeneral([0,1])
A.createNest([mA11,mA12,mA21,mA22],isrows=ix,iscols=ix)
Thanks
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140404/1c049971/attachment.html>
More information about the petsc-users
mailing list