<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://22247/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 8, 2013, at 3:32 PM, Roc Wang <<a href="mailto:pengxwang@hotmail.com">pengxwang@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; 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-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr">Thanks Mat,<br><br>    I tried Chombo for implementing AMR but not tried SAMRAI yet. Chombo can do AMR, but it seems the data structure is quite complicated for customizing usage.  What I want to do with petsc is to compose a simple "home-made" like blocked multi-level grid, though it is not automatically adaptive.  However, I don't have too much experiences on petsc. As of now, I suppose to use DM to manage the data for the big domain and all small sub-domains.  I am not sure whether it is a good idea.  So, any suggestions are appreciated very much.  Thanks again.<br><br></div></div></blockquote><div><br></div><div>As Matt said, this is not what you want to do, most likely.  Building AMR on DM/DA is a lot of work unless you have a simple application and have a clear idea of how to do it.  Chombo is flexible but it is complex and takes time to get started.  I'm not familiar wit SAMARI but I would guess it is like Chombo.  Deall.II might be worth looking into.  I'm not familiar.</div><div><br></div><blockquote type="cite"><div class="hmmessage" style="font-size: 12pt; font-family: Calibri; 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-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div dir="ltr">Best,<br><br><br>   <span class="Apple-converted-space"> </span><br><br><div><hr id="stopSpelling">Date: Thu, 8 Aug 2013 14:03:53 -0500<br>Subject: Re: [petsc-users] implementation of multi-level grid in petsc<br>From:<span class="Apple-converted-space"> </span><a href="mailto:knepley@gmail.com">knepley@gmail.com</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:pengxwang@hotmail.com">pengxwang@hotmail.com</a><br>CC:<span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br><br><div dir="ltr">On Thu, Aug 8, 2013 at 1:29 PM, Roc Wang<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:pengxwang@hotmail.com" target="_blank">pengxwang@hotmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><div class="ecxgmail_extra"><div class="ecxgmail_quote"><blockquote class="ecxgmail_quote" style="border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; "><div dir="ltr">Hi,<br><br>    I am working on multi-level grid for Poisson equation.  I need to refine some sub-region in the computational domain. To this, I plan to build  some boxes (patches) based on the coarsest level. I am using DM to manage the data. I found there is a new function DMPatachCreate() in the version 3.4.  Is this function the right one I should use for the refined region?  If it is not, which ones I should use?<br></div></blockquote><div><br></div><div>That is an experiment and does not work.</div><div> </div><blockquote class="ecxgmail_quote" style="border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; "><div dir="ltr">    My proposed approach is to start with  code dm/impls/patch/examples/tests/ex1.c. And then follow the code /dm/examples/tutorials/ex65dm.c. Is this approach the right way to my goal?<br><br>    In addition, I need to use not only the nodes but also the cells including nodes.  Should I use DMMesh to create the cells? I noticed DMMesh is mainly for unstructured grid, but I didn't find other class that implements structured cells.  Can anybody give me some suggestions on multi-level grid or let me know which examples I should start with? Thanks.<br></div></blockquote></div><br>No, that is not appropriate.</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">It sounds like you want structured AMR. PETSc does not do this, and there are packages that do it.:</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">a) Chombo</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">b) SAMRAI</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">which are both patch-based AMR. If you want octree-style AMR you could use p4est, but it would mean</div><div class="ecxgmail_extra">a lot of coding along the lines of <a href="http://arxiv.org/abs/1308.1472" target="_blank">http://arxiv.org/abs/1308.1472</a>, or Deal.II which is a complete package.</div><div class="ecxgmail_extra">I think Deal is the closest to using PETSc solvers.</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">  Thanks,</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_extra">     Matt<br clear="all"><div><br></div>--<span class="Apple-converted-space"> </span><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</div></div></div></div></div></blockquote></div><br></body></html>