swarm-support
[Top][All Lists]
Advanced

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

Re: Diffuse2d.


From: dsumpter
Subject: Re: Diffuse2d.
Date: Fri, 31 Jan 1997 12:13:10 GMT

Hi Nelson,

>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?

I have written my own algorithm and in general I also use 2nd order
neighbourhoods. I just used an example of the 1st order because its
easier to follow. The same problems apply in higher orders.

I didn't actually run a program, I just looked at
the Diffuse2d code to see how you'd done the Swarm implementation and
then did a 'dry run' of what I think would occur. I should note that
my implementation has the same problem (or should I say feature) as
the Swarm version. So I'm not in a position to tell you how to do it 
better.

>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.

I think we are talking about an algorithmic error (or feature!)
since the same thing occurs in my implementation as Swarms. 
I don't think there is a coding error. 

>>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.

Well, I have Teds references (thanks) now and I'll go and ask one of 
our Numerical Analysists sometime and try and see what the 
alternatives are. I'll keep you posted.....

David.








reply via email to

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