FEYNMAN_KAC_1D
PDE Solution by Feynman-Kac Algorithm


FEYNMAN_KAC_1D is a MATLAB program which demonstrates the use of the Feynman-Kac algorithm to solve Poisson's equation in a 1D interval by averaging stochastic paths to the boundary.

The program is intended as a simple demonstration of the method. The main purpose is to have a version that runs sequentially, so that it can be compared to versions which have been enhanced using parallel programming techniques.

The original version of this code used stepsize parameter H = 0.0001 and sample size N = 10,000. However, the MATLAB version of the code, with these parameters, ran much more slowly than the C, C++, F77 and F90 versions, and so H was increased to 0.01.

Thanks to some comments from Arno Petri (call rand() rather than r8_uniform_01()), and some other mysterious changes (comment out the return/end statements!) the performance of the MATLAB code has been significantly improved.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

FEYNMAN_KAC_1D is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

FEYNMAN_KAC_2D, a MATLAB program which demonstrates the use of the Feynman-Kac algorithm to solve Poisson's equation in a 2D ellipse by averaging stochastic paths to the boundary.

FEYNMAN_KAC_3D, a MATLAB program which demonstrates the use of the Feynman-Kac algorithm to solve Poisson's equation in a 3D ellipsoid by averaging stochastic paths to the boundary.

SDE, a MATLAB library which solves certain stochastic differential equations.

STOCHASTIC_RK, a MATLAB library which applies a Runge-Kutta scheme to a stochastic differential equation.

Reference:

  1. Peter Arbenz, Wesley Petersen,
    Introduction to Parallel Computing - A practical guide with examples in C,
    Oxford University Press,
    ISBN: 0-19-851576-6,
    LC: QA76.58.P47.

Source Code:

Examples and Tests:

You can go up one level to the MATLAB source codes.


Last revised on 30 July 2012.