Hello Erik,
as to how to decide to stop: the simplest way would be to compute a pointwise stopping criterion (maybe magnitude of the right-hand-side or so) then do a reduction on it using the CCTK_Reduce function (assuming you are using Carpet), see eg. the code in Hydro_Analysis to compute the center of mass:
https://bitbucket.org/einsteintoolkit/einsteinanalysis/src/master/Hydro_Anal...
the function itself is documented here:
https://www.einsteintoolkit.org/usersguide/UsersGuidech9.html#verbatim-63
Once you have decided to stop, terminate the simulation by calling CCTK_TerminateNext (https://www.einsteintoolkit.org/referencemanual/ReferenceManualch2.html#x4-1...) making sure to have enabled the option to write a checkpoint when terminating (io::checkpoint_on_terminate = yes).
You can read data from the checkpoint as initial data using the filereader interface
https://www.einsteintoolkit.org/thornguide/CactusBase/IOUtil/documentation.h...
and if you need to change grid structure, you can use the ReadInterpolate thorn (https://github.com/rhaas80/ReadInterpolate/tree/master/ReadInterpolate), which is however a bit more complex to use.
If you need to change data in between what was checkpointed and what needs to be evolved you will have to add routines to the INITIAL bin after IOUtil_RecoverIDFromDatafiles (see IOUtil's schedule.ccl).
Hope this helps getting you started.
Yours, Roland
Dear all
I'm trying to construct Brill wave initial data by transforming the elliptic pde equation for the conformal factor in to a wave-like equation with a source. After reaching a stationary state, I want to stop the evolution and give the stationary state as an initial data for the BSSN system.
I'm evolving the wave-like equation with MoL and my question is, How can I stop the MoL evolution if the solution reaches the numerical tolerance and then pass it as initial data?
Erik