From 8f12af23380271eebc2ac923dcbde662469c7fd7 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Tue, 27 Mar 2001 18:17:06 +0000 Subject: [PATCH] added check for contraction of epsilon with symmetric tensor --- check/exam_indexed.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/check/exam_indexed.cpp b/check/exam_indexed.cpp index 21e75405..2426430c 100644 --- a/check/exam_indexed.cpp +++ b/check/exam_indexed.cpp @@ -109,8 +109,9 @@ static unsigned epsilon_check(void) unsigned result = 0; - symbol s_mu("mu"), s_nu("nu"), s_rho("rho"), s_sigma("sigma"); - varidx mu(s_mu, 4), nu(s_nu, 4), rho(s_rho, 4), sigma(s_sigma, 4); + symbol s_mu("mu"), s_nu("nu"), s_rho("rho"), s_sigma("sigma"), s_tau("tau"); + symbol d("d"); + varidx mu(s_mu, 4), nu(s_nu, 4), rho(s_rho, 4), sigma(s_sigma, 4), tau(s_tau, 4); // antisymmetry result += check_equal(lorentz_eps(mu, nu, rho, sigma) + lorentz_eps(sigma, rho, mu, nu), 0); @@ -120,6 +121,12 @@ static unsigned epsilon_check(void) result += check_equal(lorentz_eps(mu, nu, mu.toggle_variance(), nu.toggle_variance()), 0); result += check_equal_simplify(lorentz_g(mu.toggle_variance(), nu.toggle_variance()) * lorentz_eps(mu, nu, rho, sigma), 0); + // contraction with symmetric tensor is zero + result += check_equal_simplify(lorentz_eps(mu, nu, rho, sigma) * indexed(d, indexed::symmetric, mu.toggle_variance(), nu.toggle_variance()), 0); + result += check_equal_simplify(lorentz_eps(mu, nu, rho, sigma) * indexed(d, indexed::symmetric, nu.toggle_variance(), sigma.toggle_variance(), rho.toggle_variance()), 0); + ex e = lorentz_eps(mu, nu, rho, sigma) * indexed(d, indexed::symmetric, mu.toggle_variance(), tau); + result += check_equal_simplify(e, e); + return result; } -- 2.45.0