sdepy.integrator.store

integrator.store(i, k)

Store the current integration step into the integration output.

Should take the k-th value in the working space xw, transform it if need be, and store it as the output xx[i] at the output time point tt[i].

Parameters:
i : int

Index of the output timeline point to set as output.

k : int

Index of the working space point to use as input.

Notes

It is called initially to store the initial values that belong to the output timeline, among those put into the working space by begin, and later during the iteration, each time the simulation touches a point on the output timeline.

Outline of expected code for xshape == wshape and an exponentiation transformation:

# access itervars
iv = self.itervars
sw, xw = iv['sw'], iv['xw']
xx = iv['xx']

# this is the current time, also found
# along the output timeline
s = sw[k]
assert s == iv['tt'][i]

# transform and store
np.exp(xw[k], out=xx[i])

Must be provided by subclasses.