Download FFC User Manual

Transcript
FFC User Manual
4.3.6
Anders Logg
Index
The data type Index represents an index used for subscripting derivatives
or taking components of vector-valued functions. If an Index is declared
without any arguments,
i = Index()
a free Index is created, representing an index range determined by the context; if used to subscript a vector-valued BasisFunction or a Function, the
range is given by the number of vector dimensions n, and if used to subscript
a derivative, the range is given by the dimension d of the underlying shape
of the finite element space. As we shall see below, indices can be a powerful
tool when used to define forms in tensor notation.
An Index can also be fixed, meaning that the value of the index remains
constant:
i = Index(0)
When using the command-line interface to FFC, a sequence of free indices
are automatically declared for convenience: i, j, k, l, m, n. Note however
that a user is free to declare new indices with other names or even reuse these
variables for other things than indices.
4.3.7
Identity
The data type Identity represents an n × n unit matrix of given size n. An
Identity is declared by specifying the dimension n:
I = Identity(n)
30