Skip to content

Size rectangular Jacobian buffers from the output - #243

Open
yucheng-du wants to merge 1 commit into
JuliaDiff:masterfrom
yucheng-du:fix/cacheless-rectangular-jacobians
Open

yucheng-du wants to merge 1 commit into
JuliaDiff:masterfrom
yucheng-du:fix/cacheless-rectangular-jacobians

Conversation

@yucheng-du

Copy link
Copy Markdown

The cache-less central and complex Jacobians pass an output buffer the size of the input to f!. A residual with four outputs and three inputs fails with DimensionMismatch. I ran into this while checking the colored Jacobian in #241 on a rectangular residual.

Use the row count of J for the output buffer and evaluate the unperturbed model only for forward differences. The regression test uses the existing non-square colored example and checks that the cached and cache-less calls make the same number of evaluations for all three methods.

The core suite and the OrdinaryDiffEq tridiagonal downstream test passed on Julia 1.13.4. I also checked tall and wide matrices with dense and sparse output against the cached API.

This branch has not been deployed

No deployments
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.

1 participant