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 Loggf = w**4/4*dx(0) + inner(grad(w), grad(w))*dx(1)F = derivative(f, w)J = derivative(F, w)Ja = action(J, w)Jp = adjoint(J)Jpa = action(Jp, w)g = Function(element)Jnorm = energy_norm(J, g)TODO: Find some more examples, e.g. from error control!2.14 Tuple NotationIn addition to the st<strong>and</strong>ard integr<strong>and</strong> notation described above, <strong>UFL</strong> supportsa simplified tuple notation by which L 2 inner products may be expressedas tuples. Consider for example the following bilinear form as partof a variational problem for a reaction–diffusion problem:∫a(v,u) = ∇v ·∇u+vudxΩ= (∇v,∇u)+(v,u)In st<strong>and</strong>ard <strong>UFL</strong> notation, this bilinear form may be expressed asa = inner(grad(v), grad(u))*dx + v*u*dxIn tuple notation, this may alternatively be expressed asa = (grad(v), grad(u)) + (v, u)In general, a form may be expressed as a sum of tuples or triples of the form58

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

Saved successfully!

Ooh no, something went wrong!