Closed sseraj closed 1 year ago
Merging #187 (49d6108) into main (b7f1bfb) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #187 +/- ##
=======================================
Coverage 64.76% 64.77%
=======================================
Files 47 47
Lines 11949 11951 +2
=======================================
+ Hits 7739 7741 +2
Misses 4210 4210
Impacted Files | Coverage Δ | |
---|---|---|
pygeo/parameterization/DVGeoMulti.py | 91.05% <100.00%> (+0.01%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Purpose
I changed the total Jacobian computation in DVGeometryMulti to use sparse matrices instead of dense matrices. I followed one of SciPy's recommended approaches by using
lil_matrix
for construction and then converting tocsr_matrix
for faster arithmetic. This approach required minimal changes to the code.The memory usage was not dramatically different for the cases I tested because the Jacobian is usually not very sparse. Still, the memory used by the sparse Jacobian was about 60% of the memory used by the dense Jacobian for the largest case I tested (around 140k surface points and 270 geometric DVs).
Expected time until merged
1 week
Type of change
Testing
The current DVGeometryMulti test passes, which shows that the derivatives are still correct.
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