adflow
adflow copied to clipboard
Multiple BC Fix
Purpose
This PR addresses a bug where adding multiple BCs of the same type didn't work as expected. Previously, only the first BC of a given type would be properly added and tracked, but then any subsequent BC of the same type would be ignored. This resulted in incorrect functionals and derivatives with zero seeds.
Using the suggested fixes from PR #323 this should now be fixed. I added a new mesh to input_files
and tests to make sure this is working correctly.
Expected time until merged
1-3 weeks
Type of change
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] 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
- [ ] Maintenance update
- [ ] Other (please describe)
Testing
Run testflo tests/reg_tests/test_multiple_bc.py
to test the changes. You can also run the complex tests in the same file to verify the derivatives are working as expected.
Checklist
- [x] I have run
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formatted - [x] I have formatted the Fortran code with
fprettify
or C/C++ code withclang-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