Vladimirs patch has been applied.
Dear all, I applied Vladimirs patch from the "Improved dummy index renaming -> clifford exam fails"-thread. I hope I did everything correctly because I had to remove some casting to varidxes. This is undefined behaviour if the object being casted is not a varidx. Not to mention the operation of asking such an object to toggle its variance. I have another question for Vladimir: at some places in clifford.cpp locally within some functions a varidx is created. But now that clifford objects can also carry indices without variance, is this still correct? Maybe it should depend on the kind of index that wat supplied to such a function? Best wishes, Chris
Dear Chris,
"CD" == Chris Dams <Chris.Dams@mi.infn.it> writes: CD> I have another question for Vladimir: at some places in CD> clifford.cpp locally within some functions a varidx is CD> created. But now that clifford objects can also carry indices CD> without variance, is this still correct? Maybe it should depend CD> on the kind of index that wat supplied to such a function?
Thanks for pointing this, I have overseen it. Now I try to look on it, but.... CD> I have improved the dummy index renaming. Now dummy indices are (if CD> necessary) also renamed after mul::map is called. I made the code a bit CD> nicer. ... it seems to be a problem with dummy renaming in combination of indexes without variance and non-commutative products. Here is the example: #include <stdexcept> #include <sstream> using namespace std; #include <ginac/ginac.h> using namespace GiNaC; int main() { try { idx i(symbol("i"),4); realsymbol t("t"), x("x"), y("y"), z("z"); matrix M(4,1), M1(4,1); M= t, x,y,z; M1= 1,2,3,4; ex e=clifford_unit(i,diag_matrix(lst(1,-1,1,-1))); ex a=indexed(M,i)*e; ex a1=indexed(M1,i)*e; cout << (a+dirac_ONE())*a1 << endl; //-> [[1],[2],[3],[4]].i*((ONE+[[t],[x],[y],[z]].symbol8*e.symbol8)*e.symbol8) } catch (exception &p) { cerr << "Got problem: " << p.what() << endl; } } Have you got any idea how to fix it? Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
Dear Vladimir, On Fri, 18 Aug 2006, Vladimir Kisil wrote:
... it seems to be a problem with dummy renaming in combination of indexes without variance and non-commutative products. Here is the example:
[...]
Yes, that should be fixed. If multiplications rename their indices, also ncmuls should be doing that. I will add some code do ncmul.cpp for this. Best wishes, Chris
participants (2)
-
Chris Dams
-
Vladimir Kisil