<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Dear folks,<br>
I have one question for the ex49. <br>
It do show a way to 'get' the 'coord' by the
'DMDAVecGetArray'. Should I just modified the coordinate on the
'coord' in order to obtain a non-uniform grid? and then, use
DMDAVecRestoreArray to link the modified 'coord' back to 'cda' so
that the 'coord' will be updated to the mesh I want?<br>
<br>
thanks,<br>
Alan<br>
<br>
On 2/22/2013 3:20 PM, Matthew Knepley wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4GmJ0M1RCCihBoD9=fY6szGxNJ239xHi3=CAjgpEorhpqg@mail.gmail.com"
type="cite">
<div dir="ltr">On Fri, Feb 22, 2013 at 3:57 PM, Zhenglun (Alan)
Wei <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_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear
all,<br>
I hope you're having a nice day.<br>
I wonder if anyone could point out a example for me about
the<br>
DMDASetCoordinates(). I found this<br>
(<a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/da/dacorn.c.html#DMDASetCoordinates"
target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/da/dacorn.c.html#DMDASetCoordinates</a>)<br>
online; however it does not really demonstrate how to
create the<br>
'coordinate vector - c'.<br>
Also, I found that in the petsc sub-folder:<br>
/petsc-dev/src/dm/impls/patch has a patch.c, which I
suppose that it<br>
does a local refinement for mesh. Does this a mature model
that we can<br>
use or just a testing code?<br>
</blockquote>
<div><br>
</div>
<div style="">Look at KSP ex49. In the
routine DMDACoordViewGnuplot2d() it reads out the
coordinates.</div>
<div style="">You could just as easily set them in this
fashion.</div>
<div style=""><br>
</div>
<div style=""> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">thanks,<br>
Alan<br>
<br>
On 11/7/2012 6:55 PM, Barry Smith wrote:<br>
> On Nov 7, 2012, at 6:50 PM, Alan <<a
moz-do-not-send="true"
href="mailto:zhenglun.wei@gmail.com">zhenglun.wei@gmail.com</a>>
wrote:<br>
><br>
>> Dear folks,<br>
>> I hope you're having a nice day.<br>
>> I'm testing the Poisson solver in
/src/ksp/ksp/examples/tutorials/ex45.<br>
>> It uses the 'DMDACreate3d' to generate a
Cartisian structured grid and<br>
>> solve it with uniform grid size. However, I
attempt to modify it to<br>
>> obtain solution with a Cartsian structured grid
and non-uniform grid (It<br>
>> is not unstructured local refined mesh). Should I
still use the<br>
>> 'DMDACreate3d' and implement different grid size
in 'ComputeMatrix' and<br>
>> 'ComputeRHS'? In other words, does 'DMDACreate3d'
itself include any<br>
>> mesh size information?<br>
> You can use DMDASetCoordinates() and
DMDAGetCoordinates() (called DMSetCoordinates() and
DMGetCoordinates() in petsc-dev) to keep track of the
coordinates but you are responsible for generating the
correctly scaled entries in the matrix etc.<br>
><br>
> Barry<br>
><br>
>> thanks,<br>
>> Alan<br>
<br>
</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
</div>
</div>
</blockquote>
<br>
</body>
</html>