-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext.h
108 lines (104 loc) · 3.13 KB
/
ext.h
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
#ifndef __ext__
#define __ext__
#include "func.h"
extern real distancetable[MAXPARTICLENUM][MAXPARTICLENUM][MAXN];
extern real dilatedistance;
extern real tempd;
extern int permutestatus;
extern real T;
extern int BLOCKNUM;
extern int Dimension;
extern int ParticleNumber;
extern int LEVYLENGTH;
extern int LOGHALFLEVYLENGTH;
extern int LOGHALFPERMUTELENGTH;
extern int LEVYPARTICLENUM;
extern int N;
extern int PREEQUIL;
extern int COL;
extern int maxT;
extern int LOOP;
extern int sumcurrent[SUMSPECIES];
extern real store[SUMSPECIES][MAXLEVEL];
extern real newx[MAXPARTICLENUM][MAXDIMEN];
extern int position[MAXPARTICLENUM];
extern int particle[MAXPARTICLENUM];
extern real levytrial[MAXLEVYPARTICLENUM][MAXLEVYLENGTH+1][MAXDIMEN];
extern Ran * myran;
extern long randstatic;
extern int cor[MAXBLOCKNUM];
extern real randn[MAXN+2];
extern real epsilon;
extern real halfepsilon;
extern real epsilon2;
extern real sinhepsilon;
extern real coshepsilon;
extern real invsinhepsilon;
extern real coshvsinhepsilon;
extern real x[MAXPARTICLENUM][MAXN][MAXDIMEN];
//store dv for fourth order
extern real dv[MAXPARTICLENUM][MAXN][MAXDIMEN];
extern real ndv[MAXPARTICLENUM][MAXN][MAXDIMEN];
extern real xcopy[MAXPARTICLENUM][MAXN][MAXDIMEN];
extern real beta;
extern int initialtimeslice;
extern int finaltimeslice;
extern int cyclelength;
extern int cycleremainlength;
extern int check;//1 indicates wiggle move wraps around the path;
extern int cycle[MAXPARTICLENUM+1];
extern int cycleremain[MAXPARTICLENUM];
extern real invepsilon;
extern real invepsilon2;
extern int identical[MAXPARTICLENUM][MAXPARTICLENUM+1];
extern int noidentical[MAXPARTICLENUM][MAXPARTICLENUM+1];
extern int *identity;
/*Start Estimator Declare*/
extern int EstimatorNum;
extern Estimator *estimator[SUMSPECIES];
/*******levy flight paramters****/
extern int (*samplingmethod) (real x[MAXPARTICLENUM][MAXN][MAXDIMEN]);
extern int (*centerofmasssamplingmethod) (real x[MAXPARTICLENUM][MAXN][MAXDIMEN]);
extern real sigmatable[100];
extern real coshtable[100];
extern int numprocs, rank;
extern real etemp;
extern real PREFACTOR;
extern int energyonlyflag;
extern int dilationflag;
extern real dilationwidth;
extern real dilationwidthangle;
extern real spreadtable[MAXLEVYLENGTH+1];
extern real squarespreadtable[MAXLEVYLENGTH+1];
extern real endweight[MAXLEVYLENGTH+1];
inline void SWAP(real &a, real &b) {
real tempint;tempint=a;a=b;b=tempint;
}
inline void SWAP(int &a, int &b) {
int tempint;tempint=a;a=b;b=tempint;
}
inline real fpair(real x[],real y[]){
real temp=1;
for (int l=0;l<Dimension;l++){
temp*=fabs(x[l]-y[l]);
}
return temp;
}
inline real fsingle(real x[]){
real temp=1;
for (int l=0;l<Dimension;l++){
temp*=exp(-x[l]*x[l]/2);
}
return temp;
}
extern real (*zerorangepairlink)(real rd,real rpd,real *r0,real *r1,real *r0p, real *r1p);
extern real (*zeroenergy)(real r,real rp,real coss);
extern real g;
extern real invg;
extern int totalpermute;
extern int permute1;
extern int permute2;
extern int *permutetable[MAXPARTICLENUM];
extern int *sig1;
extern int *sig2;
#endif