I wrote fluid advection code: How to make this more elegant?

2016-01-23 Thread Arne Babenhauserheide
Hi, I just recreated a fluid advection exercise in Guile Scheme and I’m not quite happy with its readability. Can you help me improve it? My main gripe is that the math does not look instantly accessible. The original version was in Python: psi[i] - c1*(psi[i+1] - psi[i-1]) + c2*(psi[i+1] -

Re: I wrote fluid advection code: How to make this more elegant?

2016-01-23 Thread Panicz Maciej Godek
Hi, although I cannot be of immediate help with the topic, because I don't know anything about advection, I think that the main problem with your code is that it is imperative. While Python's stylistics handles the imperative code quite nicely, it looks rather strange in Scheme. >From my experienc

Re: I wrote fluid advection code: How to make this more elegant?

2016-01-23 Thread Taylan Ulrich Bayırlı/Kammer
Arne Babenhauserheide writes: > Hi, > > I just recreated a fluid advection exercise in Guile Scheme and I’m not > quite happy with its readability. Can you help me improve it? > > My main gripe is that the math does not look instantly accessible. > > The original version was in Python: > > ps