class TimeEvolver: def __init__(self, sphere, times): self.sphere = sphere self._tracker = np.zeros_like(shape=(*self.sphere.temperature.shape, 4, len(times))) self.times = times self.dts = np.gradient(self.times) def evolve(self): for tID, dt in enumerate(self.dts): self.sphere.timestep(dt)