Skip to content

v2.2.0 - Adjoint flow and cleaning of tbox

Adrien Crovato requested to merge adrien into master

Waves v2.2.0 (flow v1.8.0) - Adjoint solver

This release adds a first version of a validated adjoint solver for flow. It enables the computation of gradients with respect to lots of design variables (such as the mesh coordinates), for a low cost. Additionally, the way of building element matrices for the different modules have been reviewed, and several classes have been refactored or cleaned accordingly.

Changes

  • Add adjoint flow solver for gradients computation
  • Clean Element/Mem classes (#49)
  • Refactor functions
  • Minor changes and bugfixing (thx @R.Boman)

Notes

Element/Mem

  • All the build() methods that were specific to a given physics have been removed from the Element class. These methods have been move to their respective module in ...Term, ...Residual and ...Functional classes. Additionally, the methods are now static.
  • Element now only stores geometric and basic computational information. Accordingly, all the data previously stored in the Mem class gave been gathered into Element, and Mem has been removed. The data (Jacobian, normal vector, etc.) must be initialized before any computation can be carried out. This action is performed using the initValues() method. Additionally, the order of integration for the Gaussian quadrature can be set using this method. Since the gradients of some data (Jacobian, etc.) is required for some computations, they can be initialized using a separate method initGradients(). Once all the data have been initialized, the can be updated as before using the update() method.

Functions

  • All the functions used in flow (F0El, etc.) are now specific to this module. Additionally, they derive from the new Observer class and are not wrapped in python anymore.
  • An Observer class has been added to fwk. It provides a mechanism for self-updating, based on changes occurring in a given class.
  • The functions of tbox (Fct0, etc.) are now smart pointers (40171e0c (comment 5682) has been fixed). Note that these functions are only used in heat and could be moved outside of tbox.

Tests

Tests are passing on ubuntu20.04 (python 3.8.2), and msys2 (python 3.8.1).

Edited by Adrien Crovato

Merge request reports