The identification of primal variables and adjoint variables is usually done via indices in operator overloading algorithmic differentiation tools. One approach is a linear management scheme, which is easy to implement and supports memory optimization for copy statements. An alternative approach performs a reuse of indices, which requires more implementation effort but results in much smaller adjoint vectors. Therefore, the vector mode of algorithmic differentiation scales better with the reuse management scheme. In this paper, we present a novel approach that reuses the indices and allows the copy optimization, thus combining the advantages of the two aforementioned schemes. The new approach is compared to the known approaches on a simple synthetic test case and a real-world example using the computational fluid dynamics solver SU2.
翻译:原变量与伴随变量的标识通常通过运算符重载算法微分工具中的索引实现。线性管理方案作为一种简便实现方式,支持对复制语句的内存优化;而索引复用方案虽需更高实现成本,却能显著缩小伴随向量的规模。因此,采用复用管理方案时,算法微分的向量模式表现出更优的可扩展性。本文提出一种新型方法,在复用索引的同时实现复制优化,从而融合上述两种方案的优势。通过简单合成测试案例及基于计算流体动力学求解器SU2的实际算例,将该方法与传统方案进行了对比验证。