implementations.sweeper_classes.imex_1st_order module¶
- class imex_1st_order(params)[source]¶
Bases:
sweeper
Custom sweeper class, implements Sweeper.py
First-order IMEX sweeper using implicit/explicit Euler as base integrator
- QI¶
implicit Euler integration matrix
- QE¶
explicit Euler integration matrix
- compute_end_point()[source]¶
Compute u at the right point of the interval
The value uend computed here is a full evaluation of the Picard formulation unless do_full_update==False
- Returns:
None
- get_scalar_problems_manysweep_mat(nsweeps, lambdas=None)[source]¶
For a scalar problem, K sweeps of IMEX-SDC can be written in matrix form.
- Parameters:
nsweeps (int) – number of sweeps
lambdas (numpy.ndarray) – the first entry in lambdas is lambda_fast, the second is lambda_slow.
- get_scalar_problems_sweeper_mats(lambdas=None)[source]¶
This function returns the corresponding matrices of an IMEX-SDC sweep in matrix formulation.
See Ruprecht & Speck, Spectral deferred corrections with fast-wave slow-wave splitting, 2016 for the derivation.
- Parameters:
lambdas (numpy.ndarray) – the first entry in lambdas is lambda_fast, the second is lambda_slow.
- get_sweeper_mats()[source]¶
Returns the three matrices Q, QI, QE which define the sweeper.
The first row and column, corresponding to the left starting value, are removed to correspond to the notation introduced in Ruprecht & Speck, Spectral deferred corrections with fast-wave slow-wave splitting, 2016