Skip to content

Commit

Permalink
Refactor variable names in midpoint integrator
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel7004 committed Jan 21, 2022
1 parent e363d5f commit 7ee5cf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/integrator/midpoint/midpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ func (mi *MidpointInt) Integrate(circ *circuit.Circuit) {
last = true
mi.step = mi.end - t
}
k2 := circ.Clone()
k2.ApplyDerivative(mi.step/2, circ.GetDerivative())
circ.ApplyDerivative(mi.step, k2.GetDerivative())
k1 := circ.Clone()
k1.ApplyDerivative(mi.step/2, k1.GetDerivative())
circ.ApplyDerivative(mi.step, k1.GetDerivative())
t += mi.step
mi.saveFn(t, circ)
}
Expand Down

0 comments on commit 7ee5cf8

Please sign in to comment.