~maddevelopers/mg5amcnlo/2.6.5_ewa

262.1.134 by olivier Mattelaer
update Date/time before freeze out
1
      MODULE POLYNOMIAL_CONSTANTS
2
      IMPLICIT NONE
3
      INCLUDE 'coef_specs.inc'
4
      INCLUDE 'loop_max_coefs.inc'
5
6
C     Map associating a rank to each coefficient position
7
      INTEGER COEFTORANK_MAP(0:LOOPMAXCOEFS-1)
8
      DATA COEFTORANK_MAP(0:0)/1*0/
9
      DATA COEFTORANK_MAP(1:4)/4*1/
10
      DATA COEFTORANK_MAP(5:14)/10*2/
11
12
C     Map defining the number of coefficients for a symmetric tensor
13
C      of a given rank
14
      INTEGER NCOEF_R(0:2)
15
      DATA NCOEF_R/1,5,15/
16
17
C     Map defining the coef position resulting from the multiplication
18
C      of two lower rank coefs.
19
      INTEGER COMB_COEF_POS(0:LOOPMAXCOEFS-1,0:4)
20
      DATA COMB_COEF_POS(  0,  0:  4) /  0,  1,  2,  3,  4/
21
      DATA COMB_COEF_POS(  1,  0:  4) /  1,  5,  6,  8, 11/
22
      DATA COMB_COEF_POS(  2,  0:  4) /  2,  6,  7,  9, 12/
23
      DATA COMB_COEF_POS(  3,  0:  4) /  3,  8,  9, 10, 13/
24
      DATA COMB_COEF_POS(  4,  0:  4) /  4, 11, 12, 13, 14/
25
      DATA COMB_COEF_POS(  5,  0:  4) /  5, 15, 16, 19, 25/
26
      DATA COMB_COEF_POS(  6,  0:  4) /  6, 16, 17, 20, 26/
27
      DATA COMB_COEF_POS(  7,  0:  4) /  7, 17, 18, 21, 27/
28
      DATA COMB_COEF_POS(  8,  0:  4) /  8, 19, 20, 22, 28/
29
      DATA COMB_COEF_POS(  9,  0:  4) /  9, 20, 21, 23, 29/
30
      DATA COMB_COEF_POS( 10,  0:  4) / 10, 22, 23, 24, 30/
31
      DATA COMB_COEF_POS( 11,  0:  4) / 11, 25, 26, 28, 31/
32
      DATA COMB_COEF_POS( 12,  0:  4) / 12, 26, 27, 29, 32/
33
      DATA COMB_COEF_POS( 13,  0:  4) / 13, 28, 29, 30, 33/
34
      DATA COMB_COEF_POS( 14,  0:  4) / 14, 31, 32, 33, 34/
35
36
      END MODULE POLYNOMIAL_CONSTANTS
37
38
262.6.3 by Marco Zaro
added unit tests
39
C     THE SUBROUTINE TO CREATE THE COEFFICIENTS FROM LAST LOOP WF AND 
40
C     MULTIPLY BY THE BORN
41
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
42
      SUBROUTINE CREATE_LOOP_COEFS(LOOP_WF,RANK,LCUT_SIZE
43
     $ ,LOOP_GROUP_NUMBER,SYMFACT,MULTIPLIER,COLOR_ID,HELCONFIG)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
44
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
45
      IMPLICIT NONE
46
C     
47
C     CONSTANTS 
48
C     
49
      INTEGER NBORNAMPS
50
      PARAMETER (NBORNAMPS=1)
51
      REAL*8 ZERO,ONE
52
      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
53
      COMPLEX*16 IMAG1
54
      PARAMETER (IMAG1=(ZERO,ONE))
55
      COMPLEX*16 CMPLX_ZERO
56
      PARAMETER (CMPLX_ZERO=(ZERO,ZERO))
57
      INTEGER    NCOLORROWS
58
      PARAMETER (NCOLORROWS=2)
59
      INTEGER    NLOOPGROUPS
60
      PARAMETER (NLOOPGROUPS=1)
61
      INTEGER    NCOMB
62
      PARAMETER (NCOMB=12)
63
C     These are constants related to the split orders
64
      INTEGER    NSO, NSQUAREDSO, NAMPSO
65
      PARAMETER (NSO=1, NSQUAREDSO=1, NAMPSO=2)
66
C     
67
C     ARGUMENTS 
68
C     
69
      COMPLEX*16 LOOP_WF(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
70
      INTEGER RANK, COLOR_ID, SYMFACT, MULTIPLIER, LCUT_SIZE,
71
     $  HELCONFIG, LOOP_GROUP_NUMBER
72
C     
73
C     LOCAL VARIABLES 
74
C     
75
      COMPLEX*16 CFTOT
76
      COMPLEX*16 CONST(NAMPSO)
77
      INTEGER I,J
78
C     
79
C     FUNCTIONS
80
C     
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
81
      INTEGER ML5SOINDEX_FOR_BORN_AMP, ML5SOINDEX_FOR_LOOP_AMP,
82
     $  ML5SQSOINDEX
262.6.3 by Marco Zaro
added unit tests
83
C     
84
C     GLOBAL VARIABLES
85
C     
86
      INTEGER CF_D(NCOLORROWS,NBORNAMPS)
87
      INTEGER CF_N(NCOLORROWS,NBORNAMPS)
88
      COMMON/CF/CF_D,CF_N
89
90
      LOGICAL CHECKPHASE
91
      LOGICAL HELDOUBLECHECKED
92
      COMMON/INIT/CHECKPHASE, HELDOUBLECHECKED
93
94
      INTEGER HELOFFSET
95
      INTEGER GOODHEL(NCOMB)
96
      LOGICAL GOODAMP(NSQUAREDSO,NLOOPGROUPS)
97
      COMMON/FILTERS/GOODAMP,GOODHEL,HELOFFSET
98
99
      COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
100
      COMMON/LCOEFS/LOOPCOEFS
101
102
      INTEGER HELPICKED
103
      COMMON/HELCHOICE/HELPICKED
104
105
      COMPLEX*16 AMP(NBORNAMPS)
106
      COMMON/AMPS/AMP
107
108
      DO I=1,NAMPSO
109
        CONST(I)=CMPLX_ZERO
110
      ENDDO
111
112
      DO I=1,NBORNAMPS
113
        CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO
114
     $   ,KIND=8)
115
        IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1
281.8.58 by olivier-mattelaer
1. Fixing some iotest (changing of the fortranwriter)
116
        CONST(ML5SOINDEX_FOR_BORN_AMP(I))
117
     $   =CONST(ML5SOINDEX_FOR_BORN_AMP(I))+CFTOT*CONJG(AMP(I))
262.6.3 by Marco Zaro
added unit tests
118
      ENDDO
119
120
      DO I=1,NAMPSO
121
        IF (CONST(I).NE.CMPLX_ZERO) THEN
122
          CONST(I)=(CONST(I)*MULTIPLIER)/SYMFACT
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
123
          IF (.NOT.CHECKPHASE.AND.HELDOUBLECHECKED.AND.HELPICKED.EQ.-1)
124
     $      THEN
262.6.3 by Marco Zaro
added unit tests
125
            CONST(I)=CONST(I)*GOODHEL(HELCONFIG)
126
          ENDIF
127
          CALL MERGE_WL(LOOP_WF,RANK,LCUT_SIZE,CONST(I),LOOPCOEFS(0
128
     $     ,ML5SQSOINDEX(I,ML5SOINDEX_FOR_LOOP_AMP(COLOR_ID))
129
     $     ,LOOP_GROUP_NUMBER))
130
        ENDIF
131
      ENDDO
132
133
      END
134
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
135
      SUBROUTINE INVERT_MOMENTA_IN_POLYNOMIAL(NCOEFS,POLYNOMIAL)
136
C     Just a handy subroutine to modify the coefficients for the
137
C     tranformation q_loop -> -q_loop
138
C     It is only used for the NINJA interface
262.1.134 by olivier Mattelaer
update Date/time before freeze out
139
      USE POLYNOMIAL_CONSTANTS
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
140
      IMPLICIT NONE
141
142
      INTEGER I, NCOEFS
143
144
      COMPLEX*16 POLYNOMIAL(0:NCOEFS-1)
145
146
      DO I=0,NCOEFS-1
147
        IF (MOD(COEFTORANK_MAP(I),2).EQ.1) THEN
148
          POLYNOMIAL(I)=-POLYNOMIAL(I)
149
        ENDIF
150
      ENDDO
151
152
      END
153
262.1.134 by olivier Mattelaer
update Date/time before freeze out
154
C     Now the routines to update the wavefunctions
155
156
262.6.3 by Marco Zaro
added unit tests
157
158
C     THE SUBROUTINE TO CREATE THE COEFFICIENTS FROM LAST LOOP WF AND 
159
C     MULTIPLY BY THE BORN
160
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
161
      SUBROUTINE MP_CREATE_LOOP_COEFS(LOOP_WF,RANK,LCUT_SIZE
162
     $ ,LOOP_GROUP_NUMBER,SYMFACT,MULTIPLIER,COLOR_ID,HELCONFIG)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
163
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
164
      IMPLICIT NONE
165
C     
166
C     CONSTANTS 
167
C     
168
      INTEGER NBORNAMPS
169
      PARAMETER (NBORNAMPS=1)
170
      REAL*16 ZERO,ONE
171
      PARAMETER (ZERO=0.0E0_16,ONE=1.0E0_16)
172
      COMPLEX*32 IMAG1
173
      PARAMETER (IMAG1=(ZERO,ONE))
174
      COMPLEX*32 CMPLX_ZERO
175
      PARAMETER (CMPLX_ZERO=(ZERO,ZERO))
176
      INTEGER    NCOLORROWS
177
      PARAMETER (NCOLORROWS=2)
178
      INTEGER    NLOOPGROUPS
179
      PARAMETER (NLOOPGROUPS=1)
180
      INTEGER    NCOMB
181
      PARAMETER (NCOMB=12)
182
C     These are constants related to the split orders
183
      INTEGER    NSO, NSQUAREDSO, NAMPSO
184
      PARAMETER (NSO=1, NSQUAREDSO=1, NAMPSO=2)
185
C     
186
C     ARGUMENTS 
187
C     
188
      COMPLEX*32 LOOP_WF(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
189
      INTEGER RANK, COLOR_ID, SYMFACT, MULTIPLIER, LCUT_SIZE,
190
     $  HELCONFIG, LOOP_GROUP_NUMBER
191
C     
192
C     LOCAL VARIABLES 
193
C     
194
      COMPLEX*32 CFTOT
195
      COMPLEX*32 CONST(NAMPSO)
196
      INTEGER I,J
197
C     
198
C     FUNCTIONS
199
C     
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
200
      INTEGER ML5SOINDEX_FOR_BORN_AMP, ML5SOINDEX_FOR_LOOP_AMP,
201
     $  ML5SQSOINDEX
262.6.3 by Marco Zaro
added unit tests
202
C     
203
C     GLOBAL VARIABLES
204
C     
205
      INTEGER CF_D(NCOLORROWS,NBORNAMPS)
206
      INTEGER CF_N(NCOLORROWS,NBORNAMPS)
207
      COMMON/CF/CF_D,CF_N
208
209
      LOGICAL CHECKPHASE
210
      LOGICAL HELDOUBLECHECKED
211
      COMMON/INIT/CHECKPHASE, HELDOUBLECHECKED
212
213
      INTEGER HELOFFSET
214
      INTEGER GOODHEL(NCOMB)
215
      LOGICAL GOODAMP(NSQUAREDSO,NLOOPGROUPS)
216
      COMMON/FILTERS/GOODAMP,GOODHEL,HELOFFSET
217
218
      COMPLEX*32 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
219
      COMMON/MP_LCOEFS/LOOPCOEFS
220
221
      INTEGER HELPICKED
222
      COMMON/HELCHOICE/HELPICKED
223
224
      COMPLEX*32 AMP(NBORNAMPS)
225
      COMMON/MP_AMPS/AMP
226
227
      DO I=1,NAMPSO
228
        CONST(I)=CMPLX_ZERO
229
      ENDDO
230
231
      DO I=1,NBORNAMPS
232
        CFTOT=CMPLX(CF_N(COLOR_ID,I)/(ONE*ABS(CF_D(COLOR_ID,I))),ZERO
233
     $   ,KIND=16)
234
        IF(CF_D(COLOR_ID,I).LT.0) CFTOT=CFTOT*IMAG1
281.8.58 by olivier-mattelaer
1. Fixing some iotest (changing of the fortranwriter)
235
        CONST(ML5SOINDEX_FOR_BORN_AMP(I))
236
     $   =CONST(ML5SOINDEX_FOR_BORN_AMP(I))+CFTOT*CONJG(AMP(I))
262.6.3 by Marco Zaro
added unit tests
237
      ENDDO
238
239
      DO I=1,NAMPSO
240
        IF (CONST(I).NE.CMPLX_ZERO) THEN
241
          CONST(I)=(CONST(I)*MULTIPLIER)/SYMFACT
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
242
          IF (.NOT.CHECKPHASE.AND.HELDOUBLECHECKED.AND.HELPICKED.EQ.-1)
243
     $      THEN
262.6.3 by Marco Zaro
added unit tests
244
            CONST(I)=CONST(I)*GOODHEL(HELCONFIG)
245
          ENDIF
246
          CALL MP_MERGE_WL(LOOP_WF,RANK,LCUT_SIZE,CONST(I),LOOPCOEFS(0
247
     $     ,ML5SQSOINDEX(I,ML5SOINDEX_FOR_LOOP_AMP(COLOR_ID))
248
     $     ,LOOP_GROUP_NUMBER))
249
        ENDIF
250
      ENDDO
251
252
      END
253
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
254
      SUBROUTINE MP_INVERT_MOMENTA_IN_POLYNOMIAL(NCOEFS,POLYNOMIAL)
255
C     Just a handy subroutine to modify the coefficients for the
256
C     tranformation q_loop -> -q_loop
257
C     It is only used for the NINJA interface
262.1.134 by olivier Mattelaer
update Date/time before freeze out
258
      USE POLYNOMIAL_CONSTANTS
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
259
      IMPLICIT NONE
260
261
      INTEGER I, NCOEFS
262
263
      COMPLEX*32 POLYNOMIAL(0:NCOEFS-1)
264
265
      DO I=0,NCOEFS-1
266
        IF (MOD(COEFTORANK_MAP(I),2).EQ.1) THEN
267
          POLYNOMIAL(I)=-POLYNOMIAL(I)
268
        ENDIF
269
      ENDDO
270
271
      END
272
262.1.134 by olivier Mattelaer
update Date/time before freeze out
273
C     Now the routines to update the wavefunctions
274
275
262.6.3 by Marco Zaro
added unit tests
276
277
      SUBROUTINE EVAL_POLY(C,R,Q,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
278
      USE POLYNOMIAL_CONSTANTS
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
279
      COMPLEX*16 C(0:LOOPMAXCOEFS-1)
262.6.3 by Marco Zaro
added unit tests
280
      INTEGER R
281
      COMPLEX*16 Q(0:3)
282
      COMPLEX*16 OUT
283
284
      OUT=C(0)
285
      IF (R.GE.1) THEN
286
        OUT=OUT+C(1)*Q(0)+C(2)*Q(1)+C(3)*Q(2)+C(4)*Q(3)
287
      ENDIF
288
      IF (R.GE.2) THEN
289
        OUT=OUT+C(5)*Q(0)*Q(0)+C(6)*Q(0)*Q(1)+C(7)*Q(1)*Q(1)+C(8)*Q(0)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
290
     $   *Q(2)+C(9)*Q(1)*Q(2)+C(10)*Q(2)*Q(2)+C(11)*Q(0)*Q(3)+C(12)
291
     $   *Q(1)*Q(3)+C(13)*Q(2)*Q(3)+C(14)*Q(3)*Q(3)
262.6.3 by Marco Zaro
added unit tests
292
      ENDIF
293
      END
294
295
      SUBROUTINE MP_EVAL_POLY(C,R,Q,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
296
      USE POLYNOMIAL_CONSTANTS
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
297
      COMPLEX*32 C(0:LOOPMAXCOEFS-1)
262.6.3 by Marco Zaro
added unit tests
298
      INTEGER R
299
      COMPLEX*32 Q(0:3)
300
      COMPLEX*32 OUT
301
302
      OUT=C(0)
303
      IF (R.GE.1) THEN
304
        OUT=OUT+C(1)*Q(0)+C(2)*Q(1)+C(3)*Q(2)+C(4)*Q(3)
305
      ENDIF
306
      IF (R.GE.2) THEN
307
        OUT=OUT+C(5)*Q(0)*Q(0)+C(6)*Q(0)*Q(1)+C(7)*Q(1)*Q(1)+C(8)*Q(0)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
308
     $   *Q(2)+C(9)*Q(1)*Q(2)+C(10)*Q(2)*Q(2)+C(11)*Q(0)*Q(3)+C(12)
309
     $   *Q(1)*Q(3)+C(13)*Q(2)*Q(3)+C(14)*Q(3)*Q(3)
262.6.3 by Marco Zaro
added unit tests
310
      ENDIF
311
      END
312
313
      SUBROUTINE ADD_COEFS(A,RA,B,RB)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
314
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
315
      INTEGER I
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
316
      COMPLEX*16 A(0:LOOPMAXCOEFS-1),B(0:LOOPMAXCOEFS-1)
262.6.3 by Marco Zaro
added unit tests
317
      INTEGER RA,RB
318
319
      DO I=0,NCOEF_R(RB)-1
320
        A(I)=A(I)+B(I)
321
      ENDDO
322
      END
323
324
      SUBROUTINE MP_ADD_COEFS(A,RA,B,RB)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
325
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
326
      INTEGER I
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
327
      COMPLEX*32 A(0:LOOPMAXCOEFS-1),B(0:LOOPMAXCOEFS-1)
262.6.3 by Marco Zaro
added unit tests
328
      INTEGER RA,RB
329
330
      DO I=0,NCOEF_R(RB)-1
331
        A(I)=A(I)+B(I)
332
      ENDDO
333
      END
334
335
      SUBROUTINE MERGE_WL(WL,R,LCUT_SIZE,CONST,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
336
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
337
      INTEGER I,J
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
338
      COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
339
      INTEGER R,LCUT_SIZE
340
      COMPLEX*16 CONST
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
341
      COMPLEX*16 OUT(0:LOOPMAXCOEFS-1)
262.6.3 by Marco Zaro
added unit tests
342
343
      DO I=1,LCUT_SIZE
344
        DO J=0,NCOEF_R(R)-1
345
          OUT(J)=OUT(J)+WL(I,J,I)*CONST
346
        ENDDO
347
      ENDDO
348
      END
349
350
      SUBROUTINE MP_MERGE_WL(WL,R,LCUT_SIZE,CONST,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
351
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
352
      INTEGER I,J
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
353
      COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
354
      INTEGER R,LCUT_SIZE
355
      COMPLEX*32 CONST
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
356
      COMPLEX*32 OUT(0:LOOPMAXCOEFS-1)
262.6.3 by Marco Zaro
added unit tests
357
358
      DO I=1,LCUT_SIZE
359
        DO J=0,NCOEF_R(R)-1
360
          OUT(J)=OUT(J)+WL(I,J,I)*CONST
361
        ENDDO
362
      ENDDO
363
      END
364
365
      SUBROUTINE UPDATE_WL_0_1(A,LCUT_SIZE,B,IN_SIZE,OUT_SIZE,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
366
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
367
      INTEGER I,J,K
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
368
      COMPLEX*16 A(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
369
      COMPLEX*16 B(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
370
      COMPLEX*16 OUT(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
371
      INTEGER LCUT_SIZE,IN_SIZE,OUT_SIZE
372
373
      DO I=1,LCUT_SIZE
374
        DO J=1,OUT_SIZE
375
          DO K=0,4
376
            OUT(J,K,I)=(0.0D0,0.0D0)
377
          ENDDO
378
          DO K=1,IN_SIZE
379
            OUT(J,0,I)=OUT(J,0,I)+A(K,0,I)*B(J,0,K)
380
            OUT(J,1,I)=OUT(J,1,I)+A(K,0,I)*B(J,1,K)
381
            OUT(J,2,I)=OUT(J,2,I)+A(K,0,I)*B(J,2,K)
382
            OUT(J,3,I)=OUT(J,3,I)+A(K,0,I)*B(J,3,K)
383
            OUT(J,4,I)=OUT(J,4,I)+A(K,0,I)*B(J,4,K)
384
          ENDDO
385
        ENDDO
386
      ENDDO
387
      END
388
389
      SUBROUTINE MP_UPDATE_WL_0_1(A,LCUT_SIZE,B,IN_SIZE,OUT_SIZE,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
390
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
391
      INTEGER I,J,K
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
392
      COMPLEX*32 A(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
393
      COMPLEX*32 B(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
394
      COMPLEX*32 OUT(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
395
      INTEGER LCUT_SIZE,IN_SIZE,OUT_SIZE
396
397
      DO I=1,LCUT_SIZE
398
        DO J=1,OUT_SIZE
399
          DO K=0,4
400
            OUT(J,K,I)=CMPLX(0.0E0_16,0.0E0_16,KIND=16)
401
          ENDDO
402
          DO K=1,IN_SIZE
403
            OUT(J,0,I)=OUT(J,0,I)+A(K,0,I)*B(J,0,K)
404
            OUT(J,1,I)=OUT(J,1,I)+A(K,0,I)*B(J,1,K)
405
            OUT(J,2,I)=OUT(J,2,I)+A(K,0,I)*B(J,2,K)
406
            OUT(J,3,I)=OUT(J,3,I)+A(K,0,I)*B(J,3,K)
407
            OUT(J,4,I)=OUT(J,4,I)+A(K,0,I)*B(J,4,K)
408
          ENDDO
409
        ENDDO
410
      ENDDO
411
      END
412
413
      SUBROUTINE UPDATE_WL_0_0(A,LCUT_SIZE,B,IN_SIZE,OUT_SIZE,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
414
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
415
      INTEGER I,J,K
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
416
      COMPLEX*16 A(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
417
      COMPLEX*16 B(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
418
      COMPLEX*16 OUT(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
419
      INTEGER LCUT_SIZE,IN_SIZE,OUT_SIZE
420
421
      DO I=1,LCUT_SIZE
422
        DO J=1,OUT_SIZE
423
          DO K=0,0
424
            OUT(J,K,I)=(0.0D0,0.0D0)
425
          ENDDO
426
          DO K=1,IN_SIZE
427
            OUT(J,0,I)=OUT(J,0,I)+A(K,0,I)*B(J,0,K)
428
          ENDDO
429
        ENDDO
430
      ENDDO
431
      END
432
433
      SUBROUTINE MP_UPDATE_WL_0_0(A,LCUT_SIZE,B,IN_SIZE,OUT_SIZE,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
434
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
435
      INTEGER I,J,K
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
436
      COMPLEX*32 A(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
437
      COMPLEX*32 B(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
438
      COMPLEX*32 OUT(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
439
      INTEGER LCUT_SIZE,IN_SIZE,OUT_SIZE
440
441
      DO I=1,LCUT_SIZE
442
        DO J=1,OUT_SIZE
443
          DO K=0,0
444
            OUT(J,K,I)=CMPLX(0.0E0_16,0.0E0_16,KIND=16)
445
          ENDDO
446
          DO K=1,IN_SIZE
447
            OUT(J,0,I)=OUT(J,0,I)+A(K,0,I)*B(J,0,K)
448
          ENDDO
449
        ENDDO
450
      ENDDO
451
      END
452
453
      SUBROUTINE UPDATE_WL_1_1(A,LCUT_SIZE,B,IN_SIZE,OUT_SIZE,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
454
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
455
      INTEGER I,J,K
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
456
      COMPLEX*16 A(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
457
      COMPLEX*16 B(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
458
      COMPLEX*16 OUT(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
459
      INTEGER LCUT_SIZE,IN_SIZE,OUT_SIZE
460
461
      DO I=1,LCUT_SIZE
462
        DO J=1,OUT_SIZE
463
          DO K=0,14
464
            OUT(J,K,I)=(0.0D0,0.0D0)
465
          ENDDO
466
          DO K=1,IN_SIZE
467
            OUT(J,0,I)=OUT(J,0,I)+A(K,0,I)*B(J,0,K)
468
            OUT(J,1,I)=OUT(J,1,I)+A(K,0,I)*B(J,1,K)+A(K,1,I)*B(J,0,K)
469
            OUT(J,2,I)=OUT(J,2,I)+A(K,0,I)*B(J,2,K)+A(K,2,I)*B(J,0,K)
470
            OUT(J,3,I)=OUT(J,3,I)+A(K,0,I)*B(J,3,K)+A(K,3,I)*B(J,0,K)
471
            OUT(J,4,I)=OUT(J,4,I)+A(K,0,I)*B(J,4,K)+A(K,4,I)*B(J,0,K)
472
            OUT(J,5,I)=OUT(J,5,I)+A(K,1,I)*B(J,1,K)
473
            OUT(J,6,I)=OUT(J,6,I)+A(K,1,I)*B(J,2,K)+A(K,2,I)*B(J,1,K)
474
            OUT(J,7,I)=OUT(J,7,I)+A(K,2,I)*B(J,2,K)
475
            OUT(J,8,I)=OUT(J,8,I)+A(K,1,I)*B(J,3,K)+A(K,3,I)*B(J,1,K)
476
            OUT(J,9,I)=OUT(J,9,I)+A(K,2,I)*B(J,3,K)+A(K,3,I)*B(J,2,K)
477
            OUT(J,10,I)=OUT(J,10,I)+A(K,3,I)*B(J,3,K)
478
            OUT(J,11,I)=OUT(J,11,I)+A(K,1,I)*B(J,4,K)+A(K,4,I)*B(J,1,K)
479
            OUT(J,12,I)=OUT(J,12,I)+A(K,2,I)*B(J,4,K)+A(K,4,I)*B(J,2,K)
480
            OUT(J,13,I)=OUT(J,13,I)+A(K,3,I)*B(J,4,K)+A(K,4,I)*B(J,3,K)
481
            OUT(J,14,I)=OUT(J,14,I)+A(K,4,I)*B(J,4,K)
482
          ENDDO
483
        ENDDO
484
      ENDDO
485
      END
486
487
      SUBROUTINE MP_UPDATE_WL_1_1(A,LCUT_SIZE,B,IN_SIZE,OUT_SIZE,OUT)
262.1.134 by olivier Mattelaer
update Date/time before freeze out
488
      USE POLYNOMIAL_CONSTANTS
262.6.3 by Marco Zaro
added unit tests
489
      INTEGER I,J,K
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
490
      COMPLEX*32 A(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
491
      COMPLEX*32 B(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
262.1.120 by olivier Mattelaer
update IOTest and fix a problem with reweighting of LO sample by some loop related quantity
492
      COMPLEX*32 OUT(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE)
262.6.3 by Marco Zaro
added unit tests
493
      INTEGER LCUT_SIZE,IN_SIZE,OUT_SIZE
494
495
      DO I=1,LCUT_SIZE
496
        DO J=1,OUT_SIZE
497
          DO K=0,14
498
            OUT(J,K,I)=CMPLX(0.0E0_16,0.0E0_16,KIND=16)
499
          ENDDO
500
          DO K=1,IN_SIZE
501
            OUT(J,0,I)=OUT(J,0,I)+A(K,0,I)*B(J,0,K)
502
            OUT(J,1,I)=OUT(J,1,I)+A(K,0,I)*B(J,1,K)+A(K,1,I)*B(J,0,K)
503
            OUT(J,2,I)=OUT(J,2,I)+A(K,0,I)*B(J,2,K)+A(K,2,I)*B(J,0,K)
504
            OUT(J,3,I)=OUT(J,3,I)+A(K,0,I)*B(J,3,K)+A(K,3,I)*B(J,0,K)
505
            OUT(J,4,I)=OUT(J,4,I)+A(K,0,I)*B(J,4,K)+A(K,4,I)*B(J,0,K)
506
            OUT(J,5,I)=OUT(J,5,I)+A(K,1,I)*B(J,1,K)
507
            OUT(J,6,I)=OUT(J,6,I)+A(K,1,I)*B(J,2,K)+A(K,2,I)*B(J,1,K)
508
            OUT(J,7,I)=OUT(J,7,I)+A(K,2,I)*B(J,2,K)
509
            OUT(J,8,I)=OUT(J,8,I)+A(K,1,I)*B(J,3,K)+A(K,3,I)*B(J,1,K)
510
            OUT(J,9,I)=OUT(J,9,I)+A(K,2,I)*B(J,3,K)+A(K,3,I)*B(J,2,K)
511
            OUT(J,10,I)=OUT(J,10,I)+A(K,3,I)*B(J,3,K)
512
            OUT(J,11,I)=OUT(J,11,I)+A(K,1,I)*B(J,4,K)+A(K,4,I)*B(J,1,K)
513
            OUT(J,12,I)=OUT(J,12,I)+A(K,2,I)*B(J,4,K)+A(K,4,I)*B(J,2,K)
514
            OUT(J,13,I)=OUT(J,13,I)+A(K,3,I)*B(J,4,K)+A(K,4,I)*B(J,3,K)
515
            OUT(J,14,I)=OUT(J,14,I)+A(K,4,I)*B(J,4,K)
516
          ENDDO
517
        ENDDO
518
      ENDDO
519
      END