Recommended workflow for continuing a TSSolve after making a change to mesh topology
Hello, I am asking for guidance and/or clarification on how one should best handle changes to the mesh topology within TSSetPreStep of a TSSolve. Out current methodology after making the change is: 1. TSReset(ts); 2. DMSetUp(dm); 3. TSSetSolution(ts, sol); 4. TSSetDM(ts, dm); 5. TSSetUp(ts); 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. Kind regards, Ross. ________________________________ Ross Williams PhD Research Associate Glasgow Computational Engineering Centre (GCEC) E: [email protected] W: https://urldefense.us/v3/__https://www.gla.ac.uk/schools/engineering/staff/r... Pearce Lodge, James Watt School of Engineering, University of Glasgow, G12 8QQ, Glasgow, United Kingdom.
You can use TSSetResize, see https://urldefense.us/v3/__https://petsc.org/release/manualpages/TS/TSSetRes... see https://urldefense.us/v3/__https://petsc.org/release/src/ts/tutorials/ex11.c... or https://urldefense.us/v3/__https://petsc.org/release/src/ts/tutorials/ex45.c... for examples that use a DM Il giorno mer 22 ott 2025 alle ore 15:40 Ross Williams < [email protected]> ha scritto:
Hello,
I am asking for guidance and/or clarification on how one should best handle changes to the mesh topology within TSSetPreStep of a TSSolve.
Out current methodology after making the change is:
1. TSReset(ts); 2. DMSetUp(dm); 3. TSSetSolution(ts, sol); 4. TSSetDM(ts, dm); 5. TSSetUp(ts);
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.
Kind regards, Ross.
------------------------------ Ross Williams PhD
Research Associate
Glasgow Computational Engineering Centre (GCEC)
W: https://urldefense.us/v3/__https://www.gla.ac.uk/schools/engineering/staff/r... <https://urldefense.us/v3/__https://www.gla.ac.uk/schools/engineering/staff/rosswilliams/__;!!G_uCfscf7eWS!dIt7_WjFSNIz80F0_FJan8iSDDhDRHEYaqhuBa0vDHLsWHctjh82s3y-z2TLy8E7XoIghMWJ4RMxZDJzoSn2XhKxkoKYazsSh50$>
Pearce Lodge,
James Watt School of Engineering,
University of Glasgow,
G12 8QQ,
Glasgow,
United Kingdom.
-- Stefano
participants (2)
-
Ross Williams -
Stefano Zampini