Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Select and configure time integration methods for ODE/PDE simulations. Use when choosing explicit/implicit schemes, setting error tolerances, adapting time steps, diagnosing integration accuracy, planning IMEX splitting, or handling stiff/non-stiff coupled systems.
.claude/skills/numerical-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-15 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
Provide a reliable workflow to select integrators, set tolerances, and manage adaptive time stepping for time-dependent simulations.
| Input | Description | Example | |-------|-------------|---------| | Problem type | ODE/PDE, stiff/non-stiff | stiff PDE | | Jacobian available | Can compute ∂f/∂u? | yes | | Target accuracy | Desired error level | 1e-6 | | Constraints | Memory, implicit allowed? | implicit OK | | Time scale | Characteristic time | 1e-3 s |
Is the problem stiff?
├── YES → Is Jacobian available?
│ ├── YES → Use Rosenbrock or BDF
│ └── NO → Use BDF with numerical Jacobian
└── NO → Is high accuracy needed?
├── YES → Use RK45 or DOP853
└── NO → Use RK4 or Adams-Bashforth| Symptom | Likely Stiff | Action | |---------|--------------|--------| | dt shrinks to tiny values | Yes | Switch to implicit | | Eigenvalues span many decades | Yes | Use BDF/Radau | | Smooth solution, reasonable dt | No | Stay explicit |
| Script | Key Outputs | |--------|-------------| | scripts/error_norm.py | error_norm, scale_min, scale_max | | scripts/adaptive_step_controller.py | accept, dt_next, factor | | scripts/integrator_selector.py | recommended, alternatives, notes | | scripts/imex_split_planner.py | implicit_terms, explicit_terms, splitting_strategy | | scripts/splitting_error_estimator.py | error_estimate, substeps |
references/tolerance_guidelines.mdscripts/integrator_selector.pyscripts/error_norm.py for step acceptancescripts/adaptive_step_controller.pyscripts/imex_split_planner.pyUser: I'm solving the Allen-Cahn equation with a stiff double-well potential. What integrator should I use?
Agent workflow:
bash python3 scripts/integrator_selector.py --stiff --jacobian-available --accuracy high --json
bash python3 scripts/imex_split_planner.py --stiff-terms diffusion --nonstiff-terms reaction --coupling weak --json
rtol/atol consistent with physics and unitsbash# Select integrator for stiff problem with Jacobian python3 scripts/integrator_selector.py --stiff --jacobian-available --accuracy high --json # Compute scaled error norm python3 scripts/error_norm.py --error 0.01,0.02 --solution 1.0,2.0 --rtol 1e-3 --atol 1e-6 --json # Adaptive step control with PI controller python3 scripts/adaptive_step_controller.py --dt 1e-2 --error-norm 0.8 --order 4 --controller pi --json # Plan IMEX splitting python3 scripts/imex_split_planner.py --stiff-terms diffusion,elastic --nonstiff-terms reaction --coupling strong --json # Estimate splitting error python3 scripts/splitting_error_estimator.py --dt 1e-4 --scheme strang --commutator-norm 50 --target-error 1e-6 --json
| Error | Cause | Resolution | |-------|-------|------------| | rtol and atol must be positive | Invalid tolerances | Use positive values | | error-norm must be positive | Negative error norm | Check error computation | | Unknown controller | Invalid controller type | Use i, pi, or pid | | Splitting requires at least one term | Empty term list | Specify stiff or nonstiff terms |
| Error Norm | Meaning | Action | |------------|---------|--------| | < 1.0 | Step acceptable | Accept, maybe increase dt | | ≈ 1.0 | At tolerance boundary | Accept with current dt | | > 1.0 | Step rejected | Reject, reduce dt |
| Controller | Properties | Best For | |------------|------------|----------| | I (integral) | Simple, some overshoot | Non-stiff, moderate accuracy | | PI (proportional-integral) | Smooth, robust | General use | | PID | Aggressive adaptation | Rapidly varying dynamics |
| Coupling | Strategy | |----------|----------| | Weak | Simple operator splitting | | Moderate | Strang splitting | | Strong | Fully coupled IMEX-RK |
references/method_catalog.md - Integrator options and propertiesreferences/tolerance_guidelines.md - Choosing rtol/atolreferences/error_control.md - Error norm and adaptation formulasreferences/imex_guidelines.md - Stiff/non-stiff splittingreferences/splitting_catalog.md - Operator splitting patternsreferences/multiphase_field_patterns.md - Phase-field specific splits| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-23 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 18 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +57 percentage points is the difference between those two pass rates over the 18 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.