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

Add MPhys builder options for residual scaling and solution writing #332

Merged
merged 33 commits into from
Feb 25, 2024

Conversation

A-CGray
Copy link
Member

@A-CGray A-CGray commented Nov 29, 2023

Purpose

Adds two new options to the ADflowBuilder class:

Warning: as explained in OpenMDAO/OpenMDAO#3072 OpenMDAO doesn't currently apply the residual scaling correctly to matrix-free partial derivatives, so any check_partials currently fails if you do any residual scaling. The total derivatives are fine though.

ToDo before merging

Expected time until merged

Type of change

  • 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

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
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@A-CGray A-CGray requested a review from a team as a code owner November 29, 2023 16:58
@A-CGray A-CGray requested a review from lamkina November 29, 2023 16:58
@A-CGray A-CGray requested review from eirikurj and anilyil and removed request for eirikurj November 29, 2023 16:58
@A-CGray A-CGray changed the title Add builder options for residual scaling and solution writing Add MPhys builder options for residual scaling and solution writing Nov 29, 2023
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (a587798) 41.52% compared to head (eabaf88) 41.46%.

Files Patch % Lines
adflow/mphys/mphys_adflow.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #332      +/-   ##
==========================================
- Coverage   41.52%   41.46%   -0.07%     
==========================================
  Files          13       13              
  Lines        4058     4064       +6     
==========================================
  Hits         1685     1685              
- Misses       2373     2379       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@A-CGray
Copy link
Member Author

A-CGray commented Nov 29, 2023

@ArshSaja @anilyil @lamkina can one of you fill out the description of the balance_group input in the ADflowBuilder docstring?

@A-CGray
Copy link
Member Author

A-CGray commented Dec 18, 2023

@lamkina this PR is waiting on someone to address my comment above, and then for #298 to be merged

Comment on lines 1318 to 1319
balance_group : ???, optional
???, by default None
Copy link
Member Author

Choose a reason for hiding this comment

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

@lamkina, @anilyil or @ArshSaja , can one of you write a description for this balance group argument, I don't know what it does but I'm assuming it's something to do with aeropropulsive cases

@A-CGray
Copy link
Member Author

A-CGray commented Jan 31, 2024

This is good to go now I believe

Copy link
Contributor

@lamkina lamkina left a comment

Choose a reason for hiding this comment

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

This looks good to me. Doesn't touch anything outside of the residual scaling so nicely contained. LGTM

@anilyil anilyil merged commit 65c0fc5 into main Feb 25, 2024
16 of 17 checks passed
@anilyil anilyil deleted the builderOptions branch February 25, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants