<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>@ Aron Ahmadia:</div><div><br></div><div><br></div><div><blockquote type="cite">Conversion between ndarray<br>and PETSc Vecs is practically free, so I would keep them as numpy arrays<br>for as long as possible (this is the strategy in pyclaw).</blockquote><br></div><div>Thanks for the hint. I was wondering whether I should start with a working prototype based on numpy, then do parallelization with PETSc on demand - or start with PETSc wherever matrices and vectors are needed.</div><div><br></div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Also, I'm excited by the new opportunities for parallel programming and<br>development offered by the IPython parallel programming extensions (<br><a href="http://ipython.org/ipython-doc/dev/parallel/index.html">http://ipython.org/ipython-doc/dev/parallel/index.html</a>), but have not had a<br>chance to try them out. If you get a chance to use them for development,<br>please let us know if you find them to be useful.</span></blockquote></div><br><div>You're not the first person to mention iPython, so I'll definitely have a look and let you know in case I have used it successfully.</div><div><br></div><div><br></div><div>@ Lisandro Dalcin:</div><div><br></div><div><blockquote type="cite">For matrices, it depends on the matrix type. For dense matrices,<br>currently petsc4py does not support getting the array. For sparse (aka<br>AIJ) matrices, you can use mat.getValuesCSR(), however this will<br>involve copies. For the other way, you can use<br>PETSc.Mat().createAIJ(size=(nrows,ncols), csr=(ai,aj,aa)).<br></blockquote><br></div><div>That's basically what I wanted to know.</div><div><br></div><div><br></div><div>ps. Thanks for providing petsc4py. Being able to develop in Python is currently saving me a lot of time and pain (compared to the alternative, C++)</div></body></html>