set_filename_iteration#
- ConfigMap.set_filename_iteration(iteration: int) None#
Update all forward and adjoint filenames to include an iteration suffix.
Appends
_iter{iteration}to the stem of every filename stored inconfig_mapand_sim_result_info. For example, the base forward filenamefwd_default.fspbecomesfwd_default_iter3.fspwhen called withiteration=3. Each call recomputes the name from the original base so the suffix never accumulates across calls.This method is called by
Optimizationat the start of each iteration so that every forward and adjoint.fspfile written during that iteration receives a unique, traceable name. Iteration0is reserved for the baseline evaluation at the initial parameters; iterations1, 2, …correspond to the optimizer’s parameter updates.- Parameters:
- iteration
int Current optimization iteration index (0-based). Must be a non-negative integer.
- iteration
- Raises:
ValueErrorIf
iterationis not a non-negative integer.