Skip to content

Conversation

ChrisRackauckas-Claude
Copy link

Summary

This PR fixes documentation inconsistencies in the Van der Pol problems that still referred to the old ModelingToolkit symbolic syntax after PR #153 converted them to direct function implementations.

Problem

After PR #153 converted the Van der Pol problems from ModelingToolkit symbolic form to direct functions, the documentation still contained references to the old syntax:

with ``μ=1.0`` and ``u_0=[x => \\sqrt{3}, y => 0]``

This is inconsistent with the new implementation which uses array syntax:

prob_ode_vanderpol = ODEProblem(vanderpol, [sqrt(3), 0.0], (0.0, 1.0), [1.0])

Solution

Update the documentation to reflect the new array-based initial conditions and clarify the variable ordering:

Before:

with ``μ=1.0`` and ``u_0=[x => \\sqrt{3}, y => 0]``

After:

with ``μ=1.0`` and ``u_0=[\\sqrt{3}, 0]`` (where ``u[1] = x``, ``u[2] = y``)

Changes Made

  • Fixed prob_ode_vanderpol documentation: Updated initial condition format
  • Fixed prob_ode_vanderpol_stiff documentation: Updated initial condition format
  • Added variable ordering clarification: Explicitly documented that u[1] = x, u[2] = y
  • Maintained mathematical accuracy: All equation documentation remains correct

Files Changed

  • lib/ODEProblemLibrary/src/ode_simple_nonlinear_prob.jl: Lines 71 and 87

Impact

This change improves documentation clarity and consistency with the new direct function implementation, making it easier for users to understand the variable ordering and initial condition format.

Related PRs

🤖 Generated with Claude Code

claude and others added 2 commits August 2, 2025 22:35
…ompilation

This PR rewrites the ModelingToolkit-dependent example problems to use direct ODE function definitions instead of symbolic computation, which significantly improves compilation speed and eliminates circular dependency issues.

## Changes Made

- **Removed ModelingToolkit dependency**: Eliminated ModelingToolkit from dependencies in Project.toml
- **Rewritten ODE problems**: Converted all symbolic ODE definitions to direct function definitions
- **Maintained API compatibility**: All problem exports remain the same
- **Preserved problem accuracy**: Same initial conditions, parameters, and mathematical formulations

## Problems Rewritten

### ode_simple_nonlinear_prob.jl
- Van der Pol equations (prob_ode_vanderpol, prob_ode_vanderpol_stiff)
- ROBER biochemical reactions (prob_ode_rober)
- Rigid body equations (prob_ode_rigidbody)
- Hires problem (prob_ode_hires)
- Orego problem (prob_ode_orego)

### strange_attractors.jl
- Thomas cyclically symmetric attractor (prob_ode_thomas)
- Lorenz equations (prob_ode_lorenz)
- Aizawa equations (prob_ode_aizawa)
- Dadras equations (prob_ode_dadras)
- Chen equations (prob_ode_chen)
- Rössler equations (prob_ode_rossler)
- Rabinovich-Fabrikant equations (prob_ode_rabinovich_fabrikant)
- Sprott equations (prob_ode_sprott)
- Hindmarsh-Rose equations (prob_ode_hindmarsh_rose)

## Benefits

- **Faster compilation**: No symbolic computation overhead
- **Eliminated circular dependencies**: No more ModelingToolkit → DiffEqCallbacks → ODEProblemLibrary → ModelingToolkit cycle
- **Reduced dependency footprint**: Fewer dependencies to install and manage
- **Better test reliability**: No more precompilation failures due to circular dependencies

## Testing

- All tests pass (Aqua.jl quality assurance)
- All rewritten problems maintain correct dimensions, initial conditions, and parameters
- ODE functions are callable and produce finite derivatives
- Maintains backward compatibility with existing code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…ation

Fix documentation inconsistencies in Van der Pol problems that still referred
to the old ModelingToolkit symbolic syntax after the conversion to direct
function implementations.

Changes:
- Update initial condition documentation from `u_0=[x => sqrt(3), y => 0]`
  to `u_0=[sqrt(3), 0]` (where `u[1] = x`, `u[2] = y`)
- Apply fix to both prob_ode_vanderpol and prob_ode_vanderpol_stiff
- Add clarification of variable ordering: u[1] = x, u[2] = y

This ensures the documentation accurately reflects the new array-based
initial condition format while clearly documenting the variable ordering
convention used in the direct function implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas changed the title Update Van der Pol documentation to reflect direct function implementation Remove ModelingToolkit dependency from ODEProblemLibrary for faster compilation Aug 3, 2025
@ChrisRackauckas ChrisRackauckas merged commit 507f7c4 into SciML:master Aug 3, 2025
14 of 19 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.

3 participants