<div dir="ltr">You can use TSSetResize, see <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/TS/TSSetResize/__;!!G_uCfscf7eWS!bKPHXAQZ-u_toOCSRqHnaw4ViCwJhsm3ERuCVrQrcwQ8FVPgv9MoRun-H4K1_bCnB23anEzC8X35rfKJ0STCq-3Dgd_YIAM$">https://petsc.org/release/manualpages/TS/TSSetResize/</a><div>see <a href="https://urldefense.us/v3/__https://petsc.org/release/src/ts/tutorials/ex11.c.html__;!!G_uCfscf7eWS!bKPHXAQZ-u_toOCSRqHnaw4ViCwJhsm3ERuCVrQrcwQ8FVPgv9MoRun-H4K1_bCnB23anEzC8X35rfKJ0STCq-3DyPOLKps$">https://petsc.org/release/src/ts/tutorials/ex11.c.html</a> or <a href="https://urldefense.us/v3/__https://petsc.org/release/src/ts/tutorials/ex45.c.html__;!!G_uCfscf7eWS!bKPHXAQZ-u_toOCSRqHnaw4ViCwJhsm3ERuCVrQrcwQ8FVPgv9MoRun-H4K1_bCnB23anEzC8X35rfKJ0STCq-3DuPkWW0o$">https://petsc.org/release/src/ts/tutorials/ex45.c.html</a> for examples that use a DM</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Il giorno mer 22 ott 2025 alle ore 15:40 Ross Williams <<a href="mailto:Ross.Williams@glasgow.ac.uk">Ross.Williams@glasgow.ac.uk</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 class="msg-9043501784373062393">




<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I am asking for guidance and/or clarification on how one should best handle changes to the mesh topology within TSSetPreStep of a TSSolve.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Out current methodology after making the change is:</div>
<ol style="margin-top:0px;margin-bottom:0px;list-style-type:decimal" start="1">
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div role="presentation" style="text-align:left;text-indent:0px;line-height:18px">
TSReset(ts);</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div role="presentation" style="text-align:left;text-indent:0px;line-height:18px">
DMSetUp(dm);</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div role="presentation" style="text-align:left;text-indent:0px;line-height:18px;color:rgb(0,0,0)">
TSSetSolution(ts, sol);</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div role="presentation" style="text-align:left;text-indent:0px;line-height:18px;color:rgb(0,0,0)">
TSSetDM(ts, dm);</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div role="presentation" style="text-align:left;text-indent:0px;line-height:18px">
TSSetUp(ts);</div>
</li></ol>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I have not found any relevant examples in the documentation so if there is one or an example in another code base, please feel free to direct me towards it.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Kind regards,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Ross.<span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px;color:rgb(0,0,0)"><br>
<br>
</span></div>
<div id="m_-9043501784373062393Signature">
<hr style="text-align:left;text-indent:0px;background-color:rgb(255,255,255)">
<div style="font-family:Calibri,Helvetica,sans-serif;color:rgb(0,0,0)">
<span style="font-size:16px;background-color:rgb(255,255,255)">Ross Williams
</span><span style="font-size:10pt;background-color:rgb(255,255,255)">PhD</span></div>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)">Research Associate</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)">Glasgow Computational Engineering Centre (GCEC)</span><span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)"><br>
<br>
E: <a href="mailto:ross.williams@glasgow.ac.uk" target="_blank">ross.williams@glasgow.ac.uk</a></span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">W:
<a style="margin-top:0px;margin-bottom:0px" id="m_-9043501784373062393OWA6ad4d3ab-8c96-4bb5-a80f-958ded33d072" href="https://urldefense.us/v3/__https://www.gla.ac.uk/schools/engineering/staff/rosswilliams/__;!!G_uCfscf7eWS!dIt7_WjFSNIz80F0_FJan8iSDDhDRHEYaqhuBa0vDHLsWHctjh82s3y-z2TLy8E7XoIghMWJ4RMxZDJzoSn2XhKxkoKYazsSh50$" target="_blank">
https://www.gla.ac.uk/schools/engineering/staff/rosswilliams/</a></span><span style="font-family:Calibri,Helvetica,sans-serif;font-size:16px;color:rgb(0,0,0)"><br>
<br>
</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">Pearce Lodge,</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">James Watt School of Engineering,</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">University of Glasgow,</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">G12 8QQ,</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">Glasgow,</span></p>
<p style="text-align:left;text-indent:0px;background-color:rgb(255,255,255);margin-top:0px;margin-bottom:0px">
<span style="font-family:Calibri,Helvetica,sans-serif;font-size:9pt;color:rgb(0,0,0)">United Kingdom.</span></p>
</div>
</div>

</div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Stefano</div>