core.step module

class Step(description)[source]

Bases: FrozenClass

Step class, referencing most of the structure needed for the time-stepping

This class bundles multiple levels and the corresponding transfer operators and is used by the controller (e.g. SDC and MLSDC). Status variables like the current time are hidden via properties and setters methods.

params

parameters given by the user

Type:

__Pars

status

status class for the step

Type:

__Status

logger

custom logger for step-related logging

levels

list of levels

Type:

list

connect_levels(base_transfer_class, base_transfer_params, space_transfer_class, space_transfer_params, fine_level, coarse_level)[source]

Routine to couple levels with base_transfer operators

Parameters:
  • base_transfer_class – the class which can do transfer between the two space-time levels

  • base_transfer_params (dict) – parameters for the space_transfer class

  • space_transfer_class – the user-defined class which can do spatial transfer

  • space_transfer_params (dict) – parameters for the base_transfer class

  • fine_level (pySDC.Level.level) – the fine level

  • coarse_level (pySDC.Level.level) – the coarse level

property dt

Getter for current time-step size

Returns:

dt of level[0]

Return type:

float

init_step(u0)[source]

Initialization routine for a new step.

This routine uses initial values u0 to set up the u[0] values at the finest level

Parameters:

u0 (dtype_u) – initial values

property next

Getter for next step

Returns:

prev

property prev

Getter for previous step

Returns:

prev

reset_step()[source]

Routine so clean-up step structure and the corresp. levels for further uses

property time

Getter for current time

Returns:

time of level[0]

Return type:

float

transfer(source, target)[source]

Wrapper routine to ease the call of the transfer functions

This function can be called in the multilevel stepper (e.g. MLSDC), passing a source and a target level. Using the transfer dictionary, the calling stepper does not need to specify whether to use restrict of prolong.

Parameters:
  • source (pySDC.Level.level) – source level

  • target (pySDC.Level.level) – target level