**Syntax**

` >>> ITERATION: max_iter`

**Parent Command**

` >> CONVERGE
`

**Subcommand**

` -
`

**Description**

This command sets the maximum number of iTOUGH2 iterations to *max_iter*. If using the Levenberg-Marquardt minimization algorithm, an iTOUGH2 iteration consists of a number of TOUGH2 simulations and includes the following steps:

(1) solution of the forward problem;

(2) evaluation of the Jacobian matrix (requiring n or 2n TOUGH2 simulations depending on whether a forward or centered finite difference quotient is requested, see command `>> JACOBIAN);`

(3) updating of the parameter vector (see also command `>>> STEP);`

(4) check run(s) to see whether the new parameter set leads to a reduction of the objective function; if not, go back to step 3.

If the objective function is successfully reduced, the iteration is completed, and the last check run is used as the solution of the forward problem (step (1) above) for the next iteration. By default, new iterations are performed until one of the following convergence criteria is met (note that different convergence criteria apply if options other than Levenberg-Marquardt optimization are used):

(1) the maximum number of TOUGH2 simulations is reached (see command `>>> SIMULATION)`;

(2) the maximum number of incomplete TOUGH2 simulations is reached (see command `>>> INCOMPLETE)`;

(3) the scaled step size is smaller than the minimum relative step size 10^{-9};

(4) all parameters are at their user-specified bounds;

(5) the objective function is smaller than the relative function tolerance;

(6) the maximum number of unsuccessful uphill steps is exceeded (see command `>>> UPHILL)`;

(7) the Levenberg parameter exceeds 10^{12};

(8) the norm of the gradient vector is smaller than 10^{-5} (optimality criterion).

In most cases, however, it is sufficient to stop the inversion after a few iterations because no significant fit improvement is obtained after about 5 to 15 iterations. Generally more iterations are required with increasing number of parameters and stronger non-linearities of the flow problem. The progress of the objective function reduction can be observed by typing the command prista (see unix script file prista), and inversion can be terminated using the kit command (see unix script file kit). It is suggested to perform a single iTOUGH2 iteration or to use option `>> SENSITIVITY ANALYSIS` prior to running a full inversion in order to check the relative importance and sensitivity of each parameter, the parameter step size, the initial value of the Levenberg parameter, etc.

**Example**

` > COMPUTATION
>> STOP after
>>> : 6 ITERATIONS
<<<
<<`

**See Also**

` >>> SENSITIVITY (op) | >>> CENTERED | >>> FORWARD | >>> INCOMPLETE | >>> SIMULATION | >>> UPHILL
`