fast-aircraft-design / FAST-OAD

FAST-OAD: An open source framework for rapid Overall Aircraft Design
GNU General Public License v3.0
47 stars 25 forks source link

Fixed crash when using Newton solver or case recorders #434

Closed christophe-david closed 2 years ago

christophe-david commented 2 years ago

Fixes #431

Issue #431 was due to a deepcopy operation that was done when trying to create a VariableList from computed problem.

This deepcopy operation is needed when working on a problem before setup, but has been kept unconditionaly because it avoided test_non_regression_breguet() to fail.

The cause of this failure has been identified: it was coming from the usage of problem.get_val() before running the problem. Not sure if it can be considered as an OpenMDAO bug, but usage of problem.get_val() is now avoided if problem has not been run (that was not really useful anyway).

codecov[bot] commented 2 years ago

Codecov Report

Merging #434 (15282ac) into master (4f6f252) will decrease coverage by 0.04%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #434      +/-   ##
==========================================
- Coverage   89.40%   89.36%   -0.05%     
==========================================
  Files          73       73              
  Lines        4381     4381              
  Branches      701      701              
==========================================
- Hits         3917     3915       -2     
- Misses        336      338       +2     
  Partials      128      128              
Impacted Files Coverage Δ
src/fastoad/openmdao/variables/variable_list.py 93.71% <100.00%> (-0.97%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4f6f252...15282ac. Read the comment docs.