Skip to content

A question about the accuracy of the gradient #833

@friedenhe

Description

@friedenhe

Discussed in #714

Originally posted by WZDDZFJ December 4, 2024
In the verification section, you introduced forward-mode differentiation to check the correctness of the gradients. Could you provide an example of using finite differences to directly check the correctness of the gradients? Because I followed the tutorial to analyze the two-dimensional airwing of NACA0012, but when I looked at the gradient file totalderivist.txt, I found that the FFD points in a symmetric position had different gradient values, and the gap was relatively small when it was not deformed, but the gap was large after deformation. For example, what I've framed in red is a typical set of symmetric FFD points. Usually, we use the finite difference method to verify the gradient, that is, manually give a disturbance to the FFD point, see how the objective function changes, and then obtain the gradient value. But in this case of the airfoil, do I perturb one FFD point at a time, or do I perturb a set of symmetric FFD points at the same time and then compare it to the gradient obtained by the discrete adjoint solution?
image
1733314036537

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions