Add further parallel regions by jblueh · Pull Request #2208 · su2code/SU2

Proposed Changes

Add further parallel regions in discrete adjoint computations.

Changes in this PR also reduce the memory footprint of hybrid parallel AD, by avoiding that freed indices end up in tapes not used thereafter, and by aligning the serial and parallel parts between flow and mesh recording.

Related Work

#1214

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.