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.1 Forms <strong>and</strong> Integrals<strong>UFL</strong> is designed to express forms in the following generalized format:a(v 1 ,...,v r ;w 1 ,...,w n ) = (2.1)∑n c ∫Ik(v c 1 ,...,v r ;w 1 ,...w n )dxk=1Ω k∑n e ∫+ Ik(v e 1 ,...,v r ;w 1 ,...,w n )dsk=1∂Ω k∑n i∫+ Ik(v i 1 ,...,v r ;w 1 ,...,w n )dS.Γ kk=1Here the form a depends on the form arguments v 1 ,...,v r <strong>and</strong> the formcoefficients w 1 ,...,w n , <strong>and</strong> its expression is a sum of integrals. Each term ofa valid form expression must be a scalar-valued expression integrated exactlyonce. How to define form arguments <strong>and</strong> integr<strong>and</strong> expressions is detailed inthe rest of this chapter.Integrals are expressed through multiplication with a measure, representingan integral over either of• the interior of the domain Ω (dx, cell integral);• the boundary ∂Ω of Ω (ds, exterior facet integral);• the set of interior facets Γ (dS, interior facet integral).<strong>UFL</strong> declares the measures dx ↔ dx, ds ↔ ds, <strong>and</strong> dS ↔ dS.As a basic example, assume v is a scalar-valued expression <strong>and</strong> consider theintegral of v over the interior of Ω. This may be expressed asa = v*dx<strong>and</strong> the integral of v over ∂Ω is written as16

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

Saved successfully!

Ooh no, something went wrong!