This plugin solves Exercise 2.2 of the "Introduction to Parallel Computing" book described at page 82 [1].
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
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
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:
0,[a],[b],[c],feynmankac3d 1,[a],[b],[c],[initialx],[initialy],[initialz],feynmankac3d
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
we integrate
the following system of stochastic differential equations (
is a
Brownian motion). We use
realizations of
to integrate.
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
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
Figure 13: GPU computing the Feynman-Kac problem and corresponding frontend.