<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-text-html" lang="x-unicode">
<div class="moz-cite-prefix">Thanks for the fast answer !<br>
<br>
Le 05/11/2017 à 20:06, Matthew Knepley a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4GnYbF+tiA9_t9Wk4913V1w4ThXuH3PFqF44sPMzWHixnA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sun, Nov 5, 2017 at 2:04 PM,
Matthew Knepley <span dir="ltr"><<a
href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span class="">On Sun, Nov
5, 2017 at 1:45 PM, Yann Jobic <span dir="ltr"><<a
href="mailto:yann.jobic@univ-amu.fr"
target="_blank">yann.jobic@univ-amu.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Dear PETSc
expert,<br>
<br>
I first correctly solve the
advection/diffusion equation, with the
advection/diffusion of a gaussian, in a rotate
field.<br>
I'm using finit element, with PetscFE and the
velocity field is in an auxillary one, in
order to correctly set the residual and the
jacobian.<br>
<br>
Then, i would like to use p4est, with AMR. To
do that, I re-use the example :
"petsc/examples/src/dm/impls/f<wbr>orest/examples/tests/ex2.c"<br>
I create a "base" DM, which has everything :
PetscFE, PetscDS, the boundaries, ... Then, i
correctly adapt the mesh, by using :<br>
ierr = DMForestTemplate(base,comm,&po<wbr>stForest);CHKERRQ(ierr);<br>
ierr = DMForestSetAdaptivityLabel(pos<wbr>tForest,adaptLabel);CHKERRQ(ie<wbr>rr);<br>
<br>
My problem is that nothing happens when i'm
solving the system, i.e. my initial solution
does not move, or diffuse.<br>
<br>
That would mean that i didn't correctly
transfer the problem definition. I tried to
attach everything to the adapted mesh, without
succes.<br>
<br>
What is the correct way to transfer the
problem definition (PetscFE and PetscDS) from
one DM to another ?<br>
</blockquote>
<div><br>
</div>
</span>
<div>One way to do it is just</div>
<div><br>
</div>
<div> DMGetDS(dm, &prob);</div>
<div> DMSetDS(newdm, prob);</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
I'm doing it in the attached code, without succes.<br>
<blockquote type="cite"
cite="mid:CAMYG4GnYbF+tiA9_t9Wk4913V1w4ThXuH3PFqF44sPMzWHixnA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<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">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>I think I have this working automatically now
in</div>
<div><br>
</div>
<div> knepley/feature-adaptor-plex</div>
<div><br>
</div>
<div>Check out the test in SNES ex12</div>
<div><br>
</div>
<div> make -f ./gmakefile test
globsearch="snes_tutorials-<wbr>runex12_quad_q1_adapt_0"
EXTRA_OPTIONS="-dm_adapt_view
hdf5:$PWD/adapt.h5"</div>
<div> ./bin/petsc_gen_xdmf.py adapt.h5</div>
<div><br>
</div>
<div>and then look at adapt.xmf in Paraview. This
also works if you try it with simplicial meshes
and Pragmatic, see tri_p1_adapt_1.</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I just looked at your code. That is not going to
adapt I think because there is nothing in TS to do it
automatically yet. You can see it done by hand</div>
<div>in TS ex11. I am slowly marching through getting all
this stuff hooked up. I will get to TS hopefully by the
end of the year.</div>
</div>
</div>
</div>
</blockquote>
Yes i also looked at it . But i have the same problem using
Vectagger and refinebox. I just wanted a smaller example to
reproduce it.<br>
The thing here is that i just want to use the adapted mesh from
the initial condition, and then fixe it for the rest of the
simulation, even if the gaussian is moving (as a first step).<br>
It should be easier, but i still didn't succed. <br>
Do you think i have another problem ?<br>
<br>
Thanks,<br>
<br>
Yann<br>
<br>
<blockquote type="cite"
cite="mid:CAMYG4GnYbF+tiA9_t9Wk4913V1w4ThXuH3PFqF44sPMzWHixnA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div> Thanks,</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 class="gmail_extra">
<div class="gmail_quote">
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<span class="">
<div> </div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"> Many
thanks in advance,<br>
<br>
Regards,<br>
<br>
Yann<br>
<br>
</blockquote>
</span></div>
<span class="HOEnZb"></span></div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</body>
</html>