Closed komatits closed 9 years ago
Done by Daniel Peter @danielpeter in pull request https://github.com/geodynamics/specfem3d_globe/pull/354 : "updates UNDO_ATTENUATION to handle arbitrary NSTEP lengths; uses same NSTEP length for undoing/non-undoing attenuation simulations"
UNDO_ATTENUATION needs the total number of time steps to be a multiple of NT_DUMP_ATTENUATION, and NT_DUMP_ATTENUATION is computed by the code from MEMORY_INSTALLED_PER_CORE_IN_GB (which is defined in DATA/Par_file).
Thus, if one changes MEMORY_INSTALLED_PER_CORE_IN_GB in the Par_file, UNDO_ATT will slightly change the total number of time steps to round it to the next multiple of the new value of NT_DUMP_ATTENUATION that it will compute.
If needed it would not be too difficult to allow for cases in which NSTEP is not a multiple of NT_DUMP_ATTENUATION, it would just mean handling a different (smaller) number of time steps for the last time slice to handle at the end of the simulation (i.e. also the beginning of the time-reversed simulation) because the last slice would have fewer time steps.
Feasible, not too difficult, but not done yet. For now the code instead increases the number of time steps to the next multiple of NT_DUMP_ATTENUATION so that all time slices to handle have the exact same length.