<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Greeting,<div><br></div><div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div class="gmail_quote"><div>transferring from one grid to another. Here it looks like it is artificially diffusive, but I do not</div><div>see a reason for this pattern if you did the refinement initially, and not with p4est, since then the base grid is the same as the Plex. Is that what your code does?</div></div></div></blockquote></div></div></blockquote><div><br></div>I am not sure how to differentiate the refining method. For the results that does not have this pattern, I provide the following command line options: -dm_type plex -grid_size 32,32. For the one that shows this odd pattern, the command line options I provide are: -dm_type p4est -dm_refine 5. </div><div><br></div><div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Also, when using p4est, the orientation of the cells are different than the one generated when refining with DMPlex alone. I would double-check the code if you are not making any assumption ons it </div></div></blockquote><div><br></div><div>I suppose this could indeed be the case as I do fiddle around with the Riemann solver interface in petscfv.c</div><br><div dir="ltr">Regards,<div>Mukkund Sunjii </div><div><br></div><div>Sent on the go.</div></div><div dir="ltr"><br><blockquote type="cite">On 18 Jun 2020, at 10:40 PM, Stefano Zampini <stefano.zampini@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Also, when using p4est, the orientation of the cells are different than the one generated when refining with DMPlex alone. I would double-check the code if you are not making any assumption ons it <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno gio 18 giu 2020 alle ore 23:24 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Wed, Jun 17, 2020 at 3:21 PM MUKKUND SUNJII <<a href="mailto:mukkundsunjii@gmail.com" target="_blank">mukkundsunjii@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Yes, precisely! I am not sure how I can replicate using the original version of ex11.c because it does not support bathymetry. <div><br></div><div>Regardless, to demonstrate the discrepancy, I have uploaded three plots. The scenario is a lake at rest. Essentially, you have a varying bathymetry but a level water surface. If the model is well balanced, then the water surface height must not change. The description of the files are below </div><div><br></div><div>1) Bathymetry.png : It shows you the bathymetry profile (z(x)) and the water surface height (H = h+z(x)) at t = 0.</div></div></blockquote><div><br></div><div>Hmm, that does look like a bug. The purpose of TransferVec is to preserve moments when transferring from one grid to another. Here it looks like it is artificially diffusive, but I do not</div><div>see a reason for this pattern if you did the refinement initially, and not with p4est, since then the base grid is the same as the Plex. Is that what your code does?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><Bathymetry.png></div></div><div><br></div><div>2) Plex.png : This is the water surface height after 1 time step (<span style="color:rgb(12,255,0);font-family:"Andale Mono";background-color:rgba(255,255,255,0.9)">0.007055 sec</span>) and the dm type is Plex. As you can see, the water surface height is undisturbed as expected.</div><div><div><Plex.png></div></div><div><br></div><div>3) P4est.png : This is the result after 1 time step (same final time) if I set the dm type as p4est. The noise is in the order of 1e-3 to be a little more specific. Since its not specifically at the boundaries and more or less spread throughout, it could indeed be noise introduced. But of course I could be wrong. <span style="white-space:pre-wrap"> </span><br><div><div><p4est.png></div></div><div><br></div><div>Maybe this paints a better picture. </div><div><br></div><div>Regards, </div><div><br></div><div>Mukkund </div><div><br></div><div>For your reference, the Riemann Solver is a modified version of the HLL solver: <span><b>A simple well-balanced and positive numerical scheme for the shallow-water system by </b></span><b>Emmanuel Audusse, Christophe Chalons, Philippe Ung. </b></div><div>(<a href="https://www.intlpress.com/site/pub/files/_fulltext/journals/cms/2015/0013/0005/CMS-2015-0013-0005-a011.pdf" target="_blank">https://www.intlpress.com/site/pub/files/_fulltext/journals/cms/2015/0013/0005/CMS-2015-0013-0005-a011.pdf</a>)</div><span><br><blockquote type="cite">On 17 Jun 2020, at 20:47, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br><br>So you get this noise with a regular grid in p4est. So the same grid as will Plex, and you are not getting the same results.<br><br>I don't know of any difference from p4est on a non-adapted grid. Can you reproduce this with ex11?<br><br>Matt and Toby could answer this better.<br><br><br>On Wed, Jun 17, 2020 at 1:33 PM MUKKUND SUNJII <<a href="mailto:mukkundsunjii@gmail.com" target="_blank">mukkundsunjii@gmail.com</a>> wrote:<br>Greetings, <br><br>I am a master’s student working on the shallow water model of the TS example 'ex11.c' as part of my thesis. Therefore, I am working with DMForest for the implementation of adaptive grids. I have a question and an observation. <br><br>I am trying to find relevant information about interpolation that takes place through the routine DMForestTransferVec. Perhaps it could be my inability to find it, but I am unable to locate the implementation of the routine <br><br>(forest->transfervec)(dmIn,vecIn,dmOut,vecOut,useBCs,time). <br><br>Any information on this particular routine is highly appreciated.<br><br>Furthermore, I have developed a well balanced Riemann Solver that includes topography in the model. In the process of testing both the non-adaptive and adaptive version, I found that my results differed when I changed the type of DM. For instance, when I run a scenario in a fixed, non-adaptive grid with a DM of type 'P4est', I find that the well balanced nature is lost due to small perturbations all across the domain. However, this does not occur when I use a DM of type ‘plex’. Is there a radical change in the routines between the two DM’s? This is not as much of a question as it is an observation. <br><br>Thank you for all of your suggestions! <br><br>Regards, <br><br>Mukkund <br> <br><br></blockquote></span><br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Stefano</div>
</div></blockquote></div></body></html>