EinSum examples

The following examples show some of the capabilities EinSum have to express index notation expressions.
  1. Example1 shows how Gram-Schmidt orthogonalization may be expressed in a general metric.
  2. Example2 shows how a cross product may be expressed with the anti-symmetric Levi-Civita symbol.
  3. Example3 shows how coordinate transformations of tensors may be expressed with index notation.
  4. Example4 shows how the trapezoidal rule may be generalized to two dimensions using index notation.
  5. Example5 shows how data in tensors may be set using loops over indices.
  6. Example6 shows how associated tensors may be treated
  7. Example7 shows how two-point tensors may be treated

The following examples illustrate the symmetry support in EinSum.

  1. ExampleS1 shows a general symmetry projection.
  2. ExampleS2 shows how a cross product may be expressed with the anti-symmetric Levi-Civita symbol, this time exploiting symmetries.
  3. ExampleS3 shows how the Hodge star operation may be coded.
  4. ExampleS4 shows how the Frobenius norm may be computed, utilizing symmetries.