The following table shows arithmetic operations that can be performed point-wise on
Data objects.
At least one of the arguments arg0 or arg1 must be a
Data object.
Either of the arguments may be a Data object, a python number or a numpy object.
If arg0 or arg1 are not defined on the same FunctionSpace, then an attempt is made to convert arg0 to the FunctionSpace of arg1 or to convert arg1 to the FunctionSpace of arg0. Both arguments must have the same shape or one of the arguments may be of rank 0 (a constant).
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 as
arg0 or have 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 arg0.
The Data class supports taking slices from a Data object as well as assigning new values to a slice of an existing
Data object.
The following expressions for taking and setting slices are valid:
where s is the shape of arg and
esys@esscc.uq.edu.au