-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix evalFunctionsSens
for projected area constraint
#253
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
==========================================
- Coverage 65.42% 65.41% -0.02%
==========================================
Files 47 47
Lines 12307 12315 +8
==========================================
+ Hits 8052 8056 +4
- Misses 4255 4259 +4 ☔ View full report in Codecov by Sentry. |
The changes make sense, but I wonder if it is more elegant to have something like:
|
I don't think it matters, this solution would be 1 line longer than what's currently there. |
@eytanadler so glad we figured this out so now you and @hajdik can get the mphys tests working :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent fixes, thank you @A-CGray (in particular for getting to the bottom of those derivatives!
Purpose
The
evalFunctionsSens
method of the projected area constraint currently fails if it is called when there are no geometric design variables because only the creation of the dAp0/1/2 arrays are skipped, but the rest of the function, that uses those arrays, is not. This is fixed by simply skipping everything ifnDV ==0
.Also:
np.random.seed
andnp.random.rand
tonp.random.default_rng
andrng.random
Expected time until merged
Type of change
Testing
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable