Overview
Dedalus provides specialized solvers for each problem type and a variety of timestepping schemes for time integration. Solvers manage matrix construction, linear algebra, and iteration. All solver classes are indedalus/core/solvers.py and timestepping schemes in dedalus/core/timesteppers.py.
Solver Types
InitialValueSolver (IVP)
Solver for time-dependent problems.state: List of problem variables (fields)sim_time: Current simulation timeiteration: Current iteration numberevaluator: Evaluator for analysis outputs
EigenvalueSolver (EVP)
Solver for eigenvalue problems.eigenvalues: Computed eigenvalueseigenvectors: Corresponding eigenvectorseigenvalue_subproblem: Subproblem for which EVP was solved
LinearBoundaryValueSolver (LBVP)
Solver for linear boundary value problems.NonlinearBoundaryValueSolver (NLBVP)
Solver for nonlinear boundary value problems using Newton iteration.Solver Parameters
All solvers accept common parameters:ncc_cutoff: Amplitude cutoff for non-constant coefficient expansionsmatsolver: Choose from ‘MATRIX_FACTORIZER’, ‘MATRIX_SOLVER’, or custommatrix_coupling: Override automatic coupling detection
Timestepping Schemes
All timestepping schemes are indedalus/core/timesteppers.py.
Multistep IMEX Schemes
Implicit-Explicit multistep methods for IVPs of the formM·∂X/∂t + L·X = F.
SBDF1
1st-order semi-implicit backwards difference.- Order: 1
- Steps: 1
- Implicit: 1st-order BDF
- Explicit: 1st-order extrapolation
SBDF2
2nd-order semi-implicit backwards difference.- Order: 2
- Steps: 2 (uses SBDF1 for first step)
- Implicit: 2nd-order BDF
- Explicit: 2nd-order extrapolation
- Recommended for most IVP simulations
SBDF3
3rd-order semi-implicit backwards difference.- Order: 3
- Steps: 3 (uses SBDF2, then SBDF1 for startup)
- Implicit: 3rd-order BDF
- Explicit: 3rd-order extrapolation
SBDF4
4th-order semi-implicit backwards difference.- Order: 4
- Steps: 4 (uses SBDF3, SBDF2, SBDF1 for startup)
- Implicit: 4th-order BDF
- Explicit: 4th-order extrapolation
Runge-Kutta IMEX Schemes
Implicit-Explicit Runge-Kutta methods with multiple stages per timestep.RK111
1st-order 1-stage scheme.- Order: 1
- Stages: 1
- Equivalent to forward Euler
RK222
2nd-order 2-stage scheme.- Order: 2
- Stages: 2
- Good for moderate stiffness
- Recommended for startup/testing
RK443
3rd-order 4-stage scheme.- Order: 3
- Stages: 4
- Higher accuracy per timestep
- More expensive per timestep
Other Schemes
CNAB1, CNAB2
Crank-Nicolson Adams-Bashforth schemes.- Order: 2
- Implicit: 2nd-order Crank-Nicolson
- Explicit: 2nd-order Adams-Bashforth
Time Integration
Basic Integration Loop
Adaptive Timestepping with CFL
CFL conditions ensure numerical stability.Custom Timestep Control
Analysis and Output
Evaluate and save data during integration.File Handlers
Iteration-based Output
Matrix Construction
Solvers automatically construct sparse matrices.Subproblems
Problems are divided into subproblems by mode coupling.Matrix Inspection
Rebuilding Matrices
Rebuild when coefficients change.Complete Example: IVP with Adaptive Timestepping
Performance Considerations
Timestepper Selection
Matrix Solver Selection
Memory Management
Best Practices
NCC Cutoff:
The
ncc_cutoff parameter controls the accuracy of non-constant coefficient expansions. Decrease (e.g., 1e-8) for higher accuracy, increase (e.g., 1e-4) for faster matrix construction.See Also
- Problem Types - Creating problems
- Fields and Operators - Building equations
- Coordinates and Domains - Domain setup