Skip to content

Commit

Permalink
add missing minus sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien committed Jun 28, 2024
1 parent 0a2a971 commit d1956d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions folie/analysis/overdamped_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def grad_V(x, _):
diff_prime_val = model.diffusion.grad_x(x).ravel()
drift_val = model.drift(x).ravel()
diff_val = model.diffusion(x).ravel()

# print(np.min(diff_val), x[np.argmin(diff_val)])
return (-drift_val + diff_prime_val) / diff_val

sol = solve_ivp(grad_V, [x.min() - 1e-10, x.max() + 1e10], np.array([0.0]), t_eval=x) # Add some epsilon to range to ensure inclusion of x
sol = solve_ivp(grad_V, [x.min() - 1e-10, x.max() + 1e-10], np.array([0.0]), t_eval=x) # Add some epsilon to range to ensure inclusion of x

V = sol.y.ravel()

Expand Down

0 comments on commit d1956d1

Please sign in to comment.