On Thu, Nov 11, 2010 at 2:40 AM, Omar Awile <omar.aw...@gmail.com> wrote: > Hi Øyvind > > Thanks a lot! Indeed that's a dirty hack, but it produces the desired > result :) > I'd be interested in actually fixing this. So maybe if I take some > time to understand how sympy expressions are parsed and how exactly > your printing works I could help in finding a good solution for this. > Actually I was asking myself the same question as Aaron, why not use > the sympy sum function?
That would be great. Just let us know here if you need any help. It shouldn't be too difficulty, since the Sum framework is already there. All you would need to do is probably modify it a little bit so it works correctly with Idx, and then modify the Fortran generating code to recognize it. Aaron Meurer > > Answering your and Ondrej's question: Maybe "on the fly" was not > completely correct. I am currently working on PPM (http://www.ppm- > library.org/) a parallel library for particle-mesh simulations. The > library provides data structures for the particles and meshes, > routines for decomposing the problem, and handling all the > communication. It lets the user write his particle simulation using > those abstractions without having to worry about how to parallelize > the code. Now I'm thinking about how writing such simulations can be > further simplified. So, I'm working on a simple python API that one > can use to write his simulation code that will emit the complete > fortran code. And using sympy the user could almost write down the > discretized PDEs and get the corresponding fortran loops... > > cheers, > > omar > > On Nov 10, 10:34 pm, Øyvind Jensen <jensen.oyv...@gmail.com> wrote: >> > I am very interested in how you insert the code into your fortran >> > code. Do you generate a simple module, compile it and link it? Or how >> > do you insert it on the fly? >> >> Yeah, that would be interesting to hear about! >> >> Øyvind >> >> >> >> >> >> >> >> > Ondrej > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sy...@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.