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 Logg2.2.5 Tensor ElementsA TensorElement represents a combination of basic elements such that eachcomponent of a tensor is represented by the basic element. The shape is usuallyomitted, the default shape is (d, d) where d is the geometry dimension.The notation is:element = TensorElement(family, cell, degree[, shape, symmetry])Any shape tuple consisting of positive integers is valid, <strong>and</strong> the optionalsymmetry can either be set to True which means st<strong>and</strong>ard matrix symmetry(like A ij = A ji ), or a dict like { (0,1):(1,0), (0,2):(2,0) } where thedict keys are index tuples that are represented by the corresponding dictvalue.Examples:element = TensorElement("CG", cell, 2)element = TensorElement("DG", cell, 0, shape=(6,6))element = TensorElement("DG", cell, 0, symmetry=True)element = TensorElement("DG", cell, 0, symmetry={(0,0): (1,1)})2.2.6 Mixed ElementsA MixedElement represents an arbitrary combination of other elements.VectorElement <strong>and</strong> TensorElement are special cases of a MixedElementwhere all subelements are equal.General notation for an arbitrary number of subelements:element = MixedElement(element1, element2[, element3, ...])22

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

Saved successfully!

Ooh no, something went wrong!