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.9 Differential OperatorsThree different kinds of derivatives are currently supported: spatial derivatives,derivatives w.r.t. user defined variables, <strong>and</strong> derivatives of a form orfunctional w.r.t. a function.2.9.1 Basic spatial derivativesSpatial derivatives hold a special place in partial differential equations fromphysics <strong>and</strong> there are several ways to express those. The basic way is# Derivative w.r.t. x_2f = Dx(v, 2)f = v.dx(2)# Derivative w.r.t. x_ig = Dx(v, i)g = v.dx(i)If v is a scalar expression, f here is the scalar derivative of v w.r.t. spatialdirection z. If v has no free indices, g is the scalar derivative w.r.t. spatialdirection x i , <strong>and</strong> g has the free index i. Written as formulas, this can beexpressed compactly using the v ,i notation:Note the resemblance of v ,i <strong>and</strong> v.dx(i).f = ∂v = v ,2 ,∂x 2(2.38)g = ∂v = v ,i .∂x i(2.39)If the expression to be differentiated w.r.t. x i has i as a free index, implicitsummation is implied.# Sum of derivatives w.r.t. x_i for all ig = Dx(v[i], i)42

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

Saved successfully!

Ooh no, something went wrong!