OP2/PyOP2 — pull request #372 by FabioLuporini (2014-05-12 11:26:39+00:00)
Title: Coffee Expression Rewriter

This pull request pushes COFFEE to new heights. The code motioner now can:

1) keep track of hoisted invariant sub-expressions, store them in temporaries, and re-use them for further calculations. Especially useful in more complicated forms like those based on hyperelasticity

2) *cyclically*: hoist code, expand expressions (e.g. (A+B)*alpha => A*alpha + B*alpha), and apply the distributive property. This allows hoisting even more terms. Motivating example is Burgers.

*IMPORTANT*: This introduces a new python dependency: networkx, a library for handling graphs. This is used by COFFEE to track dependencies among hoisted symbols. The library is probably one of the top graph libraries available in python. It can be easily pip installed: http://networkx.github.io/documentation/latest/install.html