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 in config_map and _sim_result_info. For example, the base forward filename fwd_default.fsp becomes fwd_default_iter3.fsp when called with iteration=3. Each call recomputes the name from the original base so the suffix never accumulates across calls.

This method is called by Optimization at the start of each iteration so that every forward and adjoint .fsp file written during that iteration receives a unique, traceable name. Iteration 0 is reserved for the baseline evaluation at the initial parameters; iterations 1, 2, correspond to the optimizer’s parameter updates.

Parameters:
iterationint

Current optimization iteration index (0-based). Must be a non-negative integer.

Raises:
ValueError

If iteration is not a non-negative integer.