[GiNaC-list] issues with simplify_indexed()
PG CLARK
P.G.Clark at Bradford.ac.uk
Sun May 15 22:38:07 CEST 2011
I've been trying to get a little program of mine to work and well it
just doesn't terminate. Somewhere it gets snagged in an infinite loop
in the library. I'm pretty sure this is a library bug and I've alerted
development but in the mean while has an one encountered this before?
Has any one figured out a work around? I've whittled my program down
to the smallest most simple component I could get to non terminate.
The code looks like this.
#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 U("U"), v("v"), h("h");
exvector IJKLMNVec;
idx IJKLMNIA[] ={i, j, k, l, m, n};
IJKLMNVec.assign (IJKLMNIA,IJKLMNIA+6);
ex myEx = (indexed(h, IJKLMNVec)*indexed(U, i, Va)
*indexed(U, k, Vb)*indexed(U, m, Vg)*indexed(v, j, Va)
*indexed(v, l, Vb)*indexed(v, n, Vg)).simplify_indexed();
cout << myEx << endl;
return 0;
}
This code never makes it to the cout code. it get trapped in a loop
before then.
Any one seen this before?
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the GiNaC-list
mailing list