commit 5ab2e85af5e33364f855be263e30ec5a48bedc13
parent b5de5eea187fbabfd6fe7c57c8dbdd31ad29255c
Author: Bakar Chargeishvili <bakar@bcharge.de>
Date: Fri, 29 Apr 2022 17:21:57 +0200
Fix final state legId
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/webs.c b/webs.c
@@ -41,7 +41,7 @@ generate_legs(char **init, size_t n_init, char **fin, size_t n_fin, size_t nLoop
if (!strcmp("g", fin[i]))
isGluon = 1;
Vertex *Vertices = (Vertex *)ecalloc(nLoops+1, sizeof(Vertex));
- Vertices[0] = (Vertex){n_init+i,0};
+ Vertices[0] = (Vertex){n_init+i+1,0};
Legs[n_init+i+1] = (Leg){init[i], 1, n_init+i, 0, isGluon,Vertices};
}
}
@@ -69,7 +69,9 @@ generate_loops(Vertex *Vertices, Leg *Legs, Link *Graphs, size_t nVx, size_t nLe
{
for (int iVx = 0; iVx < nVx; ++iVx) {
Vertex V = Vertices[iVx];
- printf("V%d%d\n", V.legId, V.id);
+ Vertex *targets = (Vertex*)ecalloc(nLegs-V.legId, sizeof(Vertex));
+ printf("Target count: %ld\n", nLegs-V.legId);
+ printf("V%d%d: ", V.legId, V.id);
for (int iLeg = V.legId+1; iLeg <= nLegs; ++iLeg) {
printf("%d ", iLeg);
}
@@ -172,7 +174,7 @@ main(int argc, char *argv[])
char *initial[] = {"g","g"};
char *final[] = {"q","qbar", "g"};
- int nLoops = 1;
+ int nLoops = 2;
size_t nLegs = NELEMS(initial) + NELEMS(final);
Leg Legs[nLegs+1];