X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ftensor.cpp;h=f8e5635a64af3caeb67c6557ca8e21cff6b50815;hp=d78eff6604078ebf1b913e63d4682bba54c7c20f;hb=5ef801553eb39aed7bd2df9dd1aff9d752c3ea9d;hpb=7bc96470ee0dd5c59a8ea1a29b74a781668606a1 diff --git a/ginac/tensor.cpp b/ginac/tensor.cpp index d78eff66..f8e5635a 100644 --- a/ginac/tensor.cpp +++ b/ginac/tensor.cpp @@ -171,7 +171,10 @@ ex tensdelta::eval_indexed(const basic & i) const // dimension if (!i1.get_dim().is_equal(i2.get_dim())) { ex min_dim = i1.minimal_dim(i2); - return i.subs(lst(i1 == i1.replace_dim(min_dim), i2 == i2.replace_dim(min_dim))); + exmap m; + m[i1] = i1.replace_dim(min_dim); + m[i2] = i2.replace_dim(min_dim); + return i.subs(m); } // Trace of delta tensor is the (effective) dimension of the space @@ -212,7 +215,10 @@ ex tensmetric::eval_indexed(const basic & i) const // dimension if (!i1.get_dim().is_equal(i2.get_dim())) { ex min_dim = i1.minimal_dim(i2); - return i.subs(lst(i1 == i1.replace_dim(min_dim), i2 == i2.replace_dim(min_dim))); + exmap m; + m[i1] = i1.replace_dim(min_dim); + m[i2] = i2.replace_dim(min_dim); + return i.subs(m); } // A metric tensor with one covariant and one contravariant index gets