[GiNaC-list] issues with simplify_indexed()
Ulrich Loup
loup at cs.rwth-aachen.de
Tue May 17 02:08:46 CEST 2011
Hi again,
sorry that I first misunderstood your problem.
Maybe it helps to split the simplification into several simplify_indexed()
calls, or is this not equivalent in your case?
Ulrich.
Nachricht von Sonntag 15 Mai 2011 22:38:07:
> 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.
>
>
> _______________________________________________
> GiNaC-list mailing list
> GiNaC-list at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-list
More information about the GiNaC-list
mailing list