File: grccparam.h

package info (click to toggle)
form 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 8,312 kB
  • sloc: ansic: 110,546; cpp: 20,395; sh: 5,874; makefile: 545
file content (264 lines) | stat: -rw-r--r-- 8,766 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
#ifdef GRCC_PARAM_H
#else
#define GRCC_PARAM_H

/* #[ License : */
/*
 *   Copyright (C) 2023-2026 T. Kaneko
 *   When using this file you are requested to refer to the publication
 *   Comput.Phys.Commun. 92 (1995) 127-152
 *
 *   This file is part of FORM.
 *
 *   FORM is free software: you can redistribute it and/or modify it under the
 *   terms of the GNU General Public License as published by the Free Software
 *   Foundation, either version 3 of the License, or (at your option) any later
 *   version.
 *
 *   FORM is distributed in the hope that it will be useful, but WITHOUT ANY
 *   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 *   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 *   details.
 *
 *   You should have received a copy of the GNU General Public License along
 *   with FORM.  If not, see <http://www.gnu.org/licenses/>.
 */
/* #] License : */

/*==============================================================
 * Parameters
 */
/*
#define GRCC_NAMESPACE
*/

#define GRCC_MAXNCPLG         4
#define GRCC_MAXLEGS         10
#define GRCC_MAXMPARTICLES   50
#define GRCC_MAXMINTERACT   500
#define GRCC_MAXSUBPROCS    500
#define GRCC_MAXNODES        20
#define GRCC_MAXEDGES       100
#define GRCC_MAXNSTACK       50
#define GRCC_MAXESTACK       50
#define GRCC_MAXGROUP      1000
#define GRCC_MAXPSLIST      500

#define GRCC_MAXMPARTICLES2  (2*GRCC_MAXMPARTICLES-1)
#define GRCC_MAXFLINES       GRCC_MAXEDGES

#define GRCC_FRACERROR       (1.0e-10)

/* Standard and error message destination */
#define GRCC_Stdout          stdout
#define GRCC_Stderr          stdout

#ifndef NOFORM
    #define GRCC_ABORT()      Terminate(-1);
#else
    #define GRCC_ABORT()      exit(1)
#endif

/*---------------------------------------------------------------
 * Constants
 */

/* model definition */
#define GRCC_DEFBYNAME   1    /* define interactions by particle name */
#define GRCC_DEFBYCODE   2    /* define interactions by particle code */

/* types of particles */
#define GRCC_PT_Undef      0
#define GRCC_PT_Scalar     1
#define GRCC_PT_Dirac      2
#define GRCC_PT_Majorana   3
#define GRCC_PT_Vector     4
#define GRCC_PT_Ghost      5
#define GRCC_PT_Size       6

#define GRCC_PTS_Undef      "undef"
#define GRCC_PTS_Scalar     "scalar"
#define GRCC_PTS_Dirac      "dirac"
#define GRCC_PTS_Majorana   "majorana"
#define GRCC_PTS_Vector     "vector"
#define GRCC_PTS_Ghost      "ghost"

#define GRCC_PT_Table  { GRCC_PTS_Undef, GRCC_PTS_Scalar, GRCC_PTS_Dirac, GRCC_PTS_Majorana, GRCC_PTS_Vector, GRCC_PTS_Ghost}

#define GRCC_PT_GTable { "Undef", "Scalar", "Fermion", "Majorana", "Vector", "Ghost"}

/* for mgraph generation */
#define GRCC_AT_Vertex     0
#define GRCC_AT_External  -1
#define GRCC_AT_Initial   -2
#define GRCC_AT_Final     -3

#define GRCC_AT_NdStr(x)   ((x)>=GRCC_AT_Vertex   ?"Vertex":       \
                           ((x)==GRCC_AT_External ?"External":     \
                           ((x)==GRCC_AT_Final    ?"Final":        \
                           ((x)==GRCC_AT_Initial  ?"Initial":"Undef"))))

/* graph generation */
#define GRCC_MGraph   0       /* mgraph (topology) generation */
#define GRCC_AGraph   1       /* agraph generation */

/* options for graph greneration */
#define GRCC_OPT_Step            0
#define GRCC_OPT_Outgrf          1
#define GRCC_OPT_Outgrp          2
#define GRCC_OPT_1PI             3
#define GRCC_OPT_NoSelfLoop      4
#define GRCC_OPT_NoTadpole       5
#define GRCC_OPT_No1PtBlock      6
#define GRCC_OPT_No2PtL1PI       7
#define GRCC_OPT_NoExtSelf       8
#define GRCC_OPT_NoAdj2PtV       9
#define GRCC_OPT_Block          10
#define GRCC_OPT_NoMultiEdge    11
#define GRCC_OPT_SymmInitial    12
#define GRCC_OPT_SymmFinal      13
#define GRCC_OPT_Size           14

typedef unsigned long ULong;

typedef struct {
    const char *name;
    const char *mean;
    int         defaultv;
    int         DUMMYPADDING;
} OptDef;

typedef struct {
    const char *name;
    const char *cname;
    const char *mean;
} OptQGDef;

typedef struct {
    const char *name;
    int         index;
    int         sign; 
} OptQGRef;

/*---------------------------------------------------------------
 * QGRAF options
 */
#define GRCC_QGRAF_OPT_ONEPI       0
#define GRCC_QGRAF_OPT_ONSHELL     1
#define GRCC_QGRAF_OPT_NOSIGMA     2
#define GRCC_QGRAF_OPT_NOSNAIL     3
#define GRCC_QGRAF_OPT_NOTADPOLE   4
#define GRCC_QGRAF_OPT_SIMPLE      5
#define GRCC_QGRAF_OPT_BIPART      6
#define GRCC_QGRAF_OPT_CYCLI       7
#define GRCC_QGRAF_OPT_FLOOP       8
//TODO what does this do? Does it work?
//#define GRCC_QGRAF_OPT_TOPOL       9

#ifdef GRCC_QGRAF_OPT_TOPOL
#define GRCC_QGRAF_OPT_Size       10
#else
#define GRCC_QGRAF_OPT_Size        9
#endif

/*---------------------------------------------------------------
 * Conversion of 
 *     eind : index (ed) of EGraph.edges[ed]
 *     sind : value (v)  of EGraph.nodes[nd]->edges[j])
 */
#define   I2Vedge(eind, sign)    (((sign<=0)?(-1):(1))*((eind)+1))
#define   V2Iedge(sind)          (abs(sind)-1)
#define   V2Ileg(sind)           ((sind)<0 ? 0 : 1)
/*---------------------------------------------------------------
 * data types for model definition
 */
typedef struct {
    const char *name;               /* name of the model */
          int   defpart;            /* particle is defined by name or code */
                                    /* GRCC_DEFBYNAME or GRCC_DEFBYCODE */
          int   ncouple;            /* No. of coupling constants */
    const char *cnamlist[GRCC_MAXNCPLG]; /* Names of coupling constants */
} MInput;

typedef struct {
    const char *name;               /* name of particle */
    const char *aname;              /* name of anti-particle */
          int   pcode;              /* code of particle */
          int   acode;              /* code of anti-particle */
    const char *ptypen;             /* type : 'GRCC_PTS_Scalar' etc */
          int   ptypec;             /* type : 'GRCC_PT_Scalar' etc */
          int   extonly;            /* only as external particle */
} PInput;

typedef struct {
    const char *name;                 /* name of interaction */
          int   icode;                /* code of interaction */
          int   nplistn;              /* the number of legs */
    const char *plistn[GRCC_MAXLEGS];    /* list of particle names */
          int   plistc[GRCC_MAXLEGS];    /* list of particle codes */
          int   cvallist[GRCC_MAXNCPLG]; /* coupling constants */
} IInput;

/*---------------------------------------------------------------
 * data type for node class input
 */
typedef struct {
    /* used as input to MGraph() and SProcess() */
    int cldeg;  
    int clnum;
    int cltyp;
    int cmind;
    int cmaxd;

    /* used as input to SProcess() */
    int ptcl;
    int cple;
} NCInput;

/*---------------------------------------------------------------
 * data types for process definition
 */
typedef struct {
    long          ninitl;              /* the number of initial particles */
    const char   *initln[GRCC_MAXNODES];    /* list of initial particles (name) */
    int           initlc[GRCC_MAXNODES];    /* list of final particles (code) */
    long          nfinal;              /* the number of final particles */
    const char   *finaln[GRCC_MAXNODES];    /* list of final particles (name) */
    int           finalc[GRCC_MAXNODES];    /* list of final particles (code) */
    int           coupl[GRCC_MAXNCPLG];     /* list of orders of c. consts */
} FGInput;

/* class of node : input for SProcess */
typedef struct {
    int         cdeg;                 /* degree of each node */
    int         ctyp;                 /* type : GRCC_AT_xxx */
    int         cnum;                 /* the number of nodes in the class */
    int         cple;                 /* total order of c.c. of each node */
                                      /* = 0 for external particle */
    const char *pname;                /* particle name defined in the model */
                                      /* = NULL for vertex */
    long        pcode;                /* particle code defined in the model */
                                      /* = 0 for vertex */
                                      /* long = int + padding */
} PGInput;

/*---------------------------------------------------------------
 * minimum input data to EGraph
 */
typedef struct {
    int    extloop;     /* external/loop */
    int    intrct;      /* particl/interaction */
} DNode;

typedef int  DEdge[2];  /* {node0, node1} */

typedef struct {
    int    nnodes;
    int    nedges;
    DNode *nodes;
    DEdge *edges;
} DGraph;

/*---------------------------------------------------------------
 */
#endif