<div dir="ltr"><div><div><div><div><div><div>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<br><br>
</div>A=PETSc.Mat()<br>A.createNest([mA11,mA12,mA21,mA22])<br><br></div>I get the following error:<br><br> A.createNest([mA11,mA12,mA21,mA22])<br> File "Mat.pyx", line 409, in petsc4py.PETSc.Mat.createNest (src/petsc4py.PETSc.c:85554)<br>
A.createNest([mA11,mA12,mA21,mA22])<br> File "Mat.pyx", line 409, in petsc4py.PETSc.Mat.createNest (src/petsc4py.PETSc.c:85554)<br> File "Mat.pyx", line 197, in petsc4py.PETSc.Mat.__getitem__ (src/petsc4py.PETSc.c:81516)<br>
File "Mat.pyx", line 197, in petsc4py.PETSc.Mat.__getitem__ (src/petsc4py.PETSc.c:81516)<br> File "petscmat.pxi", line 870, in petsc4py.PETSc.mat_getitem (src/petsc4py.PETSc.c:24830)<br> File "petscmat.pxi", line 870, in petsc4py.PETSc.mat_getitem (src/petsc4py.PETSc.c:24830)<br>
TypeError: 'int' object is not iterable<br>TypeError: 'int' object is not iterable<br><br></div>Any ideas ?<br><br>Also, is the following the correct way of setting the nest to a 2x2 block ?<br><br></div>ix=PETSc.IS()<br>
</div>ix.CreateGeneral([0,1])<br></div>A.createNest([mA11,mA12,mA21,mA22],isrows=ix,iscols=ix)<br><div><div><div><br></div><div>Thanks<br></div><div><br></div><div>Amit<br></div><div><div><div><div><br><br></div></div></div>
</div></div></div></div>