<div dir="ltr"><div>Hello everybody,</div><div><br></div><div>So, let's say i have the mesh attached to this email that has 2 physical surfaces and 5 physical curves. This gives me 2 strata in the "Cell Sets" and 5 strata in the "Face Sets".<br></div><div>Would something like the following piece of code be the right way to "extract" and manipulate each stratum of the "Cell Sets" to assign them a DS, a TS etc...?</div><div><br></div><div><pre class="gmail-code gmail-highlight" lang="cpp"><span id="gmail-LC54" class="gmail-line" lang="cpp">    <span class="gmail-n">DMLabel</span> <span class="gmail-n">surfacesLabel</span><span class="gmail-p">;</span></span>
<span id="gmail-LC55" class="gmail-line" lang="cpp">    <span class="gmail-n">ierr</span> <span class="gmail-o">=</span> <span class="gmail-n">DMGetLabel</span><span class="gmail-p">(</span><span class="gmail-n">dm</span><span class="gmail-p">,</span> <span class="gmail-s">"Cell Sets"</span><span class="gmail-p">,</span> <span class="gmail-o">&</span><span class="gmail-n">surfacesLabel</span><span class="gmail-p">);</span><span class="gmail-n">CHKERRQ</span><span class="gmail-p">(</span><span class="gmail-n">ierr</span><span class="gmail-p">);</span></span>
<span id="gmail-LC56" class="gmail-line" lang="cpp">    <span class="gmail-n">IS</span> <span class="gmail-n">fluidIS</span><span class="gmail-p">;</span></span>
<span id="gmail-LC57" class="gmail-line" lang="cpp">    <span class="gmail-n">ierr</span> <span class="gmail-o">=</span> <span class="gmail-n">DMLabelGetStratumIS</span><span class="gmail-p">(</span><span class="gmail-n">surfacesLabel</span><span class="gmail-p">,</span> <span class="gmail-mi">2</span><span class="gmail-p">,</span> <span class="gmail-o">&</span><span class="gmail-n">fluidIS</span><span class="gmail-p">);</span><span class="gmail-n">CHKERRQ</span><span class="gmail-p">(</span><span class="gmail-n">ierr</span><span class="gmail-p">);</span></span>
<span id="gmail-LC58" class="gmail-line" lang="cpp">    <span class="gmail-n">DMLabel</span> <span class="gmail-n">fluidLabel</span><span class="gmail-p">;</span></span>
<span id="gmail-LC59" class="gmail-line" lang="cpp">    <span class="gmail-n">ierr</span> <span class="gmail-o">=</span> <span class="gmail-n">DMLabelCreate</span><span class="gmail-p">(</span><span class="gmail-n">PETSC_COMM_WORLD</span><span class="gmail-p">,</span> <span class="gmail-s">"Fluid"</span><span class="gmail-p">,</span> <span class="gmail-o">&</span><span class="gmail-n">fluidLabel</span><span class="gmail-p">);</span><span class="gmail-n">CHKERRQ</span><span class="gmail-p">(</span><span class="gmail-n">ierr</span><span class="gmail-p">);</span></span>
<span id="gmail-LC60" class="gmail-line" lang="cpp">    <span class="gmail-n">ierr</span> <span class="gmail-o">=</span> <span class="gmail-n">DMLabelSetStratumIS</span><span class="gmail-p">(</span><span class="gmail-n">fluidLabel</span><span class="gmail-p">,</span> <span class="gmail-mi">1</span><span class="gmail-p">,</span> <span class="gmail-n">fluidIS</span><span class="gmail-p">);</span><span class="gmail-n">CHKERRQ</span><span class="gmail-p">(</span><span class="gmail-n">ierr</span><span class="gmail-p">);</span></span>
<br></pre><pre class="gmail-code gmail-highlight" lang="cpp"><font face="arial,sans-serif">Once I have the Fluid label linked to the fluidIS (same for the solid), should I call DMPlexLabelComplete on both the labels before proceeding and calling the DMCreateSubDM with their IS ?<br><br></font></pre><pre class="gmail-code gmail-highlight" lang="cpp"><font face="arial,sans-serif">Thanks,<br></font></pre><pre class="gmail-code gmail-highlight" lang="cpp"><font face="arial,sans-serif">Thibault<br></font></pre></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 9 janv. 2022 à 23:04, Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a>> writes:<br>
<br>
> However if you use IMEX for strong coupling of the two physics solved in<br>
> each field, then it means you need to write a single set of PDEs that<br>
> covers everything, don’t you ?<br>
> If I want to solve Euler equations in one PetscDS and heat equation in the<br>
> other one, then I need to write a global set of equations to use the IMEX<br>
> TS , right ?<br>
<br>
Yes.<br>
<br>
You can use multirate integrators, which are like subcycling while controlling splitting error. Most subcycling approaches will limit your global convergence to first order in time. First order with a very small coefficient ("weak coupling") might be okay, but you do need to quantify it for each physical regime and resolution.<br>
</blockquote></div></div>