You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When evalFunctions and evalFunctionsSens is called for each type of constraint, one of two things happens. Either a fresh set of values is returned back to the dict() with all the constraints in it, or a reference to an existing array (which may have been present at previous iterations).
For example, the ThicknessConstraint always passes a reference to a FRESH array of values, whereas the CircularityConstraint passes a reference to the same array each time. If the dict() is manipulated outside, it can affect the internal values. Alternatively, a user may inadvertently save a result from a previous iteration without realizing it's a live reference which can be changed later on. I discovered this will writing reg tests for the circularity constraint.
Should probably be made consistent but this may produce breaking behavior in very few edge cases where people are relying on the current reference behavior.
Code versions
List versions only if relevant
Python
…
The text was updated successfully, but these errors were encountered:
Description
When evalFunctions and evalFunctionsSens is called for each type of constraint, one of two things happens. Either a fresh set of values is returned back to the dict() with all the constraints in it, or a reference to an existing array (which may have been present at previous iterations).
For example, the ThicknessConstraint always passes a reference to a FRESH array of values, whereas the CircularityConstraint passes a reference to the same array each time. If the dict() is manipulated outside, it can affect the internal values. Alternatively, a user may inadvertently save a result from a previous iteration without realizing it's a live reference which can be changed later on. I discovered this will writing reg tests for the circularity constraint.
Should probably be made consistent but this may produce breaking behavior in very few edge cases where people are relying on the current reference behavior.
Code versions
List versions only if relevant
The text was updated successfully, but these errors were encountered: