replace >> with at() method
This commit is contained in:
@@ -117,7 +117,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"def step(velocity, smoke, pressure, dt=1.0, buoyancy_factor=1.0):\n",
|
"def step(velocity, smoke, pressure, dt=1.0, buoyancy_factor=1.0):\n",
|
||||||
" smoke = advect.semi_lagrangian(smoke, velocity, dt) + INFLOW\n",
|
" smoke = advect.semi_lagrangian(smoke, velocity, dt) + INFLOW\n",
|
||||||
" buoyancy_force = smoke * (0, buoyancy_factor) >> velocity # resamples smoke to velocity sample points\n",
|
" buoyancy_force = (smoke * (0, buoyancy_factor)).at(velocity) # resamples smoke to velocity sample points\n",
|
||||||
" velocity = advect.semi_lagrangian(velocity, velocity, dt) + dt * buoyancy_force\n",
|
" velocity = advect.semi_lagrangian(velocity, velocity, dt) + dt * buoyancy_force\n",
|
||||||
" velocity = diffuse.explicit(velocity, NU, dt)\n",
|
" velocity = diffuse.explicit(velocity, NU, dt)\n",
|
||||||
" velocity, pressure = fluid.make_incompressible(velocity)\n",
|
" velocity, pressure = fluid.make_incompressible(velocity)\n",
|
||||||
@@ -527,4 +527,4 @@
|
|||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
"nbformat_minor": 1
|
"nbformat_minor": 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user