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

integrate()[source]

Integrates the right-hand side (here impl + expl)

Returns:

containing the integral as values

Return type:

list of dtype_u

update_nodes()[source]

Update the u- and f-values at the collocation nodes -> corresponds to a single sweep over all nodes

Returns:

None