Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
beita6969 avatar

Numerical Integration

  • 16 installs
  • 869 repo stars
  • Updated June 8, 2026
  • beita6969/scienceclaw

numerical-integration is a skill that selects and configures time-integration methods and adaptive stepping for ODE and PDE simulations.

About

This skill guides selecting and configuring time integration methods for ODE and PDE simulations. A developer classifies stiffness, chooses an integrator like RK45, BDF, or Rosenbrock, sets tolerances, and controls adaptive time steps. It also plans IMEX splitting for mixed stiff and non-stiff systems. It matters for keeping time-dependent simulations accurate and efficient.

  • Integrator selection flowchart for stiff vs non-stiff ODE/PDE problems
  • Five scripts: error norm, adaptive step controller, integrator selector, IMEX planner, splitting error
  • Guidance on tolerances, PI/PID step control, and IMEX splitting

Numerical Integration by the numbers

  • 16 all-time installs (skills.sh)
  • Ranked #1,318 of 2,065 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
At a glance

numerical-integration capabilities & compatibility

Free; core functionality needs only Python with NumPy.

Capabilities
data analysis · debugging
Use cases
data analysis · debugging
Pricing
Free
From the docs

What numerical-integration says it does

Select and configure time integration methods for ODE/PDE simulations.
SKILL.md
Provide a reliable workflow to select integrators, set tolerances, and manage adaptive time stepping for time-dependent simulations.
SKILL.md
Recommend: Use IMEX-BDF2 with diffusion term implicit, double-well reaction explicit.
SKILL.md
npx skills add https://github.com/beita6969/scienceclaw --skill numerical-integration

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs16
repo stars869
Last updatedJune 8, 2026
Repositorybeita6969/scienceclaw

What it does

Select time-integration methods and control adaptive stepping for ODE and PDE simulations.

Who is it for?

Choosing integrators (RK45, BDF, Rosenbrock), setting tolerances, and managing adaptive time steps and IMEX splitting.

Skip if: Automatic stiffness detection, which it defers to the numerical-stability skill.

When should I use this skill?

You are choosing explicit or implicit schemes or tuning time-stepping for a simulation.

What you get

The developer gets a recommended integrator, tolerance settings, and an adaptive step-control plan.

By the numbers

  • 5 scripts
  • 5-item pre-integration checklist

Files

SKILL.mdMarkdownGitHub ↗

Numerical Integration

Goal

Provide a reliable workflow to select integrators, set tolerances, and manage adaptive time stepping for time-dependent simulations.

Requirements

  • Python 3.8+
  • NumPy (for some scripts)
  • No heavy dependencies for core functionality

Inputs to Gather

InputDescriptionExample
Problem typeODE/PDE, stiff/non-stiffstiff PDE
Jacobian availableCan compute ∂f/∂u?yes
Target accuracyDesired error level1e-6
ConstraintsMemory, implicit allowed?implicit OK
Time scaleCharacteristic time1e-3 s

Decision Guidance

Choosing an Integrator

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

Stiff vs Non-Stiff Detection

SymptomLikely StiffAction
dt shrinks to tiny valuesYesSwitch to implicit
Eigenvalues span many decadesYesUse BDF/Radau
Smooth solution, reasonable dtNoStay explicit

Script Outputs (JSON Fields)

ScriptKey Outputs
scripts/error_norm.pyerror_norm, scale_min, scale_max
scripts/adaptive_step_controller.pyaccept, dt_next, factor
scripts/integrator_selector.pyrecommended, alternatives, notes
scripts/imex_split_planner.pyimplicit_terms, explicit_terms, splitting_strategy
scripts/splitting_error_estimator.pyerror_estimate, substeps

Workflow

1. Classify stiffness - Check eigenvalue spread or use stiffness_detector 2. Choose tolerances - See references/tolerance_guidelines.md 3. Select integrator - Run scripts/integrator_selector.py 4. Compute error norms - Use scripts/error_norm.py for step acceptance 5. Adapt step size - Use scripts/adaptive_step_controller.py 6. Plan IMEX/splitting - If mixed stiff/nonstiff, use scripts/imex_split_planner.py 7. Validate convergence - Repeat with tighter tolerances

Conversational Workflow Example

User: I'm solving the Allen-Cahn equation with a stiff double-well potential. What integrator should I use?

Agent workflow: 1. Check integrator options:

   python3 scripts/integrator_selector.py --stiff --jacobian-available --accuracy high --json

2. Plan the IMEX splitting (diffusion implicit, reaction explicit):

   python3 scripts/imex_split_planner.py --stiff-terms diffusion --nonstiff-terms reaction --coupling weak --json

3. Recommend: Use IMEX-BDF2 with diffusion term implicit, double-well reaction explicit.

Pre-Integration Checklist

  • [ ] Identify stiffness and dominant time scales
  • [ ] Set rtol/atol consistent with physics and units
  • [ ] Confirm integrator compatibility with stiffness
  • [ ] Use error norm to accept/reject steps
  • [ ] Verify convergence with tighter tolerance run

CLI Examples

# 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 Handling

ErrorCauseResolution
rtol and atol must be positiveInvalid tolerancesUse positive values
error-norm must be positiveNegative error normCheck error computation
Unknown controllerInvalid controller typeUse i, pi, or pid
Splitting requires at least one termEmpty term listSpecify stiff or nonstiff terms

Interpretation Guidance

Error Norm Values

Error NormMeaningAction
< 1.0Step acceptableAccept, maybe increase dt
≈ 1.0At tolerance boundaryAccept with current dt
> 1.0Step rejectedReject, reduce dt

Controller Selection

ControllerPropertiesBest For
I (integral)Simple, some overshootNon-stiff, moderate accuracy
PI (proportional-integral)Smooth, robustGeneral use
PIDAggressive adaptationRapidly varying dynamics

IMEX Strategy

CouplingStrategy
WeakSimple operator splitting
ModerateStrang splitting
StrongFully coupled IMEX-RK

Limitations

  • No automatic stiffness detection: Use stiffness_detector from numerical-stability
  • Splitting assumes separability: Terms must be cleanly separable
  • Jacobian requirement: Some methods need analytical or numerical Jacobian

References

  • references/method_catalog.md - Integrator options and properties
  • references/tolerance_guidelines.md - Choosing rtol/atol
  • references/error_control.md - Error norm and adaptation formulas
  • references/imex_guidelines.md - Stiff/non-stiff splitting
  • references/splitting_catalog.md - Operator splitting patterns
  • references/multiphase_field_patterns.md - Phase-field specific splits

Version History

  • v1.1.0 (2024-12-24): Enhanced documentation, decision guidance, examples
  • v1.0.0: Initial release with 5 integration scripts

Related skills

FAQ

How do I pick an integrator for a stiff problem?

With a Jacobian, use Rosenbrock or BDF; without one, use BDF with a numerical Jacobian.

Which step controllers are available?

Integral (I), proportional-integral (PI), and PID controllers, with PI recommended for general use.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.