&t - Summation convention tensor multiplication operator
Synopsis:
- &t peforms the summation convention multiplication of Cartesian tensors. It is a binary operator that looks for indices in the two operands, and whenever it finds two indices that are equal it performs a sum from 1 to 3 over that index.
- &t can be combined with the nab operator and the predefined tensors delta[i,j] and epsilon[i,j,k] to produce cross products, gradients, curls etc.
- &t follows the usual arithemetic rules, parentheses can be used etc.
- The user must take care that the indices over which summation should be performed have not been assigned values.
- There is little or no syntax check. The expressions a[i] &t b[i,k] &t c[i,j] and a[i] &t ( s + b[i]) are meaningless, but &t will not give any explicit warning.
Examples:
> read(femLego);
> a[i] &t b[i];
a[1] b[1] + a[2] b[2] + a[3] b[3]
> s &t a[k];
s a[k]
> r &t s;
r s
> u[i](x,y,z) &t nab(u[j](x,y,z))[i];
/ d \ / d \
u[1](x, y, z) |---- u[j](x, y, z)| + u[2](x, y, z) |---- u[j](x, y, z)|
\ dx / \ dy /
/ d \
+ u[3](x, y, z) |---- u[j](x, y, z)|
\ dz /
> epsilon[1,j,k] &t a[j] &t b[k];
a[2] b[3] - a[3] b[2]
> for i from 1 to 3 do epsilon[i,j,k] &t a[j] &t b[k] od;
a[2] b[3] - a[3] b[2]
- a[1] b[3] + a[3] b[1]
a[1] b[2] - a[2] b[1]