[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.14.6.1 Delta tensor
The delta tensor takes two indices, is symmetric and has the matrix
representation diag(1, 1, 1, ...)
. It is constructed by the function
delta_tensor()
:
{ symbol A("A"), B("B"); idx i(symbol("i"), 3), j(symbol("j"), 3), k(symbol("k"), 3), l(symbol("l"), 3); ex e = indexed(A, i, j) * indexed(B, k, l) * delta_tensor(i, k) * delta_tensor(j, l); cout << e.simplify_indexed() << endl; // -> B.i.j*A.i.j cout << delta_tensor(i, i) << endl; // -> 3 } |