This plugin solves Exercise 2.2 of the "Introduction to Parallel Computing" book described at page 82 .
We solve a partial differential equation inside an elliptical region by Monte Carlo simulations of the Feynman-Kac formula. The following partial differential equation is defined in a three-dimensional ellipsoid E:
The goal is to solve this boundary value problem at by a Monte Carlo simulation. At the heart of the simulation lies the Feynman-Kac formula, which in our case () is
It is important to point out that the operator in simulation means for samples of size .
The plugin pde3d.dll can be called in two different ways:
The first call passes the ellipses axes as parameter. The function
feynmankac3d stored in pde3d.dll generates first randomly a point inside the ellipse. In the second call, we can specify the initial
From this initial interior point
the following system of stochastic differential equations (
Brownian motion). We use realizations of
To plot the error, we compare it to the exact analytical solution of the partial differential equation, computed by two differentiations:
Roughly speaking, we free a horde of random walkers from an initial point. These walkers diffuse while is integrated with rate on the potential until they reach the boundary of the ellipse. All walks are averaged in a similar way as it is done with the pi plugin to get the function value at the chosen initial point. The diffusion process of the walkers, distributed as a trivariate normal density, weights points near the initial point more than points far away.
Figure 13: GPU computing the Feynman-Kac problem and corresponding frontend.