Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add a Sobolev smoothing method to the discrete adjoint gradient calculation. #1439

Closed
wants to merge 104 commits into from

Conversation

thomasdick
Copy link
Contributor

Proposed Changes

This is a solver I have been working on for some time.
The proposed solver is a treatment of the discrete adjoint sensitivities based on the idea of Sobolev gradient smoothing. This is done by solving an elliptic PDE with the sensitivities, i.e., ( e1 Id - e2 Laplace) delta_x = - dF / dx, with different weights e1, e2.
Such treatment can help prevent noise in the derivative computation and leads to smoother design updates. Especially, when working in a One Shot optimization context.
The new solver constructs the necessary operator and solves it using the finite elements features in SU2. It also includes the possibility to take the mesh parameterization into account and smooth the sensitivities w.r.t. the design parameters.

I will update this draft and the comments, but I wanted to share this first version. I would be happy if anyone wants to comment on it.

The draft needs some steps to be done, including:

  • clean up the comments and make them consistent with SU2 style
  • remove the dependency on Eigen

PR 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.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags, or simply --warnlevel=2 when using meson).
  • My contribution is commented and consistent with SU2 style.
  • 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.

Thomas Dick and others added 30 commits March 29, 2019 15:30
…ions for the linear solver of the FE system.
…dding options and functions to handle zero boundary conditions (Dirichlet + Neumann).
Added output routines to SysVector for debugging.
Added epsilon Parameter for the Laplace-Beltrami-Operator.
Added a multiplication by the stiffness matrix of the adjoint mesh deformation function.
	- added functionality to extract surface connectivity
	- changed CSysMatrix to take other connectivities for the sparsity pattern
	- extended elements to deal with higher dimensional coordinate embedding.
…eatures from previous development merged into the new structure.
…ace.

Included Eigen into SU2 for linear algebra calculations.
Changes to the OneShot history output.
Extensions to the OneShot optimizer output.
  - Group config options for gradient smoothing and One Shot together
  - Fit parameter Jacobian computation into new grid_movement code structure
  - Adaptations to changes in code structure (linear algebra/ parallelisation)
  - Rework of Evaluation/taping for the constraint functions
  - Changed version numbers
  - Calculation of Quad element gradients on boundaries now works as expected.
  - Reset reordering of Ansatz functions in CTRIA1, which was changed by merges.
  - Output of sensitivities from gradient smoothing solver to discrete
    adjoint solver no longer writes non solutions from ghost cells of
    uninvolved ranks.
  - Added functions for resetting solution and mesh.
  - Added a linesearch backtracking loop.
  - Added constraints for design variables.
…le *coord_old) which was accidentaly removed.
Removed some unnecessary functions.
@pr-triage pr-triage bot added the PR: draft label Nov 15, 2021
@thomasdick thomasdick changed the base branch from master to develop November 15, 2021 14:34
Comment on lines +201 to +204
# Eigen library for linear algebra
if get_option('enable-eigen')
su2_deps += [declare_dependency(include_directories: 'externals/eigen')]
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add it as a submodule.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion.
I checked the other WIP projects and it seems that Ole uses Eigen in his draft #1217.
In addition, I found that Eigen is already included in subprojects/Mutationpp/thirdparty/eigen.
I can ask this in the next developer meeting, maybe there is more interest in adding it as a submodule.

@thomasdick
Copy link
Contributor Author

Created a new draft based on a rebased branch with cleaner commit history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants