<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p>Hi Erik,</p>
<p><br>
</p>
<p>Thank you for your reply! I know of CCTK_TerminateNext, I actually use it in one of my thorns (so I could hack it to achieve what I want). In fact, a call to this function is what I would add to Trigger.</p>
<p><br>
</p>
<p>My point is more: with the existing thorns, is there a way to terminate a simulation while it's running (and before its expected end based on final time/iteration),
<i>with a parfile directive,</i> without:</p>
<p>- manually editing the termination file</p>
<p>- reaching walltime</p>
<p>- having NaNs</p>
<p>- and such edge cases.</p>
<p><br>
</p>
<p>Something that would be like:</p>
<p>```</p>
<p></p>
<div>Trigger::Trigger_Checked_Variable [0] = "ADMBase::lapse"<br>
Trigger::Trigger_Reduction [0] = "minimum"<br>
Trigger::Trigger_Relation [0] = "<"<br>
Trigger::Trigger_Checked_Value [0] = 0.2<br>
Trigger::Trigger_Reaction [0] = "terminate" # <-- This doesn't exist as far as I understand</div>
```
<p></p>
<br>
</div>
<div dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Thanks,</div>
<div dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<br>
</div>
<div dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Jordan<br>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Users <users-bounces@einsteintoolkit.org> on behalf of Erik Schnetter via Users <users@einsteintoolkit.org><br>
<b>Sent:</b> Thursday, June 4, 2026 14:57<br>
<b>To:</b> users@einsteintoolkit.org<br>
<b>Subject:</b> Re: [Users] Automatic termination trigger mid-run</font>
<div> </div>
</div>
<div>
<table style="width:100%; font-family:Arial; font-size:10pt">
<tbody>
<tr>
<td style="width:5px; background-color:#ffb900"><br>
</td>
<td style="padding:5px 5px; background-color:#FFFFE0"><strong>CUIDADO:</strong> Email de um sistema externo. Cuidado com links, anexos e pedidos de dados/senhas.<br>
<strong>CAUTION:</strong> Email from an external system. Be careful with links, attachments, and requests for data/passwords.
</td>
</tr>
</tbody>
</table>
<div>You can call the function `CCTK_TerminateNext`, which will stop the simulation gracefully after the current iteration finishes. This is built-in, you do not need a special thorn for this.
<div><br>
</div>
<div>This is how TerminationTrigger is implemented: It calls this function when a certain file is created.<br>
<div><br>
</div>
<div>-erik<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On Jun 4, 2026, at 09:31, Jordan Nicoules via Users <users@einsteintoolkit.org> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-style:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; font-size:12pt; font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div style="margin-top:0px; margin-bottom:0px">Dear all,</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">I was wondering if there was a built-in way to trigger the termination of a simulation when something specific happens, along the lines of what Trigger does to steer quantities. From what I understand, Trigger
does not offer that possibility, and TerminationTrigger checks either a file or a time limit. What I'm considering would be more along the lines of "an apparent horizon is found so trigger termination", in order to steer some parameters at recovery.</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">If there's no such explicit way, I'm happy to try to implement that in Trigger. I actually have ideas of other small improvements to Trigger that I could try contributing as well (namely, increase the maximum number
of triggers and allow one trigger to have multiple consequences at once).</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Unfortunately I won't be able to join the weekly call today to discuss this directly.</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Best,</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Jordan</div>
</div>
<span style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<span style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; text-decoration:none; float:none; display:inline!important">Users
mailing list</span><br style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<a href="mailto:Users@einsteintoolkit.org" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">Users@einsteintoolkit.org</a><br style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:400; letter-spacing:normal; orphans:2; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px">http://lists.einsteintoolkit.org/mailman/listinfo/users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>