803 |
\begin{funcdesc}{inverse}{a} |
\begin{funcdesc}{inverse}{a} |
804 |
return the inverse of \var{a}. This is |
return the inverse of \var{a}. This is |
805 |
\begin{equation} |
\begin{equation} |
806 |
\code{matrixmult(inverse(a),a)=kronecker(d)} |
\code{matrix_mult(inverse(a),a)=kronecker(d)} |
807 |
\end{equation} |
\end{equation} |
808 |
if \var{a} has shape \code{(d,d)}. The current implementation is restricted to arguments of shape |
if \var{a} has shape \code{(d,d)}. The current implementation is restricted to arguments of shape |
809 |
\code{(2,2)} and \code{(3,3)}. |
\code{(2,2)} and \code{(3,3)}. |
811 |
\begin{funcdesc}{eigenvalues}{a} |
\begin{funcdesc}{eigenvalues}{a} |
812 |
return the eigenvalues of \var{a}. This is |
return the eigenvalues of \var{a}. This is |
813 |
\begin{equation} |
\begin{equation} |
814 |
\code{matrixmult(a,V)=e[i]*V} |
\code{matrix_mult(a,V)=e[i]*V} |
815 |
\end{equation} |
\end{equation} |
816 |
where \code{e=eigenvalues(a)} and \var{V} is suitable non--zero vector \var{V}. |
where \code{e=eigenvalues(a)} and \var{V} is suitable non--zero vector \var{V}. |
817 |
The eigenvalues are ordered in increasing size. |
The eigenvalues are ordered in increasing size. |
822 |
\begin{funcdesc}{eigenvalues_and_eigenvectors}{a} |
\begin{funcdesc}{eigenvalues_and_eigenvectors}{a} |
823 |
return the eigenvalues and eigenvectors of \var{a}. This is |
return the eigenvalues and eigenvectors of \var{a}. This is |
824 |
\begin{equation} |
\begin{equation} |
825 |
\code{matrixmult(a,V[:,i])=e[i]*V[:,i]} |
\code{matrix_mult(a,V[:,i])=e[i]*V[:,i]} |
826 |
\end{equation} |
\end{equation} |
827 |
where \code{e,V=eigenvalues_and_eigenvectors(a)}. The eigenvectors \var{V} are orthogonal and normalized, ie. |
where \code{e,V=eigenvalues_and_eigenvectors(a)}. The eigenvectors \var{V} are orthogonal and normalized, ie. |
828 |
\begin{equation} |
\begin{equation} |
829 |
\code{matrixmult(transpose(V),V)=kronecker(d)} |
\code{matrix_mult(transpose(V),V)=kronecker(d)} |
830 |
\end{equation} |
\end{equation} |
831 |
if \var{a} has shape \code{(d,d)}. The eigenvalues are ordered in increasing size. |
if \var{a} has shape \code{(d,d)}. The eigenvalues are ordered in increasing size. |
832 |
The argument \var{a} has to be the symmetric, ie. \code{a=symmetric(a)}. |
The argument \var{a} has to be the symmetric, ie. \code{a=symmetric(a)}. |
867 |
\code{inner(a)}=\sum\hackscore{ijkl}\var{a0} \left[i,j,k,l\right] \cdot \var{a1} \left[j,i,k,l\right] |
\code{inner(a)}=\sum\hackscore{ijkl}\var{a0} \left[i,j,k,l\right] \cdot \var{a1} \left[j,i,k,l\right] |
868 |
\end{equation} |
\end{equation} |
869 |
\end{funcdesc} |
\end{funcdesc} |
870 |
\begin{funcdesc}{matrixmult}{a0,a1} |
|
871 |
|
\begin{funcdesc}{matrix_mult}{a0,a1} |
872 |
returns the matrix product of \var{a0} and \var{a1}. If \var{a1} is \RankOne this is |
returns the matrix product of \var{a0} and \var{a1}. If \var{a1} is \RankOne this is |
873 |
\begin{equation} |
\begin{equation} |
874 |
\code{matrixmult(a)}\left[i\right]=\sum\hackscore{k}\var{a0} \cdot \left[i,k\right]\var{a1} \left[k\right] |
\code{matrix_mult(a)}\left[i\right]=\sum\hackscore{k}\var{a0} \cdot \left[i,k\right]\var{a1} \left[k\right] |
875 |
|
\end{equation} |
876 |
|
and if \var{a1} is \RankTwo this is |
877 |
|
\begin{equation} |
878 |
|
\code{matrix_mult(a)}\left[i,j\right]=\sum\hackscore{k}\var{a0} \cdot \left[i,k\right]\var{a1} \left[k,j\right] |
879 |
|
\end{equation} |
880 |
|
\end{funcdesc} |
881 |
|
|
882 |
|
\begin{funcdesc}{transposed_matrix_mult}{a0,a1} |
883 |
|
returns the matrix product of the transposed of \var{a0} and \var{a1}. The function is equivalent to |
884 |
|
\code{matrix_mult(transpose(a0),a1)}. |
885 |
|
If \var{a1} is \RankOne this is |
886 |
|
\begin{equation} |
887 |
|
\code{transposed_matrix_mult(a)}\left[i\right]=\sum\hackscore{k}\var{a0} \cdot \left[k,i\right]\var{a1} \left[k\right] |
888 |
\end{equation} |
\end{equation} |
889 |
and if \var{a1} is \RankTwo this is |
and if \var{a1} is \RankTwo this is |
890 |
\begin{equation} |
\begin{equation} |
891 |
\code{matrixmult(a)}\left[i,j\right]=\sum\hackscore{k}\var{a0} \cdot \left[i,k\right]\var{a1} \left[k,j\right] |
\code{transposed_matrix_mult(a)}\left[i,j\right]=\sum\hackscore{k}\var{a0} \cdot \left[k,i\right]\var{a1} \left[k,j\right] |
892 |
\end{equation} |
\end{equation} |
893 |
\end{funcdesc} |
\end{funcdesc} |
894 |
|
|
895 |
|
\begin{funcdesc}{matrix_transposed_mult}{a0,a1} |
896 |
|
returns the matrix product of \var{a0} and the transposed of \var{a1}. |
897 |
|
The function is equivalent to |
898 |
|
\code{matrix_mult(a0,transpose(a1))}. |
899 |
|
If \var{a1} is \RankTwo this is |
900 |
|
\begin{equation} |
901 |
|
\code{matrix_transposed_mult(a)}\left[i,j\right]=\sum\hackscore{k}\var{a0} \cdot \left[i,k\right]\var{a1} \left[j,k\right] |
902 |
|
\end{equation} |
903 |
|
\end{funcdesc} |
904 |
|
|
905 |
\begin{funcdesc}{outer}{a0,a1} |
\begin{funcdesc}{outer}{a0,a1} |
906 |
returns the outer product of \var{a0} and \var{a1}. For instance if \var{a0} and \var{a1} both are \RankOne then |
returns the outer product of \var{a0} and \var{a1}. For instance if \var{a0} and \var{a1} both are \RankOne then |
907 |
\begin{equation} |
\begin{equation} |
912 |
\code{outer(a)}\left[i,j,k\right]=\var{a0} \left[i\right] \cdot \var{a1}\left[j,k\right] |
\code{outer(a)}\left[i,j,k\right]=\var{a0} \left[i\right] \cdot \var{a1}\left[j,k\right] |
913 |
\end{equation} |
\end{equation} |
914 |
\end{funcdesc} |
\end{funcdesc} |
915 |
\begin{funcdesc}{tensormult}{a0,a1} |
|
916 |
|
\begin{funcdesc}{tensor_mult}{a0,a1} |
917 |
returns the tensor product of \var{a0} and \var{a1}. If \var{a1} is \RankTwo this is |
returns the tensor product of \var{a0} and \var{a1}. If \var{a1} is \RankTwo this is |
918 |
\begin{equation} |
\begin{equation} |
919 |
\code{tensormult(a)}\left[i,j\right]=\sum\hackscore{kl}\var{a0}\left[i,j,k,l\right] \cdot \var{a1} \left[k,l\right] |
\code{tensor_mult(a)}\left[i,j\right]=\sum\hackscore{kl}\var{a0}\left[i,j,k,l\right] \cdot \var{a1} \left[k,l\right] |
920 |
\end{equation} |
\end{equation} |
921 |
and if \var{a1} is \RankFour this is |
and if \var{a1} is \RankFour this is |
922 |
\begin{equation} |
\begin{equation} |
923 |
\code{tensormult(a)}\left[i,j,k,l\right]=\sum\hackscore{mn}\var{a0} \left[i,j,m,n\right] \cdot \var{a1} \left[m,n,k,l\right] |
\code{tensor_mult(a)}\left[i,j,k,l\right]=\sum\hackscore{mn}\var{a0} \left[i,j,m,n\right] \cdot \var{a1} \left[m,n,k,l\right] |
924 |
\end{equation} |
\end{equation} |
925 |
\end{funcdesc} |
\end{funcdesc} |
926 |
|
|
927 |
|
\begin{funcdesc}{transposed_tensor_mult}{a0,a1} |
928 |
|
returns the tensor product of the transposed of \var{a0} and \var{a1}. The function is equivalent to |
929 |
|
\code{tensor_mult(transpose(a0),a1)}. |
930 |
|
If \var{a1} is \RankTwo this is |
931 |
|
\begin{equation} |
932 |
|
\code{transposed_tensor_mult(a)}\left[i,j\right]=\sum\hackscore{kl}\var{a0}\left[k,l,i,j\right] \cdot \var{a1} \left[k,l\right] |
933 |
|
\end{equation} |
934 |
|
and if \var{a1} is \RankFour this is |
935 |
|
\begin{equation} |
936 |
|
\code{transposed_tensor_mult(a)}\left[i,j,k,l\right]=\sum\hackscore{mn}\var{a0} \left[m,n,i,j\right] \cdot \var{a1} \left[m,n,k,l\right] |
937 |
|
\end{equation} |
938 |
|
\end{funcdesc} |
939 |
|
|
940 |
|
\begin{funcdesc}{tensor_transposed_mult}{a0,a1} |
941 |
|
returns the tensor product of \var{a0} and the transposed of \var{a1}. |
942 |
|
The function is equivalent to |
943 |
|
\code{tensor_mult(a0,transpose(a1))}. |
944 |
|
If \var{a1} is \RankTwo this is |
945 |
|
\begin{equation} |
946 |
|
\code{tensor_transposed_mult(a)}\left[i,j\right]=\sum\hackscore{kl}\var{a0}\left[i,j,k,l\right] \cdot \var{a1} \left[l,k\right] |
947 |
|
\end{equation} |
948 |
|
and if \var{a1} is \RankFour this is |
949 |
|
\begin{equation} |
950 |
|
\code{tensor_transposed_mult(a)}\left[i,j,k,l\right]=\sum\hackscore{mn}\var{a0} \left[i,j,m,n\right] \cdot \var{a1} \left[k,l,m,n\right] |
951 |
|
\end{equation} |
952 |
|
\end{funcdesc} |
953 |
|
|
954 |
\begin{funcdesc}{grad}{a\optional{, where=None}} |
\begin{funcdesc}{grad}{a\optional{, where=None}} |
955 |
returns the gradient of \var{a}. If \var{where} is present the gradient will be calculated in \FunctionSpace \var{where} otherwise a |
returns the gradient of \var{a}. If \var{where} is present the gradient will be calculated in \FunctionSpace \var{where} otherwise a |
956 |
default \FunctionSpace is used. In case that \var{a} has \RankTwo one has |
default \FunctionSpace is used. In case that \var{a} has \RankTwo one has |
984 |
returns the jump of \var{a} over the discontinuity in its domain or if \Domain \var{domain} is present |
returns the jump of \var{a} over the discontinuity in its domain or if \Domain \var{domain} is present |
985 |
in \var{domain}. |
in \var{domain}. |
986 |
\begin{equation} |
\begin{equation} |
987 |
\code{jump(a)}=interpolate(a,FunctionOnContactOne(domain))-interpolate(a,FunctionOnContactZero(domain)) |
\begin{array}{rcl} |
988 |
|
\code{jump(a)}& = &\code{interpolate(a,FunctionOnContactOne(domain))} \\ |
989 |
|
& & \hfill - \code{interpolate(a,FunctionOnContactZero(domain))} |
990 |
|
\end{array} |
991 |
\end{equation} |
\end{equation} |
992 |
\end{funcdesc} |
\end{funcdesc} |
993 |
\begin{funcdesc}{L2}{a} |
\begin{funcdesc}{L2}{a} |
994 |
returns the $L^2$-norm of \var{a} in its function space. This is |
returns the $L^2$-norm of \var{a} in its function space. This is |
995 |
\begin{equation} |
\begin{equation} |
996 |
\code{L2(a)}=integrate(length(a)^2) \; . |
\code{L2(a)=integrate(length(a)}^2\code{)} \; . |
997 |
\end{equation} |
\end{equation} |
998 |
\end{funcdesc} |
\end{funcdesc} |
999 |
|
|