The following table shows binary and unitary operations that can be applied to
Data objects:
At least one of the arguments arg0 or arg1 must be a
Data object. One of the arguments may be an object that can be
converted into a Data object. If arg0 or arg1 are
defined on different FunctionSpace an attempt is made to embed arg0
into the FunctionSpace of arg1 or to embed arg1 into
the FunctionSpace of arg0. Boths arguments must have the same
shape or one of the arguments my be of rank 0. In the
latter case it is assumed that the particular argument is of the same
shape as the other argument but constant over all components.
The returned Data object has the same shape and is defined on the data sample points as arg0 or arg1.
The following table shows the update operations that can be applied to
Data objects:
arg0 must be a Data object. arg1 must be a
Data object or an object that can be converted into a
Data object. arg1 must have the same shape like
arg1 or has rank 0. In the latter case it is
assumed that the values of arg1 are constant for all
components. arg1 must be defined in the same FunctionSpace as
arg0 or it must be possible to interpolate arg1 onto the
FunctionSpace of arg1.
The Data class supports getting slices as well as assigning new values to components in an existing
Data object.
The following expression for getting (expression on the right hand side of the
equal sign) and setting slices (expression on the left hand side of the
equal sign) are valid:
where
,
,
,
and s the shape if arg.
Any of the lower indexes l0, l1, l2 and l3 may not be present in which case
0 is assumed.
Any of the upper indexes u0, u1, u2 and u3 may not be present in which case
s is assumed. The lower and upper index may be identical, in which case the column and the lower or upper
index may be dropped. In the returned or in the object assigned to a slice the corresponding component is dropped,
i.e. the rank is reduced by one in comparison to arg.
The following examples show slicing usage: