Download Polyphemus 1.9 User's Guide - GForge
Transcript
4.8. DRIVERS FOR THE VERIFICATION OF ADJOINT CODING Type Maximal iteration Display iterations 4.8 109 [optimizer] Type of optimization solver; only BFGS is supported. The number of the maximal iteration for numerical optimization. If the optimization results during iteration are displayed. Drivers for the Verification of Adjoint Coding The three drivers AdjointDriver, GradientDriver, Gradient4DVarDriver are dedicated to the verifications of adjoint model. The gradient of a given objective function calculated by adjoint model is compared with the gradient calculated by finite difference. The following ratio is checked ρ= J(x + αh) − J(x) α h∇x J, hi where J is the objective function, x is the control variable, h is the perturbation direction, α is the perturbation coefficient, and ∇x J is the gradient calculated by adjoint model, < > denotes inner product. With α → 0, the ratio ρ is supposed to approach to 1 with high precision, then becomes unstable due to round-off errors. In practice, α = D−i , i ∈ [m, m + 1, . . . , n], where D is the decreasing factor (typical values are 2 and 10), m is the integer for largest perturbation (typical value is 0), and n is the integer for smallest perturbation. 4.8.1 AdjointDriver The objective function is chosen to be the model output of a given grid point in model domain with respect to initial model status. The corresponding gradient can therefore be interpreted as the sensitivity. This driver aims at the verification of adjoint code obtained by automatic differentiation of underlying model code using O∂yssée (version 1.7). The following options in section [adjoint] provide flexible control of the verification. [adjoint] Species name of the selected point in model domain for sensitivity calculation. Point nx x-index of the selected point for sensitivity calculation. Point ny y-index of the selected point for sensitivity calculation. Point nz z-index of the selected point for sensitivity calculation. Norm perturbation vector Norm of the initial perturbation vector. With random perturbation With random directions for the perturbation? Decreasing root Decreasing factor of the sequence of perturbation vectors (D). Start index Index for the calculation of the first decreasing ratio (m). End index Index for the calculation of the last decreasing ratio (n). With left finite difference checking Checking left-side finite difference results? Point species name