Functions of Data objects

This section lists the most important functions for Data class objects a. A complete list and a more detailed description of the functionality can be found on http://esys.esscc.uq.edu.au/docs.html.
\begin{funcdesc}{saveVTK}{filename,**kwdata}
writes \class{Data}\xspace defined ...
...n the allowed combinations of \class{FunctionSpace}\xspace apply.
\end{funcdesc}

\begin{funcdesc}{saveDX}{filename,**kwdata}
writes \class{Data}\xspace defined b...
...n the allowed combinations of \class{FunctionSpace}\xspace apply.
\end{funcdesc}

\begin{funcdesc}{kronecker}{d}
returns a {rank-2 \class{Data}\xspace object}\xsp...
...is an integer a $(d,d)$\ \module{numpy}\xspace array is returned.
\end{funcdesc}

\begin{funcdesc}{identityTensor}{d}
is a synonym for \code{kronecker} (see above).
\end{funcdesc}

\begin{funcdesc}{identityTensor4}{d}
returns a {rank-4 \class{Data}\xspace objec...
...n integer a $(d,d,d,d)$\ \module{numpy}\xspace array is returned.
\end{funcdesc}

\begin{funcdesc}{unitVector}{i,d}
returns a {rank-1 \class{Data}\xspace object}\...
...n integer a $(d,)$\ \module{numpy}\xspace array is returned.
\par
\end{funcdesc}


\begin{funcdesc}{Lsup}{a}
returns the $L^{sup}$\ norm of \var{arg}. This is the ...
...data sample points}\index{data sample!points}\xspace of \var{a}.
\end{funcdesc}


\begin{funcdesc}{sup}{a}
returns the maximum value over all components and all {data sample points}\index{data sample!points}\xspace of \var{a}.
\end{funcdesc}


\begin{funcdesc}{inf}{a}
returns the minimum value over all components and all {data sample points}\index{data sample!points}\xspace of \var{a}
\end{funcdesc}


\begin{funcdesc}{minval}{a}
returns at each {data sample points}\index{data sample!points}\xspace the minimum value over all components.
\end{funcdesc}


\begin{funcdesc}{maxval}{a}
returns at each {data sample points}\index{data sample!points}\xspace the maximum value over all components.
\end{funcdesc}


\begin{funcdesc}{length}{a}
returns at Euclidean norm at each {data sample point...
...m\hackscore{ijkl} \var{a} \left[i,j,k,l\right]^2}
\end{equation}
\end{funcdesc}

\begin{funcdesc}{trace}{a\optional{,axis_offset=0}}
returns the trace of \var{a}...
...t]=\sum\hackscore{k} \var{a} \left[i,k,k,j\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{transpose}{a\optional{, axis_offset=None}}
returns the transpos...
...\left[i,j,k,l\right]=\var{a} \left[j,k,l,i\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{swap_axes}{a\optional{, axis0=0 \optional{, axis1=1 }}}
returns...
...\left[i,j,k,l\right]=\var{a} \left[i,k,j,l\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{symmetric}{a}
returns the symmetric part of \var{a}. This is \code{(a+transpose(a))/2}.
\end{funcdesc}

\begin{funcdesc}{nonsymmetric}{a}
returns the non--symmetric part of \var{a}. This is \code{(a-transpose(a))/2}.
\end{funcdesc}

\begin{funcdesc}{inverse}{a}
return the inverse of \var{a}. This is
\begin{equa...
... restricted to arguments of shape
\code{(2,2)} and \code{(3,3)}.
\end{funcdesc}

\begin{funcdesc}{eigenvalues}{a}
return the eigenvalues of \var{a}. This is
\be...
... restricted to arguments of shape
\code{(2,2)} and \code{(3,3)}.
\end{funcdesc}

\begin{funcdesc}{eigenvalues_and_eigenvectors}{a}
return the eigenvalues and eig...
... restricted to arguments of shape
\code{(2,2)} and \code{(3,3)}.
\end{funcdesc}

\begin{funcdesc}{maximum}{*a}
returns the maximum value over all arguments at al...
...on}at all {data sample points}\index{data sample!points}\xspace .
\end{funcdesc}

\begin{funcdesc}{minimum}{*a}
returns the minimum value over all arguments at al...
...on}at all {data sample points}\index{data sample!points}\xspace .
\end{funcdesc}


\begin{funcdesc}{clip}{a\optional{, minval=0.}\optional{, maxval=1.}}
cuts back ...
...er than \var{maxval}
or corresponding value of \var{a} otherwise.
\end{funcdesc}

\begin{funcdesc}{inner}{a0,a1}
returns the inner product of \var{a0} and \var{a1...
...,j,k,l\right] \cdot \var{a1} \left[j,i,k,l\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{matrix_mult}{a0,a1}
returns the matrix product of \var{a0} and ...
...} \cdot \left[i,k\right]\var{a1} \left[k,j\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{transposed_matrix_mult}{a0,a1}
returns the matrix product of th...
...} \cdot \left[k,i\right]\var{a1} \left[k,j\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{matrix_transposed_mult}{a0,a1}
returns the matrix product of \v...
...} \cdot \left[i,k\right]\var{a1} \left[j,k\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{outer}{a0,a1}
returns the outer product of \var{a0} and \var{a1...
...a0} \left[i\right] \cdot \var{a1}\left[j,k\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{tensor_mult}{a0,a1}
returns the tensor product of \var{a0} and ...
...,j,m,n\right] \cdot \var{a1} \left[m,n,k,l\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{transposed_tensor_mult}{a0,a1}
returns the tensor product of th...
...,n,i,j\right] \cdot \var{a1} \left[m,n,k,l\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{tensor_transposed_mult}{a0,a1}
returns the tensor product of \v...
...,j,m,n\right] \cdot \var{a1} \left[k,l,m,n\right]
\end{equation}
\end{funcdesc}


\begin{funcdesc}{grad}{a\optional{, where=None}}
returns the gradient of \var{a}...
...var{a} \left[i,j\right]}{\partial x\hackscore{k}}
\end{equation}
\end{funcdesc}

\begin{funcdesc}{integrate}{a\optional{ ,where=None}}
returns the integral of \v...
...surface of the spatial domain and $ds$\ area or line integration.
\end{funcdesc}

\begin{funcdesc}{interpolate}{a,where}
interpolates argument \var{a} into the \class{FunctionSpace}\xspace \var{where}.
\end{funcdesc}

\begin{funcdesc}{div}{a\optional{ ,where=None}}
returns the divergence of \var{a...
...\begin{equation}
\code{div(a)}=trace(grad(a),where)
\end{equation}\end{funcdesc}

\begin{funcdesc}{jump}{a\optional{ ,domain=None}}
returns the jump of \var{a} ov...
...polate(a,FunctionOnContactZero(domain))}
\end{array}\end{equation}\end{funcdesc}

\begin{funcdesc}{L2}{a}
returns the $L^2$-norm of \var{a} in its function space....
...}
\code{L2(a)=integrate(length(a)}^2\code{)} \; .
\end{equation}
\end{funcdesc}

The following functions operate ``point-wise''. That is, the operation is applied to each component of each point individually.


\begin{funcdesc}{sin}{a}
applies sine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{cos}{a}
applies cosine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{tan}{a}
applies tangent function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{asin}{a}
applies arc (inverse) sine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{acos}{a}
applies arc (inverse) cosine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{atan}{a}
applies arc (inverse) tangent function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{sinh}{a}
applies hyperbolic sine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{cosh}{a}
applies hyperbolic cosine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{tanh}{a}
applies hyperbolic tangent function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{asinh}{a}
applies arc (inverse) hyperbolic sine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{acosh}{a}
applies arc (inverse) hyperbolic cosine function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{atanh}{a}
applies arc (inverse) hyperbolic tangent function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{exp}{a}
applies exponential function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{sqrt}{a}
applies square root function to \var{a}.
\end{funcdesc}


\begin{funcdesc}{log}{a}
applies the natural logarithm to \var{a}.
\end{funcdesc}


\begin{funcdesc}{log10}{a}
applies the base-$10$\ logarithm to \var{a}.
\end{funcdesc}


\begin{funcdesc}{sign}{a}
applies the sign function to \var{a}, that is $1$\ whe...
... is positive,
$-1$\ where \var{a} is negative and $0$\ otherwise.
\end{funcdesc}


\begin{funcdesc}{wherePositive}{a}
returns a function which is $1$\ where \var{a} is positive and $0$\ otherwise.
\end{funcdesc}


\begin{funcdesc}{whereNegative}{a}
returns a function which is $1$\ where \var{a} is negative and $0$\ otherwise.
\end{funcdesc}


\begin{funcdesc}{whereNonNegative}{a}
returns a function which is $1$\ where \var{a} is non--negative and $0$\ otherwise.
\end{funcdesc}


\begin{funcdesc}{whereNonPositive}{a}
returns a function which is $1$\ where \var{a} is non--positive and $0$\ otherwise.
\end{funcdesc}


\begin{funcdesc}{whereZero}{a\optional{, tol=None, \optional{, rtol=1.e-8}}}
ret...
...resent, the absolute maximum value of C{a} times C{rtol} is used.
\end{funcdesc}


\begin{funcdesc}{whereNonZero}{a, \optional{, tol=None, \optional{, rtol=1.e-8}}...
...resent, the absolute maximum value of C{a} times C{rtol} is used.
\end{funcdesc}

esys@esscc.uq.edu.au