|
955 | 955 |
|
956 | 956 | ! when_to_stop_rtol
|
957 | 957 | ! ~~~~~~~~~~~~~~~~~
|
958 |
| - |
959 |
| - ! Relative error criteria when hitting stop target time. |
960 |
| - ! The system will automatically redo with a smaller timestep to hit a stopping target. |
961 |
| - ! It calculates the following "error" term and retries if it is > 1. |
962 |
| - |
963 |
| - ! :: |
964 |
| - |
965 |
| - ! error = abs(value - target_value)/ & |
966 |
| - ! (when_to_stop_atol + when_to_stop_rtol*max(abs(value),abs(target_value))) |
967 |
| - |
968 |
| - ! :: |
969 |
| - |
970 |
| - when_to_stop_rtol = 1d99 |
971 |
| - |
972 |
| - |
973 | 958 | ! when_to_stop_atol
|
974 | 959 | ! ~~~~~~~~~~~~~~~~~
|
975 | 960 |
|
976 |
| - ! Abolute error criteria when hitting stop target time. |
977 |
| - ! The system will automatically redo with a smaller timestep to hit a stopping target. |
978 |
| - ! It calculates the following "error" term and retries if it is > 1. |
979 |
| - |
980 |
| - ! :: |
| 961 | + ! Relative (``rtol``) and absolute (``atol``) error criteria for |
| 962 | + ! target stopping values. To compare how accurately the last |
| 963 | + ! step satisfied a stopping condition, MESA evaluates :: |
981 | 964 |
|
982 | 965 | ! error = abs(value - target_value)/ &
|
983 |
| - ! (when_to_stop_atol + when_to_stop_rtol*max(abs(value),abs(target_value))) |
| 966 | + ! (when_to_stop_atol + when_to_stop_rtol*max(abs(value), abs(target_value))) |
| 967 | + |
| 968 | + ! and will redo with a smaller timestep if ``error`` is greater |
| 969 | + ! than 1. The default values ``1d99`` for both guarantee that |
| 970 | + ! ``error`` is tiny, so the run terminates as soon as a stopping |
| 971 | + ! condition is reached. |
| 972 | + |
| 973 | + ! If you wish to use either ``rtol`` or ``atol``, you should |
| 974 | + ! change the other to 0 (or your desired value). To see why, |
| 975 | + ! suppose we only set ``when_to_stop_rtol = 1d-3``. Because |
| 976 | + ! ``when_to_stop_atol`` is still ``1d99``, ``error`` will still |
| 977 | + ! be very small and MESA won't redo the last step. |
984 | 978 |
|
985 | 979 | ! ::
|
986 | 980 |
|
| 981 | + when_to_stop_rtol = 1d99 |
987 | 982 | when_to_stop_atol = 1d99
|
988 | 983 |
|
989 | 984 |
|
|
994 | 989 | ! max_age_in_seconds
|
995 | 990 | ! ~~~~~~~~~~~~~~~~~~
|
996 | 991 |
|
997 |
| - ! Stop when the age of the star exceeds this value (in years). |
998 |
| - ! only applies when > 0. |
| 992 | + ! Stop when the age of the star exceeds this value in years, days, or seconds. |
| 993 | + ! Only applies when > 0. |
999 | 994 |
|
1000 | 995 | ! ::
|
1001 | 996 |
|
|
0 commit comments