[WIP] Newton accelaration and stabilization for adjoint runs (including multiphysics)#1217
[WIP] Newton accelaration and stabilization for adjoint runs (including multiphysics)#1217oleburghardt wants to merge 33 commits intodevelopfrom
Conversation
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
| * data structure (R) of similar size to construct a (quasi-) Newton scheme. | ||
| * Have to identify a proper common base class. ---*/ | ||
| template<class Scalar_t> | ||
| class CNewtonUpdateOnSubspace : public CQuasiNewtonInvLeastSquares<Scalar_t> { |
There was a problem hiding this comment.
Is Stroff the reference for this? Or are there modifications to the original RPM?
There was a problem hiding this comment.
It is very close to the original paper by Shroff. They didn't have access to AD derivatives of course, but apart from that, it's an implementation of the RPM algorithm proposed there (forgot to mention "RPM" above, thanks for the hint).
As a next step, I'd like to try out how keeping some "slow" basis vectors across outer loops works out, so that the whole multiphysics thing will hopefully have any gain from identifying them. (Doing it for inner iterations won't help as much, as it takes some iterations before a proper subspace can be formed.)
There was a problem hiding this comment.
👍 I recently found out I should have named the other one "Anderson Acceleration"... 1965 such a hipster method.
There was a problem hiding this comment.
:O Great. There's even a Wiki article on that.. the chapter on relations to other classes of methods is quite interesting, too. Potentially this becomes a corrector toolbox family soon :)
…_discadj_spectrum_analyzer
…_discadj_spectrum_analyzer
…compute() by projectSolution(bool outer).
…_discadj_spectrum_analyzer
|
This pull request introduces 1 alert when merging 418aa7a into 295485c - view on LGTM.com new alerts:
|
|
This pull request introduces 1 alert when merging 56f4893 into 295485c - view on LGTM.com new alerts:
|
…PI), reorganize functions. Eigen not required anymore.
|
@pcarruscag Coming back to our discussion a while ago, it should do MPI now (at least for my testcases it does). I'll clean it up and probably remove Eigen completely. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still a relevant issue please comment on it to restart the discussion. Thank you for your contributions. |
|
WIP |
…_discadj_spectrum_analyzer
… case nOuterIter = 1).
…m/su2code/SU2 into feature_discadj_spectrum_analyzer
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still a relevant issue please comment on it to restart the discussion. Thank you for your contributions. |
Proposed Changes
Similar to the quasi-Newton acceleration provided by
CQuasiNewtonInvLeastSquares, the proposed toolbox classCNewtonUpdateOnSubspaceperforms a correction on adjoint solution updates by keeping track of past iterates. Here, they are used to identify eigenvectors with large eigenvalues which slow down the overall convergence and to form a (small) subspace basis from them. Each fixed-point solution update is then projected onto that subspace and the projected part will be additionally corrected via a "real" Newton step (a.k.a. "RPM") using the computational graph for precise derivative information.This preliminary result with one basis vector indicates that the procedure can be effective at very low additional cost (for n basis vectors, it mainly reduces to n scalar products of the current fixed-point iterate with the basis vectors, the Newton step is cheap as n is small). The residuals are obtained from a fully coupled adjoint CHT problem (2d heated cylinder in laminar flow) with a heatflux objective function.
(Purple: No correction applied, Green/Blue: Usage of 1-dim. basis after extraction of one basis vector at around 500 iterations, Yellow: MPI run with two processes using the manual but MPI-compatible Gram-Schmidt-QR-decomposition for identification of basis vectors.)
The code is WIP. It needs a lot of additions, changes and testing, though the overall structure should be clear from what's already implemented.
ToDo's:
CQuasiNewtonInvLeastSquaresandCNewtonUpdateOnSubspacePR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.