zjwegert / GridapTopOpt.jl

A computational toolbox for level set-based topology optimisation in Julia
MIT License
10 stars 1 forks source link

Improve HPM efficiency #68

Closed zjwegert closed 3 months ago

zjwegert commented 3 months ago

For cases where we are not using auto diff, there are some minor algorithmic improvements that can be made to ensure we are not wasting compute time due to an additional forward solve. When we are using auto diff we solve an adjoint problem for each constraint when computing the sensitivity. This is costly (and wasteful) if done at each iteration of the line search.

In addition, we slightly adjust the default parameters for the line search. Now it is only enforced once the constraints are within a set tolerance. This generally leads to better optimisation histories, especially for problems where constraints are far from saturation and the objective must decrease to improve the constraints.

We address these improvements above in this PR.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 88.37209% with 5 lines in your changes missing coverage. Please review.

Project coverage is 63.24%. Comparing base (d1ff2ce) to head (c327239).

Files Patch % Lines
src/Optimisers/HilbertianProjection.jl 88.37% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #68 +/- ## ========================================== + Coverage 62.79% 63.24% +0.45% ========================================== Files 15 15 Lines 1489 1521 +32 ========================================== + Hits 935 962 +27 - Misses 554 559 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.