adflow icon indicating copy to clipboard operation
adflow copied to clipboard

Added new tests for two consecutive adjoint runs

Open sabakhshi opened this issue 1 year ago • 2 comments

Purpose

In the development effort for SST, it was discovered that Tapenade was causing changes to the solutions states after an adjoint run due to a bug. To ensure that this was not a systematic problem throughout the code and to catch future instances of this issues appearing, I added two new adjoint tests. The first runs the adjoint twice back to back to ensure that the results didn't change. The second runs the adjoint twice back to back and checks to make sure that the states have not changed between the runs.

Expected time until merged

2-3 weeks

Type of change

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (non-backwards-compatible fix or feature)
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no API changes)
  • [ ] Documentation update
  • [x] Maintenance update
  • [ ] Other (please describe)

Testing

The new feature is a new test.

Checklist

  • [ ] I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • [ ] I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • [x] I have run unit and regression tests which pass locally with my changes
  • [x] I have added new tests that prove my fix is effective or that my feature works
  • [ ] I have added necessary documentation

sabakhshi avatar Aug 30 '24 21:08 sabakhshi

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.05%. Comparing base (4be4ccb) to head (6917616). Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
+ Coverage   41.02%   41.05%   +0.02%     
==========================================
  Files          13       13              
  Lines        4119     4119              
==========================================
+ Hits         1690     1691       +1     
+ Misses       2429     2428       -1     

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

codecov[bot] avatar Aug 30 '24 21:08 codecov[bot]

Also note that the black and flake8 tests are failing, please fix them. Remember that we currently use black==23.1.0 and custom flake8 settings

marcomangano avatar Sep 23 '24 21:09 marcomangano

Everything should be addressed. Re-requesting your review.

sabakhshi avatar Nov 06 '24 21:11 sabakhshi