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 LoggP1 = VectorElement("Lagrange", "triangle", 1)B = VectorElement("Bubble", "triangle", 3)Q = FiniteElement("Lagrange", "triangle", 1)Mini = (P1 + B) * Q2.3 Form ArgumentsForm arguments are divided in two groups, basis functions <strong>and</strong> functions 2 .A BasisFunction represents an arbitrary basis function in a given discretefinite element space, while a Function represents a function in a discretefinite element space that will be provided by the user at a later stage. Thenumber of BasisFunctions that occur in a Form equals the arity of the form.2.3.1 Basis functionsThe data type BasisFunction represents a basis function on a given finiteelement. A BasisFunction must be created for a previously declared finiteelement (simple or mixed):v = BasisFunction(element)Note that more than one BasisFunction can be declared for the sameFiniteElement. Basis functions are associated with the arguments of amultilinear form in the order of declaration.For a MixedElement, the function BasisFunctions can be used to constructtuples of BasisFunctions, as illustrated here for a mixed Taylor–Hood element:2 The term function in <strong>UFL</strong> maps to the term coefficient in UFC.24

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

Saved successfully!

Ooh no, something went wrong!