<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>AMR is the kind of thing that you put your physics into as opposed to putting AMR in your code. As I said before Chombo and BoxLib are two good options (and probably your only real options). Flow is a common application and both libraries should work for you.</div><br><div><div>On Oct 8, 2012, at 11:45 PM, Alan <<a href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="content-type" content="text/html; charset=GB2312">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Dr. Adams,<br>
Thank you so much for your knowledgable explanation. <br>
You're right. I do want to implement something like Chombo in
PETSc, since I wish my program can solve a flow problem with a
local refined Cartisian mesh. However, it seems to be impossible
for me to do so. My program is not designed for AMR code; however,
I can change its structure for AMR as long as I have a Poisson
Solver AMR method. Do you have any suggestions on this? :)<br>
<br>
thanks,<br>
Alan <br>
<br>
</div>
<blockquote cite="mid:67C5860A-6F0D-42A3-A48C-31C1F4146DCC@columbia.edu" type="cite">Alan, I have recently put PETSc in Chombo. You seem
to be thinking about at putting something like Chombo in PETSc.
Do you have an AMR code?
<div><br>
</div>
<div>The BoxLib project from LBNL also has a PETSc interface.</div>
<div><br>
</div>
<div>I did not follow this whole thread but, and this was probably
already stated, PETSc does not have an interface to HYPRE's
block structured solvers (I don't think). Also, HYPRE does not
really do AMR; they do multi-block solvers, which amounts to
much larger blocks. Its not clear to me how appropriate their
current solvers are for AMR. Do you know?</div>
<div><br>
</div>
<div>That said, HYPRE is actively working with BoxLib on solvers
and so I would expect HYPRE to have more AMR solver
functionality in the future, but that will not be available in
PETSc for a long time (if ever).</div>
<div>
<div><br>
</div>
<div>Mark</div>
<div><br>
<div>
<div>On Oct 7, 2012, at 12:59 PM, Alan <<a moz-do-not-send="true" href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Dear Dr. Brown, <br>
I was trying to use PETSc to mimic something like
Chombo. The figure in this website represents my
thought very well. (<a moz-do-not-send="true" href="https://commons.lbl.gov/display/chombo/Chombo+-+Software+for+Adaptive+Solutions+of+Partial+Differential+Equations">https://commons.lbl.gov/display/chombo/Chombo+-+Software+for+Adaptive+Solutions+of+Partial+Differential+Equations</a>).
My code simulates a flow over a objective, i.e. 2D
cylinder. Finer resolution is needed near the
objective. I can manually define where the finer
resolution is needed.<br>
BTW, I wonder if there is any examples for the
Vec/Mat interface. Also, is there any examples for
PETSc for GPU. <br>
<br>
thanks,<br>
Alan<br>
</div>
<blockquote cite="mid:CAMYG4GnJDWko3Swp8-s=H=aaSTfb-oVqaT1jeu9OVdkXaSDaEA@mail.gmail.com" type="cite">On Sat, Oct 6, 2012 at 10:47 PM, Alan <span dir="ltr"><<a moz-do-not-send="true" href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@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 bgcolor="#FFFFFF" text="#000000">
<div>Dear Dr. Brown, <br>
Thanks for your reply and sorry for
confusing you. <br>
I was trying to ask if there is an
alternative way that I can replace the
DMDACreate3d in
/src/ksp/ksp/example/tutorials/ex45.c with
something from outside of the PETSc (i.e.
HYPRE). DMDACreate3d generates a 3D Cartesian
grid with uniform grid size. However, I'm
trying to import a local refined grid from
outside of the PETSc (i.e. HYPRE) to replace
this 3D Cartesian grid with unifrom grid size.
Is there any examples for me to refer?<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Do we have automatic support for this? No. You
could of course just use the Vec/Mat interface,
but</div>
<div> it sounds like a lot of coding on your part. I
plan to do this eventually by specifying the data
layout over</div>
<div>the grid using PetscSection. However, the
really important question here is, what do you
need from the</div>
<div>grid? If you don't need topological queries,
just make the Vec/Mat and be done with it. If you
do (which</div>
<div>I imagine), then you need to be specific about
what you need.</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 bgcolor="#FFFFFF" text="#000000">
<div> thanks,<br>
Alan<br>
<br>
</div>
<blockquote type="cite">Run any example with
-pc_type hypre. I'm not sure what you're
asking for.<br>
<br>
<div class="gmail_quote">On Sat, Oct 6, 2012
at 8:04 PM, Alan <span dir="ltr"><<a moz-do-not-send="true" href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">Dear Folks,<br>
I hope you're having a nice day.<br>
I'm trying to couple HYPRE with PETSc in
order to use PETSc solvers to<br>
obtain solutions (Poisson Equation) with
local refined grid from HYPRE.<br>
Is there any examples in PETSc that I can
refer? or is there any<br>
examples in PETSc which introduce such a
way that the Matrix is imported<br>
from external software rather than
generated by PETSc.<br>
<br>
thanks,<br>
Alan<br>
<br>
</blockquote>
</div>
<br>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <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>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote></div><br></body></html>