Fix type instabilities, add QA test group, improve per-step allocations#80
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Mar 20, 2026
Merged
Conversation
- Type `dassl` struct fields: `maxorder::Int`, `factorize_jacobian::Bool`
(were `Any`, causing type instability)
- Add `facType` type parameter to `DASSLCache` for type-stable
`jac_factorized` field (was `Any`, now concrete `LU{T,Matrix{T}}`)
- Add pre-allocated work buffers (`t_work`, `y_work`, `errors_work`) to
cache for zero-allocation history access and error estimation
- Add `get_history_t!`/`get_history_y!` that write to work buffers and
return views instead of allocating new vectors each step
- Add `errorEstimates_cache!` and `newStepOrderContinuous_cache!` for
zero-allocation order selection using cache buffers
- Replace `factorize()` with `lu(; check=false)` in in-place path for
consistent concrete return type
- Reorganize tests with QA group (GROUP="QA") containing explicit
imports, type stability, and allocation tests - excludable from
downstream testing
- Add type stability tests and zero-allocation history access tests
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dasslstruct fieldsmaxorder::Anyandfactorize_jacobian::Any→maxorder::Intandfactorize_jacobian::Bool.DASSLCache.jac_factorized::Any→ concreteLU{T,Matrix{T}}type via newfacTypetype parameter.GROUP="QA"containing explicit imports, type stability checks, and allocation tests — excludable from downstream testing viaGROUP="core".t_work,y_work,errors_work) in cache eliminate history vector allocations. Newget_history_t!/get_history_y!return views into buffers. NewerrorEstimates_cache!andnewStepOrderContinuous_cache!for zero-allocation order selection.Changes
src/common.jldasslstruct fields (Any→Int/Bool)src/cache.jlfacTypetype param, work buffers,get_history_t!/get_history_y!src/inplace.jllu(;check=false)for type-stable factorization, adderrorEstimates_cache!/newStepOrderContinuous_cache!, use in-place history accesssrc/DASSL.jlI,luto LinearAlgebra importstest/runtests.jltest/alloc_tests.jlTest plan
maxorder::Int,factorize_jacobian::Bool,jac_factorizedis concreteLUtypeget_history_t!/get_history_y!verifiedAnyfield)GROUP="core"🤖 Generated with Claude Code