From ce43a064bff548c95767cdf75f5c5750f6a66f0d Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Wed, 14 Mar 2001 23:05:38 +0000 Subject: [PATCH] added checks involving epsilon tensor --- check/exam_indexed.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/check/exam_indexed.cpp b/check/exam_indexed.cpp index 11182cb9..8e80e4ec 100644 --- a/check/exam_indexed.cpp +++ b/check/exam_indexed.cpp @@ -103,6 +103,26 @@ static unsigned metric_check(void) return result; } +static unsigned epsilon_check(void) +{ + // checks identities of the epsilon tensor + + 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); + + // antisymmetry + result += check_equal(lorentz_eps(mu, nu, rho, sigma) + lorentz_eps(sigma, rho, mu, nu), 0); + + // convolution is zero + result += check_equal(lorentz_eps(mu, nu, rho, nu.toggle_variance()), 0); + 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); + + return result; +} + static unsigned symmetry_check(void) { // check symmetric/antisymmetric objects @@ -194,6 +214,7 @@ unsigned exam_indexed(void) result += delta_check(); cout << '.' << flush; result += metric_check(); cout << '.' << flush; + result += epsilon_check(); cout << '.' << flush; result += symmetry_check(); cout << '.' << flush; result += edyn_check(); cout << '.' << flush; -- 2.44.0