13.07.2015 Views

UFL Specification and User Manual 0.3 - FEniCS Project

UFL Specification and User Manual 0.3 - FEniCS Project

UFL Specification and User Manual 0.3 - FEniCS Project

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>UFL</strong> <strong>Specification</strong> <strong>and</strong> <strong>User</strong> <strong>Manual</strong> <strong>0.3</strong>Martin S. Alnæs, Anders LoggTODOConsider the expressionf = (a+b)∗(c+d) (5.1)where a, b, c, d are arbitrary scalar expressions. The expression tree for flooks like this:TODO: Make figures.a b c d\ / \ /+ +\ /*In <strong>UFL</strong> f is represented like this expression tree. If a,b,c,d are all distinctFunction instances, the <strong>UFL</strong> representation will look like this:Function Function Function Function\ / \ /Sum Sum\ /ProductIf we instead have the expressionf = (a+b)∗(a−b) (5.2)the tree will in fact look like this, with the functions a <strong>and</strong> b only representedonce:Function Function89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!