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.

This is how TerminationTrigger is implemented: It calls this function when a certain file is created.

-erik

On Jun 4, 2026, at 09:31, Jordan Nicoules via Users <users@einsteintoolkit.org> wrote:

Dear all,

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.

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).

Unfortunately I won't be able to join the weekly call today to discuss this directly.

Best,

Jordan
_______________________________________________
Users mailing list
Users@einsteintoolkit.org
http://lists.einsteintoolkit.org/mailman/listinfo/users