Merge branch 'main' of github.com:tum-pbs/pbdl-book into main

This commit is contained in:
NT
2021-09-16 18:16:02 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ The central goal of these methods is to use existing numerical solvers, and equi
them with functionality to compute gradients with respect to their inputs. them with functionality to compute gradients with respect to their inputs.
Once this is realized for all operators of a simulation, we can leverage Once this is realized for all operators of a simulation, we can leverage
the autodiff functionality of DL frameworks with backpropagation to let gradient the autodiff functionality of DL frameworks with backpropagation to let gradient
information flow from from a simulator into an NN and vice versa. This has numerous information flow from a simulator into an NN and vice versa. This has numerous
advantages such as improved learning feedback and generalization, as we'll outline below. advantages such as improved learning feedback and generalization, as we'll outline below.
In contrast to physics-informed loss functions, it also enables handling more complex In contrast to physics-informed loss functions, it also enables handling more complex

View File

@@ -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",