ea0eba4488a9f84adbae44d847f17254dc6171a1,torchdiffeq/_impl/tsit5.py,Tsit5Solver,_adaptive_tsit5_step,#Tsit5Solver#Any#,110

Before Change


        if on_grid and accept_step:
            // We"ve just passed a grid point, which is typically used to indicate a discontinuity in f; we should
            // update f to match the side of the discontinuity we"re now on.
            f1 = self.func(t_next, y_next)
            if self.next_grid_index != len(self.grid_points) - 1:
                self.next_grid_index += 1
        f_next = f1 if accept_step else f0
        dt_next = _optimal_step_size(dt, mean_error_ratio, self.safety, self.ifactor, self.dfactor)

After Change


            if eps != 0:
                // We"ve just passed a discontinuity in f; we should update f1 to match the side of the discontinuity
                // we"re now on.
                f1 = self.func(t_next.type_as(y_next[0]), y_next)
            if self.next_grid_index != len(self.grid_points) - 1:
                self.next_grid_index += 1
        f_next = f1 if accept_step else f0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: rtqichen/torchdiffeq
Commit Name: ea0eba4488a9f84adbae44d847f17254dc6171a1
Time: 2020-07-26
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/tsit5.py
Class Name: Tsit5Solver
Method Name: _adaptive_tsit5_step


Project Name: rodluger/starry
Commit Name: 8f87f244813c98b98bbd379f973bdba0ed7a9c72
Time: 2020-04-30
Author: rodluger@gmail.com
File Name: starry/_core/ops/integration.py
Class Name: rTReflectedGradientOp
Method Name: perform


Project Name: Esri/raster-functions
Commit Name: e0ff7e10a230b0523d0a4796e38957490a05f8f9
Time: 2015-10-19
Author: akferoz@esri.com
File Name: functions/RankFilter.py
Class Name: RankFilter
Method Name: updatePixels


Project Name: rtqichen/torchdiffeq
Commit Name: 7391aec984c1e9e0899d51e6b0538483c37ec8fb
Time: 2020-07-27
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: torchdiffeq/_impl/tsit5.py
Class Name: Tsit5Solver
Method Name: _adaptive_tsit5_step