sdepy.integrator.begin¶
-
integrator.
begin
()¶ Set initial conditions.
Given the time points
sw[0], ..., sw[depth - 2]
, should define and store in the working space the corresponding initial valuesxw[0], ..., xw[depth - 2]
. Note that whenbegin
gets called,sw[depth - 1]
andxw[depth - 1]
are undefined and will be respectively set, and computed, at the first iteration.Notes
It is called once for each backwards and forwards simulation, after memory allocation and before starting the iteration along the time points in
steps_tt
.Outline of expected code for
depth=2
:# access itervars iv = self.itervars sw, xw = iv['sw'], iv['xw'] # this is the initial time, taken from the # simulation timeline t0 = sw[0] assert t0 == iv['steps_tt'][0] == iv['tt'][0] # store the initial condition xw[0][...] = 1.
Must be provided by subclasses.