Skip to content

Commit 70b6ec3

Browse files
Using dt as float inside the kernel
1 parent e041096 commit 70b6ec3

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

docs/user_guide/examples_v3/tutorial_interaction.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,10 @@
8888
" dy = np.where(distances < interaction_distance, dy, 0.0)\n",
8989
"\n",
9090
" dx_norm = np.where(distances > 0, dx / distances, 0)\n",
91-
" particles.dlon += (\n",
92-
" np.sum(dx_norm, axis=0) * velocity\n",
93-
" ) # * particles.dt / np.timedelta64(1, \"s\")\n",
91+
" particles.dlon += np.sum(dx_norm, axis=0) * velocity * particles.dt\n",
9492
"\n",
9593
" dy_norm = np.where(distances > 0, dy / distances, 0)\n",
96-
" particles.dlat += (\n",
97-
" np.sum(dy_norm, axis=0) * velocity\n",
98-
" ) # * particles.dt / np.timedelta64(1, \"s\")"
94+
" particles.dlat += np.sum(dy_norm, axis=0) * velocity * particles.dt"
9995
]
10096
},
10197
{

0 commit comments

Comments
 (0)