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 Loggf = Function(element)Note that the order in which Functions are declared is important, directlyreflected in the ordering they have among the arguments to each Form theyare part of.Function is used to represent user-defined functions, including, e.g., sourceterms, body forces, variable coefficients <strong>and</strong> stabilization terms. <strong>UFL</strong> treatseach Function as a linear combination of unknown basis functions with unknowncoefficients, that is, <strong>UFL</strong> knows nothing about the concrete basisfunctions of the element <strong>and</strong> nothing about the value of the function.Note that more than one function can be declared for the same FiniteElement.ThefollowingexampledeclarestwoBasisFunctions<strong>and</strong>twoFunctionsfor the same FiniteElement:v = BasisFunction(element)u = BasisFunction(element)f = Function(element)g = Function(element)For a Function on a MixedElement (or VectorElement or TensorElement),the function split can be used to extract function values on subspaces, asillustrated here for a mixed Taylor–Hood element:up = Function(TH)u, p = split(up)A shorth<strong>and</strong> for this is in place called Functions:u, p = Function(TH)26

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

Saved successfully!

Ooh no, something went wrong!