mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
131 stars 55 forks source link

Complex DVGeometryMulti #153

Closed sseraj closed 2 years ago

sseraj commented 2 years ago

Purpose

With pySurf complexified, I was able to add a complex mode for DVGeometryMulti. The changes mostly involve overloading the pySurf API functions and initializing variables with the correct dtype.

Expected time until merged

1 week

Type of change

Testing

I added a complex version of the derivative test to show that this is working.

Checklist

codecov[bot] commented 2 years ago

Codecov Report

Merging #153 (e3e3bda) into main (7d08ec5) will increase coverage by 0.22%. The diff coverage is 94.31%.

@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
+ Coverage   63.67%   63.89%   +0.22%     
==========================================
  Files          47       47              
  Lines       11724    11745      +21     
==========================================
+ Hits         7465     7505      +40     
+ Misses       4259     4240      -19     
Impacted Files Coverage Δ
pygeo/parameterization/DVGeoMulti.py 89.99% <94.31%> (+0.16%) :arrow_up:
pygeo/parameterization/DVGeo.py 65.66% <0.00%> (+0.93%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

sseraj commented 2 years ago

The c7 image seems to be running into some divide by zero issues. I will try to debug this.

sseraj commented 2 years ago

The problem was the result of adding a real-valued point set to a complex DVGeometryMulti object in the test. This was fortuitously working on the gcc images. The test now works properly on all images.