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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>UFL</strong> <strong>Specification</strong> <strong>and</strong> <strong>User</strong> <strong>Manual</strong> <strong>0.3</strong>Martin S. Alnæs, Anders Logg2.5.4 Implicit summationImplicit summation can occur in only a few situations. A product of twoterms that shares the same free index is implicitly treated as a sum over thatfree index:• v[i]*v[i]: ∑ i v iv i• A[i,j]*v[i]*v[j]: ∑ j (∑ i A ijv i )v jA tensor valued expression indexed twice with the same free index is treatedas a sum over that free index:• A[i,i]: ∑ i A ii• C[i,j,j,i]: ∑ i∑j C ijjiThe spatial derivative, in the direction of a free index, of an expression withthe same free index, is treated as a sum over that free index:• v[i].dx(i): ∑ i v i• A[i,j].dx(i): ∑ id(A ij )dx iNote that these examples are some times written v i,i <strong>and</strong> A ij,i in pen-<strong>and</strong>paperindex notation.2.6 Basic algebraic operatorsThebasicalgebraicoperators+,-,*,/canbeusedfreelyon<strong>UFL</strong>expressions.They do have some requirements on their oper<strong>and</strong>s, summarized here:Addition or subtraction, a + b or a - b:34

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

Saved successfully!

Ooh no, something went wrong!