比起有限差分方法来,运用自动微分方法计算函数的梯度在计算时间和计算精度方面都具有明显的优势.使用伴随模式计算函数的梯度,在XIAMEn软件优化中得到了明显的加速效果.使用Adg系统自动生成伴随模式,大大降低了伴随模式的开发时间和难度.重点讨论了伴随模式实现的几个关键难题,并给出了几个典型应用的数值结果.Compared to the Finite Differecing method,the Automatic Differentiation method has significant advantage in terms of the running time and the computational precision.By using the adjoint model to claculate gradinents,the XIAMEN software is optimized with apperent speedup.The ADG sofware is used to automatically generate the adjoint model,which dramatically reducing the labors and the difficulty of the implementation process.Severel related techniques are discussed and several testing results are presented.国家自然科学基金项目“自动微分方法研究及其实现”(60503031;10871014);国家973项目(2004CB418304);中国科学院重要方向项目(KZCX3-SW-230)的资助