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

Design variables not correctly reset after running `demoDesignVars` #110

Closed A-CGray closed 2 years ago

A-CGray commented 2 years ago

Description

After running demoDesignVars, the pyGeo design variables appear to be left in whatever state they were in the last written frame. This is an issue because if you then run ADflow, you will be not be the running the baseline geometry you think you are.

Steps to reproduce issue

  1. Setup an ADflow/pyaerostructure case with a DVGeo object
  2. Run demoDesignVars
  3. Run ADflow/pyaerostructure and look at the result in tecplot (the result shown below is from the private MACH tutorial)

Current behavior

Geometric DV's remain in their last perturbed state.

Screenshot_20220126_183702

Expected behavior

Geometric DV's should be reset to their original values at the end of demoDesignVars

I don't understand how this is happening as the DV's appear to be correctly reset in all the intermediate frames, it's only the final perturbed state that is not.