<div dir="ltr"><div dir="ltr">On Mon, Feb 5, 2024 at 10:10 AM GUBERNATIS Pierre <<a href="mailto:pierre.gubernatis@cea.fr">pierre.gubernatis@cea.fr</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 class="msg-2650818663495590611">
<div lang="FR">
<div class="m_-2650818663495590611WordSection1">
<p class="MsoNormal">Hello, <u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I would appreciate an advice on this task, if possible.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">So far, we use PETSc to ‘couple’ two computations of the same simulation code, in a single MPI run.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I simplify but roughly, we have 2 Cartesian domains on which we discretize the same evolution problem.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">These two computations have a common boundary and we want to solve the global problem as if it were a single domain problem.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We use the ‘ghost cells’ paradigm to handle the boundary conditions.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">At each required step of the time algorithm, we update the values in the ghost cells of both domains.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks to these exchanges, we can make a global resolution (as if it were a unique domain) by using PETSc : Each domain builds its part of the main operator and its part of the RHS. PETSc solves the global problem and
broadcasts the partial solutions to each domain. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">This ‘boundary coupling’ of 2 computations works perfectly well with conforming meshes.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">(we can consider this type of coupling as a domain decomposition process, but instead of cutting a domain in two pieces, we merge two domains together).
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">We are extending this method to the non-conforming case (we use a specific library to make the interpolations/mapping from one grid onto the other).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">The non-conforming case doesn’t work so far. Our guess is that the error is in the way we fill the data array of PETSc and we keep on working on it.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Would you see a problem we are missing in this extension to the non-conforming situation ? Do you know a similar work we could look at ?</span></p></div></div></div></blockquote><div><br></div><div>Maybe I am saying things you have already thought of, but I would start by checking the error in my transfer operators. For instance, if it is supposed to preserve constants, if you put a constant field on the two domains, go to the global domain, and then back, it is still the same constant? Does it work with higher polynomials? Once that is assured, we could look at MMS problems.</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 class="msg-2650818663495590611"><div lang="FR"><div class="m_-2650818663495590611WordSection1">
<p class="MsoNormal"><span lang="EN-US">Thanks for any advice….<u></u><u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:blue">Pierre</span></b><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><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>