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 Loggfor some form a. In <strong>UFL</strong>, the form a can be obtained by differentiating L.To manage this, we note that as long as the domain Ω is independent ofw j , ∫ dcommutes withΩ dw j, <strong>and</strong> we can differentiate the integr<strong>and</strong> expressioninstead, e.g.,∫ ∫L(v;w) = I c (v;w)dx+ I e (v;w)ds, (2.54)Ω ∂Ω∫ ∫d dI c dI eL(v;w) = dx+ ds. (2.55)dw j dw j dw jIn addition, we need thatwhich in <strong>UFL</strong> can be represented asΩ∂Ωdwdw j= φ j , ∀φ j ∈ V h , (2.56)w = Function(element), (2.57)v = BasisFunction(element), (2.58)dw= v,dw j(2.59)since w represents the sum <strong>and</strong> v represents any <strong>and</strong> all basis functions inV h .Other operators have well defined derivatives, <strong>and</strong> by repeatedly applyingthe chain rule we can differentiate the integr<strong>and</strong> automatically.The notation here has potential for improvement, feel free to ask if somethingis unclear, or suggest improvements.2.13.7 Combining form transformationsForm transformations can be combined freely. Note that to do this, derivativesare usually be evaluated before applying e.g. the action of a form,because derivative changes the arity of the form.element = FiniteElement("CG", cell, 1)w = Function(element)57

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

Saved successfully!

Ooh no, something went wrong!