I'm having issues with Mathemtica trying to index lists incorrectly which ultimately originate from the call
Code: Select all
generatePOLEfunctions[2, ZoSSSS, {1, 1, 2, 2}, {1, 1, 2, 2}, {{1 -> ps3, 2 -> ps4, 3 -> ps1, 4 -> ps2}}]
Going through the debug, the error comes down to the following segment (taken from Mathematica's debugger, hence the extra $NNN everywhere)
Code: Select all
particlesincoupling = Transpose[setofindices$153632[[Scalarcouplingnumber$153632]]][[1]];
indicesincoupling = Transpose[setofindices$153632[[Scalarcouplingnumber$153632]]][[2]];
setofpairs = {{}, {}}; orderedfieldsincoupling = diag$153632[[1, j$153632]] /. {C[x__] -> {x}};
For[k$153632 = 1, k$153632 <= 4, k$153632++,
AppendTo[setofpairs[[{1, 1, 2, 2}[[indicesincoupling[[k$153632]] /. indextonumber]]]], {particlesincoupling[[k$153632]], indicesincoupling[[k$153632]]}];
];
newcouplingindices = {{}, {}, {}, {}};
pp1 = Position[orderedfieldsincoupling, setofpairs[[1, 1, 1]], 1][[1, 1]];
pp2 = Position[orderedfieldsincoupling, setofpairs[[1, 2, 1]], 1][[1, 1]];
pp3 = Position[orderedfieldsincoupling, setofpairs[[2, 1, 1]], 1][[2, 1]];
pp4 = Position[orderedfieldsincoupling, setofpairs[[2, 2, 1]], 1][[2, 1]];
newcouplingindices[[pp1]] = setofpairs[[1, 1]];
newcouplingindices[[pp2]] = setofpairs[[1, 2]];
newcouplingindices[[pp3]] = setofpairs[[2, 1]];
newcouplingindices[[pp4]] = setofpairs[[2, 2]];
indicestowrite$153632 = {};
For[k$153632 = 1, k$153632 <= 4, k$153632++,
AppendTo[indicestowrite$153632, {orderedfieldsincoupling[[k$153632]], newcouplingindices[[k$153632, 2]]}]
];
AppendTo[allindicesstrings$153632, {indicestowrite$153632, diag$153632[[1, j$153632]] /. a_[{x__}] -> a}];
Code: Select all
orderedfieldsincoupling: {DS, DS, conj[DS], conj[DS]}
setofpairs: {{{conj[DS], i1}, {conj[DS], i2}}, {{DS, i3}, {DS, i4}}}
pp1: 3
pp2: 3
pp3: 2
pp4: 2
newcouplingindices: {{}, {DS, i4}, {conj[DS], i2}, {}}
I'm not familiar enough with the code here to fix it, but do you have an idea what might be cause of this issue? Did I find a bug in SARAH itself? Or do you suspect it is a bug in my implementation of the model? In this instance, DS corresponds to two complex scalars.
Josh