Skip to content

Commit fdbbd68

Browse files
committed
remove the topologies_ function and associated code
Clean up code related to topologies_, now that we only use the TopologiesOnly_ option of diagrams_. Clean up old grcc code which generates topologies only.
1 parent b674817 commit fdbbd68

File tree

7 files changed

+5
-2238
lines changed

7 files changed

+5
-2238
lines changed

sources/declare.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,9 @@ extern int TestPartitions(WORD *, PARTI *);
560560
extern int DoPartitions(PHEAD WORD *,WORD);
561561
extern int CoCanonicalize(UBYTE *);
562562
extern int DoCanonicalize(PHEAD WORD *, WORD *);
563-
extern int GenTopologies(PHEAD WORD *,WORD);
564563
extern int GenDiagrams(PHEAD WORD *,WORD);
565564
extern int DoTopologyCanonicalize(PHEAD WORD *,WORD,WORD,WORD *);
566565
extern int DoShattering(PHEAD WORD *,WORD *,WORD *,WORD);
567-
extern int GenerateTopologies(PHEAD WORD,WORD,WORD,WORD);
568566
extern int DoTableExpansion(WORD *,WORD);
569567
extern int DoDistrib(PHEAD WORD *,WORD);
570568
extern int DoShuffle(WORD *,WORD,WORD,WORD);

sources/diagrams.c

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -328,77 +328,6 @@ int DoCanonicalize(PHEAD WORD *term, WORD *params)
328328

329329
/*
330330
#] DoCanonicalize :
331-
#[ GenTopologies :
332-
333-
This function has the syntax
334-
topologies_(nloops, Number of loops
335-
nlegs, Number of legs
336-
setvertexsizes, A set which tells which vertices are allowed like {3,4}.
337-
set_extmomenta, The name of a set with the external momenta
338-
set_intmomenta The name of a set with the internal momenta
339-
[,options])
340-
The output will be using the built in functions vertex_ and edge_.
341-
342-
The test for whether this function can be evaluated is in TestSub (inside
343-
file proces.c) (search for the string TOPOLOGIES).
344-
This passes the code -15 in AN.TeInFun to Generator, which then calls
345-
the GenTopologies routine.
346-
*/
347-
348-
#ifdef OLDTOPO
349-
350-
int GenTopologies(PHEAD WORD *term,WORD level)
351-
{
352-
WORD *t1, *tt1, *tstop, *t, *tt;
353-
WORD *oldworkpointer = AT.WorkPointer;
354-
WORD option1 = 0, option2 = 0, setoption = -1;
355-
int retval;
356-
/*
357-
358-
We have to go through the testing procedure again, because there could
359-
be more than one topologies_ function and not all have to be expandable.
360-
*/
361-
tstop = term+*term; tstop -= ABS(tstop[-1]);
362-
tt = term+1;
363-
while ( tt < tstop ) {
364-
t = tt; tt = t+t[1];
365-
if ( *t != TOPOLOGIES ) continue;
366-
tt = t + t[1]; t1 = t + FUNHEAD;
367-
if ( t1+10 > tt || *t1 != -SNUMBER || t1[1] < 0 || /* loops */
368-
t1[2] != -SNUMBER || ( t1[3] < 0 && t1[3] != -2 ) ||/* legs */
369-
t1[4] != -SETSET || Sets[t1[5]].type != CNUMBER || /* set vertices */
370-
t1[6] != -SETSET || Sets[t1[7]].type != CVECTOR || /* outvectors */
371-
t1[8] != -SETSET || Sets[t1[9]].type != CVECTOR ) continue;
372-
tt1 = t1 + 10;
373-
if ( tt1+2 <= tt && tt1[0] == -SETSET ) {
374-
if ( Sets[t1[5]].last-Sets[t1[5]].first !=
375-
Sets[tt1[1]].last-Sets[tt1[1]].first ) continue;
376-
setoption = tt1[1]; tt1 += 2;
377-
}
378-
if ( tt1+2 <= tt && tt1[0] == -SNUMBER ) { option1 = tt1[1]; tt1 += 2; }
379-
if ( tt1+2 <= tt && tt1[0] == -SNUMBER ) { option2 = tt1[1]; tt1 += 2; }
380-
AT.setinterntopo = t1[9];
381-
AT.setexterntopo = t1[7];
382-
AT.TopologiesTerm = term;
383-
AT.TopologiesStart = t;
384-
AT.TopologiesLevel = level;
385-
AT.TopologiesOptions[0] = option1;
386-
AT.TopologiesOptions[1] = option2;
387-
retval = GenerateTopologies(BHEAD t1[1],t1[3],t1[5],setoption);
388-
AT.WorkPointer = oldworkpointer;
389-
return(retval);
390-
}
391-
MLOCK(ErrorMessageLock);
392-
MesPrint("Internal error: topologies_ function not encountered.");
393-
MUNLOCK(ErrorMessageLock);
394-
return(-1);
395-
396-
}
397-
398-
#endif
399-
400-
/*
401-
#] GenTopologies :
402331
#[ DoTopologyCanonicalize :
403332
404333
term: The term

sources/diawrap.cc

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,114 +1030,4 @@ int processVertex(TOPOTYPE *TopoInf, int pointsremaining, int level)
10301030
}
10311031

10321032
// #] processVertex :
1033-
// #[ GenTopologies :
1034-
1035-
#define TOPO_MAXVERT 10
1036-
1037-
int GenTopologies(PHEAD WORD *term, WORD level)
1038-
{
1039-
Options *opt = new Options;
1040-
int nlegs, nloops, i, identical;
1041-
TERMINFO info;
1042-
WORD *t, *t1, *tstop;
1043-
TOPOTYPE TopoInf;
1044-
SETS s;
1045-
//
1046-
info.term = term;
1047-
info.level = level;
1048-
info.diaoffset = AR.funoffset;
1049-
info.flags = 0;
1050-
1051-
t = term + info.diaoffset; // the function
1052-
t1 = t + FUNHEAD; // its arguments
1053-
tstop = t + t[1];
1054-
1055-
info.externalset = t1[7];
1056-
info.internalset = t1[9];
1057-
1058-
s = &(Sets[t1[5]]);
1059-
TopoInf.nvert = s->last - s->first;
1060-
TopoInf.vert = &(SetElements[s->first]);
1061-
1062-
nloops = t1[1];
1063-
nlegs = t1[3];
1064-
1065-
info.numextern = nlegs;
1066-
1067-
for ( i = 0; i <= MAXLEGS; i++ ) { TopoInf.cmind[i] = TopoInf.cmaxd[i] = 0; }
1068-
1069-
t1 += 10;
1070-
if ( t1 < tstop && t1[0] == -SETSET ) {
1071-
TopoInf.vertmax = &(SetElements[Sets[t1[1]].first]);
1072-
t1 += 2;
1073-
}
1074-
else TopoInf.vertmax = NULL;
1075-
1076-
info.flags |= TOPOLOGIESONLY; // this is the topologies_ function after all.
1077-
if ( t1 < tstop && t1[0] == -SNUMBER ) {
1078-
if ( ( t1[1] & WITHOUTNODES ) == WITHOUTNODES ) info.flags |= WITHOUTNODES;
1079-
if ( ( t1[1] & WITHEDGES ) == WITHEDGES ) info.flags |= WITHEDGES;
1080-
if ( ( t1[1] & WITHBLOCKS ) == WITHBLOCKS ) info.flags |= WITHBLOCKS;
1081-
if ( ( t1[1] & WITHONEPISETS ) == WITHONEPISETS ) info.flags |= WITHONEPISETS;
1082-
opt->values[GRCC_OPT_1PI] = ( t1[1] & ONEPARTI ) == ONEPARTI;
1083-
// opt->values[GRCC_OPT_NoTadpole] = ( t1[1] & NOTADPOLE ) == NOTADPOLE;
1084-
opt->values[GRCC_OPT_NoTadpole] = ( t1[1] & NOSNAIL ) == NOSNAIL;
1085-
opt->values[GRCC_OPT_No1PtBlock] = ( t1[1] & NOTADPOLE ) == NOTADPOLE;
1086-
// opt->values[GRCC_OPT_NoExtSelf] = ( t1[1] & NOEXTSELF ) == NOEXTSELF;
1087-
1088-
// if ( ( t1[1] & WITHINSERTIONS ) == WITHINSERTIONS ) {
1089-
// opt->values[GRCC_OPT_No2PtL1PI] = True;
1090-
// opt->values[GRCC_OPT_NoAdj2PtV] = True;
1091-
// opt->values[GRCC_OPT_No2PtL1PI] = True;
1092-
// }
1093-
opt->values[GRCC_OPT_SymmInitial] = ( t1[1] & WITHSYMMETRIZEI ) == WITHSYMMETRIZEI;
1094-
opt->values[GRCC_OPT_SymmFinal] = ( t1[1] & WITHSYMMETRIZEF ) == WITHSYMMETRIZEF;
1095-
}
1096-
1097-
info.numdia = 0;
1098-
info.numtopo = 1;
1099-
1100-
opt->setOutAG(ProcessDiagram, &info);
1101-
opt->setOutMG(ProcessTopology, &info);
1102-
//
1103-
// Now we should sum over all possible vertices and run MGraph for
1104-
// each combination. This is done by recursion in the processVertex routine
1105-
// First load up the relevant arrays.
1106-
//
1107-
1108-
// First the external nodes.
1109-
1110-
if ( nlegs == -2 ) {
1111-
nlegs = 2;
1112-
identical = 1;
1113-
}
1114-
for ( i = 0; i < nlegs; i++ ) {
1115-
TopoInf.cldeg[i] = 1; TopoInf.clnum[i] = 1; TopoInf.clext[i] = -1;
1116-
}
1117-
int points = 2*nloops-2+nlegs;
1118-
1119-
if ( identical == 1 ) { /* Only propagator topologies..... */
1120-
nlegs = 1;
1121-
TopoInf.clnum[0] = 2;
1122-
}
1123-
TopoInf.ncl = nlegs;
1124-
TopoInf.opt = opt;
1125-
1126-
if ( points >= MAXPOINTS ) {
1127-
MLOCK(ErrorMessageLock);
1128-
MesPrint("GenTopologies: %d loops and %d legs considered excessive",nloops,nlegs);
1129-
MUNLOCK(ErrorMessageLock);
1130-
Terminate(-1);
1131-
}
1132-
if ( processVertex(&TopoInf,points,0) != 0 ) {
1133-
MLOCK(ErrorMessageLock);
1134-
MesPrint("Called from GenTopologies with %d loops and %d legs",nloops,nlegs);
1135-
MUNLOCK(ErrorMessageLock);
1136-
Terminate(-1);
1137-
}
1138-
delete opt;
1139-
return(0);
1140-
}
1141-
1142-
// #] GenTopologies :
11431033

0 commit comments

Comments
 (0)