Skip to content

Add excludeWRT option to mach StructProblem.addConstraintsPyOpt - #465

Merged
timryanb merged 1 commit into
smdogroup:masterfrom
mdolab:mach-addconstraintspyopt-excludewrt
Jul 15, 2026
Merged

Add excludeWRT option to mach StructProblem.addConstraintsPyOpt#465
timryanb merged 1 commit into
smdogroup:masterfrom
mdolab:mach-addconstraintspyopt-excludewrt

Conversation

@eirikurj

Copy link
Copy Markdown
Contributor

Description

This PR adds a new optional argument excludeWRT to the MACH StructProblem.addConstraintsPyOpt. It allows callers to remove specific DV names from the wrt list (and the corresponding Jacobian blocks) of every constraint registered with pyOptSparse.

This is needed when a DVGeo is attached to the StructProblem but the geometric DVs are not part of the optimization (e.g. structural sizing at a frozen jig shape), since the constraint sensitivities then also contain the geometric DV groups.

The parameter name and semantics are extracted from aux_elem_dv_clean development branch (see PR here), so this can be used independently now.

Allow callers to remove specific DV names from the wrt list (and the
corresponding Jacobian blocks) of every constraint registered with
pyOptSparse. This is needed when a DVGeo is attached to the
StructProblem but the geometric DVs are not part of the optimization
(e.g. structural sizing at a frozen jig shape), since the constraint
sensitivities then also contain the geometric DV groups.

Extracted from the aux_elem_dv_clean development branch so the feature
can be used independently of the promoted-global-DV work.

Co-authored-by: timryanb <41971846+timryanb@users.noreply.github.com>
@eirikurj
eirikurj requested a review from timryanb July 15, 2026 13:36
@timryanb
timryanb merged commit 57751fe into smdogroup:master Jul 15, 2026
9 of 10 checks passed
@timryanb
timryanb deleted the mach-addconstraintspyopt-excludewrt branch July 15, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants