Incremental improvements, autowrap and reviewing Hilbert spaces

Since last time, most of my coding has been to improve the Fortran code generation after getting some useful feedback from my mentor Andy. In addition to several cosmetic fixes I have:

  • Improved the Indexed and Idx classes, including tests and more information in docstring.
  • Added syntactic sugar that allows creation of the indexed symbol (the `stem’) independent of the indices.
  • Reorganized codegen by pushing logic up to the language agnostic super class.
  • Reorganized tests of codegen so that all tests will be performed with several compilers and for both C and Fortran.  It is now easy to add another compiler to the list and it will run through all existing tests.

The fixes are available in this branch.

In addition, I fleshed out the basics of a framework for automatic compilation and wrapping of SymPy expressions.  Spurred by Ondrej’s comment on my previous post, I decided it was necessary to allow several backends.  So the implementation is just a friendly function that will invoke backends for f2py, fwrap or Cython as appropriate.  (Only f2py implemented so far.)

Apart from the coding I also spent time reviewing Matt’s work on Hilbert spaces. His work is very interesting to me as I plan to use his framework to implement quantum mechanical tests and examples of my own code generation efforts in the second part of the summer.  After reviewing I am even more optimistic about that plan 🙂

This entry was posted in sympy. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s