The adjoint problem is a numerical method to compute the gradient in a numerical optimization problem. The adjoint for a linear system **A**x = F is define as :

$$

\boldsymbol{A}^T b = xb

$$

The solver is taking as input the variable $Velocityb$. This variable contains the sensitivity of the cost function $xb$.

### The gradient

We need to compute the gradient for each parameters we have to optimize. Theoretically, we have the right solution when the gradient is equal to zero but we never obtains this value. So we define a lower limit which is define a the gradient is enough low to have a good result.

We need to compute the gradient for each parameter we have to optimize. Theoretically, we have the right solution when the gradient is equal to zero but we never obtain this value. So we define a lower limit which defines the gradient is enough low to consider the result as the best we can obtain.

The optimization will take the gradient and try to found the best choice by doing simulations to find the best direction and will pass to the next iteration.

\ No newline at end of file

For each iteration, we compute the cost function $J$ and its gradient $\frac{\partial J}{\partial}$ which are the input for M1QN3. The solver will provide a new estimate of the state. An iterations is composed by simulations of M1QN3 which try to found the best descent gradient.