Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

  • Added specialized remake function for DAEProblem that properly handles initialization_data
  • Follows the same pattern as existing problem types (ODEProblem, SDEProblem, DDEProblem)
  • Enables proper initialization handling for DAE problems when using Sundials.jl CheckInit functionality

Changes

  • Added remake(prob::DAEProblem; ...) function in src/remake.jl
  • Supports all DAEProblem-specific parameters: du0, differential_vars
  • Handles initialization_data creation and passing through remake
  • Supports lazy_initialization and build_initializeprob flags
  • Maintains backward compatibility with existing API

Motivation

This change is required to support the CheckInit functionality in Sundials.jl (see PR #503) for DAE problems. Without this specialization, the initialization_data was not being properly handled when remaking DAE problems, which prevented proper initialization checks.

Testing

Basic testing confirms the remake function works correctly:

  • Can remake DAEProblem with new u0, p, tspan, du0, differential_vars
  • Preserves initialization_data through remake operations
  • Backward compatible with existing code

Full integration testing with Sundials.jl CheckInit will be possible once both PRs are merged.

Related to: SciML/Sundials.jl#503

🤖 Generated with Claude Code

…port

This commit adds a specialized remake function for DAEProblem that properly handles initialization_data, matching the pattern used in ODEProblem, SDEProblem, and other problem types.

The new remake function:
- Accepts all DAEProblem-specific parameters (du0, differential_vars)
- Handles initialization_data creation and passing through remake
- Supports lazy_initialization and build_initializeprob flags
- Maintains compatibility with existing API

This enables proper initialization handling for DAE problems when using Sundials.jl CheckInit functionality.
@ChrisRackauckas ChrisRackauckas merged commit a3c51f1 into SciML:master Sep 16, 2025
50 of 63 checks passed
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