[GiNaC-devel] a clarification regarding the problem with simplify_indexed.
PG CLARK
P.G.Clark at Bradford.ac.uk
Sat May 14 00:59:11 CEST 2011
In fact the code doesn't even care about the tensor symmetry. This
code also fails to terminate.
#include <iostream>
#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;
int main()
{
symbol i_sym("i"), j_sym("j"), k_sym("k"), l_sym("l"), m_sym("m"),
n_sym("n");
idx i(i_sym, 2), j(j_sym, 2), k(k_sym, 2), l(l_sym, 2), m(m_sym, 2),
n(n_sym, 2);
symbol alpha_sym("\\alpha"), beta_sym("\\beta"), gamma_sym("\\gamma");
idx Va(alpha_sym, 3), Vb(beta_sym, 3), Vg(gamma_sym, 3);
symbol U1("U1"), U2("U2"), U3("U3"), U4("U4"), U5("U5"), U6("U6"), h("h");
exvector IJKLMNVec;
idx IJKLMNIA[] ={i, j, k, l, m, n};
IJKLMNVec.assign (IJKLMNIA,IJKLMNIA+6);
ex myEx1 = (indexed(h, IJKLMNVec)*indexed(U1, i, Va)*indexed(U5, m, Vg)
*indexed(U3, k, Vb)*indexed(U2, j, Va)*indexed(U4, l, Vb)*indexed(U6,
n, Vg));
ex myEx2 = (indexed(h, IJKLMNVec)*indexed(U1, i, Va)*indexed(U1, m, Vg)
*indexed(U1, k, Vb)*indexed(U1, j, Va)*indexed(U1, l, Vb)*indexed(U1,
n, Vg));
ex myEx3 = (indexed(h, IJKLMNVec)*indexed(U1, i, Va)*indexed(U2, m, Vg)
*indexed(U1, k, Vb)*indexed(U2, j, Va)*indexed(U1, l, Vb)*indexed(U2,
n, Vg));
// swap comments to see .simplify_indexed() fails in all cases
cout << myEx2.simplify_indexed() << endl;
//cout << myEx3.simplify_indexed() << endl;
//cout << myEx1.simplify_indexed() << endl;
return 0;
}
Could this be an error in simplify_indexed_product?
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the GiNaC-devel
mailing list