Fix sensitivity analysis for step_system!#140
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes sensitivity propagation for stepped Newmark solves by ensuring design variables are written into the augmented parameter vector (paug) when step_system! is used with p, and performs small cleanup/version bump.
Changes:
- Update
step_system!to copy sensitivity/design parameterspinto the tail ofpaug. - Remove commented-out debug
@showlines intake_stepandnewmark_output. - Bump package version to
1.1.2.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/analyses.jl |
Ensures paug includes p during step_system! for correct sensitivity behavior; removes leftover debug comments. |
Project.toml |
Patch version bump consistent with a bugfix release. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # update paug with sensitivity parameters, if they exist | ||
| if !isnothing(p) | ||
| np = length(assembly.points) | ||
| paug[12*np + 1 : 12*np + length(p)] .= p | ||
| end |
There was a problem hiding this comment.
This change alters sensitivity behavior when p is provided, but there is no regression test covering step_system! with a non-nothing p. Adding a test (e.g., using ForwardDiff or ImplicitAD to differentiate a simple stepped response w.r.t. a design variable) would prevent future regressions.
Adding a explicit check on `paug` length for `step_system!`. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
White space cleaning. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@JuliaRegistrator register Release notes: Step system sensitivity analysis patchPatch on |
|
Comments on pull requests will not trigger Registrator, as it is disabled. Please try commenting on a commit or issue. |
Summary
pauginstep_system!when design variablespare provided, fixing incorrect sensitivity analysis for the implicit Euler stepper@showstatements fromtake_stepandnewmark_outputTest plan
step_system!/implicit_eulertests pass (CI)ImplicitADwithstep_system!🤖 Generated with Claude Code