memmett/PyWENO — pull request #1 by tbenthompson (2013-11-12 09:22:23+00:00)
Title: Nonuniform code gen upgrade

Hi Matt,

Here's the improvements to pyweno.nonuniform that I promised. The pyweno.nonuniform_codegen module symbolically produces fortran code that is linked in using f2py. The pyweno.nonuniform module code calls these fortran functions. The weights function already ran rather fast, so I decided not to sympy/f2py it -- only the coeffs, and smoothness functions.

Some brief unit/integration tests were added to tests/. I've only tested the code generation on Ubuntu 13.10, but I think the only impediment to getting it working on other OSes would be minor changes in the compilation and use of f2py.

I've incorporated the nonuniform WENO in my finite volume code and I get an improvement from about 30% to about 0.5% error in a case with a highly nonuniform mesh when shifting from a WENO code assuming a uniform mesh to the new version, not assuming a uniform mesh. Obviously more testing is worthwhile, but this provides, at least, a little bit of confidence in the outputs.

I haven't thoroughly tested the "d" keyword but it now exists in the nonuniform as well as uniform "symbolic" module. The finite volume code that I'm using WENO for will use derivatives heavily, so that'll provide some testing for that feature.

Also, I set the version to 0.9.0. Thought that seemed reasonable...

Cheers,
Ben