Closed eytanadler closed 1 month ago
Attention: Patch coverage is 0%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 66.19%. Comparing base (
9ab8eec
) to head (1da9ee3
).
Files | Patch % | Lines |
---|---|---|
cmplxfoil/__init__.py | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Purpose
In some cases, the primal (real) version of XFOIL converges fine, but then the gradient evaluation with the complex version does not converge. Optimizers very much dislike when the primal succeeds and the gradient fails. Most just crash.
One of the reasons I found for this happening is that the tolerances of the real and complex XFOIL versions do not match. This PR fixes this problem. This does not solve all of the situations where the primal succeeds and gradient fails, but it helps many of them. Furthermore, converging the complex evaluations more tightly (by four orders more than before) dramatically improves optimizer convergence near the optimum design, presumably because of more accurate gradients.
Expected time until merged
ASAP as possible
Type of change
Testing
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable