SYLLABUS Previous: 1.4.6 Wavelets
Up: 1.4 Numerical discretization
Next: 1.5 Computer quiz
1.4.7 Sampling with quasiparticles
A completely different way of approximating a function is to use a
statistical sampling with quasiparticles

(1.4.7#eq.1) 
where
is the weight,
the shape, and
the position of
each particle.
In the JBONE applet, the particle shapes are assumed to be
Dirac pulses
, meaning that the particles are
localized in an infinitely small interval around

(1.4.7#eq.2) 
For simplicity, the weight is often set to unity
.
As a matter of fact, this form of discretization does never converge
locally, since the Dirac pulses are either zero or infinite.
However, the ``global properties'' (or moments) of a smooth and
bounded function
discretized with Dirac pulses does converge
Without a local convergence, it is of course difficult to compare a
quasiparticle discretization with a different approximation, based for
example on finite elements. The particle solution is therefore
projected
onto a set of basis functions
in an
assignment process, which attributes a statistical average to a grid:

(1.4.7#eq.3) 
In JBONE, the projecting basis functions are piecewise linear
rooftop functions.
Note that it is important to use the same set of functions for the
projection and the plot: figure (1.4.7#fig.1) shows how
a Gaussian particle distribution appears after projection, when the
result is plotted using piecewise constant (box) and linear (rooftop)
functions. The dashed line incorrectly mixes boxes for the projection
with rooftops for the plot.
Figure 1.4.7#fig.1:
The solid lines are legitimate projections of a Gaussian particle
distribution on piecewise constant (box) and linear (rooftop) basis
functions. The dashed line illustrates what happens if boxes are used for
the projection and mistakenly mixed with rooftops for the plot.

Try to press INITIALIZE a
few times to get a feeling how good a quasiparticle approximation is to
approximate a box with 64 grid points and a varying number of particles
(random walkers).
You need however to be patient if you exceed
particles... the
JAVA virtual machines in the web browsers are usually rather
slow!
JBONE applet: press Initialize
to approximate the initial Gaussian (grey) with a finite number
of particles or random walkers.
Vary the number of Walkers in the range [1;10000] to get a
feeling for the statistical noise that is associated with such an
approximation; switch to Particle methods to avoid plotting
the particles in red.

The applet uses random numbers to generate a particle distribution from the
initial condition
with a
range
in the interval
following the procedure
Let
while
Let
be a uniformly distributed random number in
the interval
.
Let
be a uniformly distributed random number in
the interval
.
If
then let
and
advance
by 1 else do nothing.
end while
This algorithm produces a particle density in the interval
that is proportional to the initial condition
.
SYLLABUS Previous: 1.4.6 Wavelets
Up: 1.4 Numerical discretization
Next: 1.5 Computer quiz
