swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Diffuse2d.


From: Nelson Minar
Subject: Re: Diffuse2d.
Date: Thu, 30 Jan 1997 16:13:11 -0500

>1. I am using a technique similar to Diffuse 2d for the diffusion of
>heat and am slightly confused by one aspect. Consider a portion of
>lattice with temperatures and first order diffusion:

Diffuse2d does 2nd order by default (it's a compile time switch in
Diffuse2d.m). What are the values in the entire nine cell
neighbourhood? Or are you doing your own algorithm entirely?

In general, this sort of code has two sources of potential problems.
The discrete approximation has some pathological cases - that's an
algorithmic problem. There's also a potential programming error, in
particular overflow. Looking at the code in Diffuse2d it looks to me
like that could be a real problem (at some point we calculate 20 *
0x7fff), but I think I tested that code pretty well.

>2. Has anyone got a reference they can give me discussing heat
>diffusion in terms of lattices? I'd be very grateful.

That's a good question - I'm sure the Swarm libraries could be
improved in this area. I only implemented the particular algorithm
that's in Diffuse2d because it happens to be what was in the prototype
Swarm.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]