<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">No, I have not checked it using Valgrind. Perhaps it will help me trace the problem. <div class=""><br class=""></div><div class="">Regards, </div><div class=""><br class=""></div><div class="">Mukkund<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Jun 2020, at 00:43, Dave May <<a href="mailto:dave.mayhem23@gmail.com" class="">dave.mayhem23@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Is the code valgrind clean?<br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 17 Jun 2020 at 23:25, MUKKUND SUNJII <<a href="mailto:mukkundsunjii@gmail.com" class="">mukkundsunjii@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">I agree with the structured nature of the noise. I did play around with the PetscFV implementation a bit to allow for the computation of different fluxes left and right side of every interface. <div class=""><br class=""></div><div class="">Nevertheless it is indeed strange that the problem disappears when I use a PLEX dm.</div><div class=""><br class=""></div><div class="">Regards, </div><div class=""><br class=""></div><div class="">Mukkund <br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 17 Jun 2020, at 22:53, Dave May <<a href="mailto:dave.mayhem23@gmail.com" target="_blank" class="">dave.mayhem23@gmail.com</a>> wrote:</div><br class=""><div class=""><br class=""><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none" class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="">On Wed 17. Jun 2020 at 21:21, MUKKUND SUNJII <<a href="mailto:mukkundsunjii@gmail.com" target="_blank" class="">mukkundsunjii@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">Yes, precisely! I am not sure how I can replicate using the original version of ex11.c because it does not support bathymetry. <div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><span id="gmail-m_160952809414734522cid:172c40d64737c2455aa1" class=""><Bathymetry.png></span></div><div class=""><br class=""></div><div class="">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)" class="">0.007055 sec</span>) and the dm type is Plex. As you can see, the water surface height is undisturbed as expected.</div><div class=""><span id="gmail-m_160952809414734522cid:172c40d6473c036c0142" class=""><Plex.png></span></div><div class=""><br class=""></div><div class="">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" class=""> </span><br class=""><div class=""><span id="gmail-m_160952809414734522cid:172c40d6473f0fb5d6c3" class=""><p4est.png></span></div><div class=""><br class=""></div><div class=""></div></div></div></blockquote><div dir="auto" class=""><br class=""></div><div dir="auto" class="">The (wrong) result has seemingly a lot of structure. Have you verified your code using p4est is valgrind clean? This looks too much like a weird indexing bug for me to not ask this question.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thanks,</div><div dir="auto" class="">Dave</div><div dir="auto" class=""><br class=""></div><div dir="auto" class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div class=""><div class="">Maybe this paints a better picture. </div><div class=""><br class=""></div><div class="">Regards, </div><div class=""><br class=""></div><div class="">Mukkund </div><div class=""><br class=""></div><div class="">For your reference, the Riemann Solver is a modified version of the HLL solver: <span class=""><b class="">A simple well-balanced and positive numerical scheme for the shallow-water system by </b></span><b class="">Emmanuel Audusse, Christophe Chalons, Philippe Ung. </b></div><div class="">(<a href="https://www.intlpress.com/site/pub/files/_fulltext/journals/cms/2015/0013/0005/CMS-2015-0013-0005-a011.pdf" target="_blank" class="">https://www.intlpress.com/site/pub/files/_fulltext/journals/cms/2015/0013/0005/CMS-2015-0013-0005-a011.pdf</a>)</div></div></div><div style="overflow-wrap: break-word;" class=""><div class=""><span class=""><br class=""><blockquote type="cite" class="">On 17 Jun 2020, at 20:47, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class=""><br class="">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 class=""><br class="">I don't know of any difference from p4est on a non-adapted grid. Can you reproduce this with ex11?<br class=""><br class="">Matt and Toby could answer this better.<br class=""><br class=""><br class="">On Wed, Jun 17, 2020 at 1:33 PM MUKKUND SUNJII <<a href="mailto:mukkundsunjii@gmail.com" target="_blank" class="">mukkundsunjii@gmail.com</a>> wrote:<br class="">Greetings, <br class=""><br class="">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 class=""><br class="">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 class=""><br class="">(forest->transfervec)(dmIn,vecIn,dmOut,vecOut,useBCs,time). <br class=""><br class="">Any information on this particular routine is highly appreciated.<br class=""><br class="">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 class=""><br class="">Thank you for all of your suggestions! <br class=""><br class="">Regards, <br class=""><br class="">Mukkund </blockquote></span></div></div></blockquote></div></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>