On Tue, May 25, 2010 at 4:04 AM, Mohammad Mirzadeh <span dir="ltr"><<a href="mailto:mirzadeh@gmail.com">mirzadeh@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Dear all,<div><br></div><div>My name is Mohammad and I am a PhD student at the University of California, Santa Barbara. I am currently working on a code that uses OcTree data structures to generate adaptive Cartesian grids for finite difference approximations to PDEs. I am interested in making my code parallel by using PETSc. However there are some issues I am not sure about.</div>
</div></blockquote><div><br></div><div>Parallelizing an octree is not trivial, and several packages already exist:</div><div><br></div><div> - DealII from Wolfgang Bangreuth, et. al.</div><div><br></div><div> - p4est from Carsten Burstedde and Lucas Wilcox</div>
<div><br></div><div> - Dendro from George Biros, et. al.</div><div><br></div><div>I would first understand why I was not using these packages. That would help us respond intelligently.</div><div>DealII uses PETSc for solvers already, and p4est should be able to interface soon.</div>
<div><br></div><div>Another example is the PetFMM code which manages a uniform, parallel octree using the Sieve</div><div>communication structures from PETSc to calculate a Fast Multipole transform.</div><div><br></div><div>
Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div>My code is relatively a huge one, above 35-40K of lines, and is written in c++ so that it enables us to use all good features like objects and templates. There are several places I can benefit from PETSc. The most obvious one, and easiest to implement, is just to use PETSc as my linear solver. i.e so everything in serial but only solve the linear system in parallel using PETSc. However, this is not enough and I'd like to do more. The problem, however, is that I am using lots of data structures and objects and my question is the possibility of using PETSc along with them, i.e is it possible to write a kind of interface that translates my objects to PETSc variables?</div>
<div><br></div><div>For instance, I have an object called OctCell, which is an octree type of cell which has a lot of information inside (what are the neighbors, what are connected nodes, who is the parent of this cell, who are the childs, etc). My grid, is then generated consisting of such (and other objects like OctNode and so on) objects, i.e my grid is an array of such objects. Right now, the template feature of c++ allows me to do this very naturally. Now I'm wondering if it is possible to use array data structures in PETSc instead of array types and still pass my objects as some sort of template? (I know PETSc is written in c which does not support template -- still I'm hopeful!) This way, my grid generation would also run in parallel which saves me a considerable amount of time.</div>
<div><br></div><div>Thanks in advance and sorry for the lengthy email.</div><div><br></div><font color="#888888"><div>-M</div></font></div>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>