enbid-ananke 0.3.0__cp310-cp310-manylinux_2_39_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. .cpython-310-x86_64-linux-gnu.so +0 -0
  2. enbid_ananke/Enbid-2.0/.DS_Store +0 -0
  3. enbid_ananke/Enbid-2.0/COPYING +341 -0
  4. enbid_ananke/Enbid-2.0/COPYRIGHT +18 -0
  5. enbid_ananke/Enbid-2.0/Documentation/enbid.pdf +0 -0
  6. enbid_ananke/Enbid-2.0/Documentation/users-guide.pdf +0 -0
  7. enbid_ananke/Enbid-2.0/Documentation/users-guide.tex +679 -0
  8. enbid_ananke/Enbid-2.0/Documentation/users-guide.tex.flc +4 -0
  9. enbid_ananke/Enbid-2.0/Enbid +0 -0
  10. enbid_ananke/Enbid-2.0/Examples/hernquist1_small/snapshot_ici +0 -0
  11. enbid_ananke/Enbid-2.0/Examples/hernquist1_small/snapshot_ici_typelist +2 -0
  12. enbid_ananke/Enbid-2.0/Examples/uniform_6d_box_4/snapshot_ici +0 -0
  13. enbid_ananke/Enbid-2.0/Examples/uniform_6d_box_4/snapshot_ici_3d.ascii +10000 -0
  14. enbid_ananke/Enbid-2.0/Examples/uniform_6d_box_4/snapshot_ici_6d.ascii +10000 -0
  15. enbid_ananke/Enbid-2.0/parameterfiles/myparameterfile1 +37 -0
  16. enbid_ananke/Enbid-2.0/parameterfiles/myparameterfile2 +37 -0
  17. enbid_ananke/Enbid-2.0/parameterfiles/myparameterfile3 +37 -0
  18. enbid_ananke/Enbid-2.0/parameterfiles/myparameterfile4 +37 -0
  19. enbid_ananke/Enbid-2.0/periodic_lengths.txt +5 -0
  20. enbid_ananke/Enbid-2.0/src/Makefile +43 -0
  21. enbid_ananke/Enbid-2.0/src/allocate.cpp +47 -0
  22. enbid_ananke/Enbid-2.0/src/allocate.o +0 -0
  23. enbid_ananke/Enbid-2.0/src/allvars.cpp +62 -0
  24. enbid_ananke/Enbid-2.0/src/allvars.h +263 -0
  25. enbid_ananke/Enbid-2.0/src/allvars.o +0 -0
  26. enbid_ananke/Enbid-2.0/src/begrun.cpp +361 -0
  27. enbid_ananke/Enbid-2.0/src/begrun.o +0 -0
  28. enbid_ananke/Enbid-2.0/src/density_nd.cpp +130 -0
  29. enbid_ananke/Enbid-2.0/src/density_nd.o +0 -0
  30. enbid_ananke/Enbid-2.0/src/functions.cpp +256 -0
  31. enbid_ananke/Enbid-2.0/src/functions.h +20 -0
  32. enbid_ananke/Enbid-2.0/src/functions.o +0 -0
  33. enbid_ananke/Enbid-2.0/src/init.cpp +299 -0
  34. enbid_ananke/Enbid-2.0/src/init.o +0 -0
  35. enbid_ananke/Enbid-2.0/src/io.cpp +255 -0
  36. enbid_ananke/Enbid-2.0/src/io.o +0 -0
  37. enbid_ananke/Enbid-2.0/src/main.cpp +108 -0
  38. enbid_ananke/Enbid-2.0/src/main.o +0 -0
  39. enbid_ananke/Enbid-2.0/src/ngb_search.cpp +2315 -0
  40. enbid_ananke/Enbid-2.0/src/ngb_search.h +35 -0
  41. enbid_ananke/Enbid-2.0/src/ngb_search.o +0 -0
  42. enbid_ananke/Enbid-2.0/src/nr.cpp +186 -0
  43. enbid_ananke/Enbid-2.0/src/nr.h +13 -0
  44. enbid_ananke/Enbid-2.0/src/nr.o +0 -0
  45. enbid_ananke/Enbid-2.0/src/proto.h +22 -0
  46. enbid_ananke/Enbid-2.0/src/read_ic.cpp +434 -0
  47. enbid_ananke/Enbid-2.0/src/read_ic.o +0 -0
  48. enbid_ananke/Enbid-2.0/src/tree.cpp +973 -0
  49. enbid_ananke/Enbid-2.0/src/tree.h +34 -0
  50. enbid_ananke/Enbid-2.0/src/tree.o +0 -0
  51. enbid_ananke/Enbid-2.0/src/tree_search.cpp +597 -0
  52. enbid_ananke/Enbid-2.0/src/tree_search.o +0 -0
  53. enbid_ananke/__init__.py +318 -0
  54. enbid_ananke/__license__/LICENSE +339 -0
  55. enbid_ananke/__license__/__init__.py +9 -0
  56. enbid_ananke/__metadata__.py +160 -0
  57. enbid_ananke/_builtin_utils.py +62 -0
  58. enbid_ananke/_constants.py +56 -0
  59. enbid_ananke/_defaults.py +36 -0
  60. enbid_ananke/_name.py +10 -0
  61. enbid_ananke/_templates.py +71 -0
  62. enbid_ananke/_version.py +21 -0
  63. enbid_ananke/utils.py +11 -0
  64. enbid_ananke-0.3.0.dist-info/METADATA +44 -0
  65. enbid_ananke-0.3.0.dist-info/RECORD +68 -0
  66. enbid_ananke-0.3.0.dist-info/WHEEL +5 -0
  67. enbid_ananke-0.3.0.dist-info/licenses/LICENSE +339 -0
  68. enbid_ananke-0.3.0.dist-info/top_level.txt +2 -0
@@ -0,0 +1,37 @@
1
+ % Input and Output
2
+ InitCondFile Examples/hernquist1_small/snapshot_ici
3
+ %InitCondFile Examples/uniform_6d_box_4/snapshot_ici
4
+
5
+ %-------------------------------------------------------
6
+ ICFormat 1 % O)ASCII 1)Gadget 2)User defined
7
+ SnapshotFileBase _ph1
8
+
9
+ %-------------------------------------------------------
10
+ % Tree related options
11
+ SpatialScale 1.0 % x->x/SpatialScale and v->v
12
+ PartBoundary 7 % Min particles in a node to do boundary correction
13
+ NodeSplittingCriterion 1 % 0)Alternate 1) Min Entropy
14
+ CubicCells 1 % use 1 in spherically symmetric systems
15
+ MedianSplittingOn 0 %
16
+
17
+ %--------------------------------------------------------
18
+ % Smoothing options AM=adaptive metric Ker=Kernel Sp=Spherical Pr=Product
19
+ % 0) None 1)FiEstAS 2)Ker Sp Normal 3)Ker Sp AM 4)KerPr Normal 5)KerPr AM
20
+ TypeOfSmoothing 0
21
+ DesNumNgb 2 % 2-10 for Fiestas and 25-100 for Kernel
22
+ VolCorr 1 % 0) Disbale 1) Enable
23
+
24
+ %--------------------------------------------------------
25
+ % Kernel smoothing related options
26
+ % 0) B-Spline 1)top hat 2)Bi_weight (1-x^2)^2 3)Epanechikov 4)CIC 5)TSC
27
+ TypeOfKernel 3
28
+ KernelBiasCorrection 1 % 0)none 1)shift central particle
29
+ AnisotropicKernel 0 % 0) Isotropic 1) Anisotropic
30
+ Anisotropy 0 % fix minimum c/a minor/major axis ratio
31
+ DesNumNgbA 128 % Neighbors for cal covar metric for Anisotropic Ker
32
+ %--------------------------------------------------------
33
+ % other miscellaneous option
34
+ TypeListOn 0
35
+ PeriodicBoundaryOn 0
36
+ %--------------------------------------------------------
37
+
@@ -0,0 +1,37 @@
1
+ % Input and Output
2
+ InitCondFile Examples/hernquist1_small/snapshot_ici
3
+ %InitCondFile Examples/uniform_6d_box_4/snapshot_ici
4
+
5
+ %-------------------------------------------------------
6
+ ICFormat 1 % O)ASCII 1)Gadget 2)User defined
7
+ SnapshotFileBase _ph2
8
+
9
+ %-------------------------------------------------------
10
+ % Tree related options
11
+ SpatialScale 1.0 % x->x/SpatialScale and v->v
12
+ PartBoundary 7 % Min particles in a node to do boundary correction
13
+ NodeSplittingCriterion 1 % 0)Alternate 1) Min Entropy
14
+ CubicCells 1 % use 1 in spherically symmetric systems
15
+ MedianSplittingOn 0 %
16
+
17
+ %--------------------------------------------------------
18
+ % Smoothing options AM=adaptive metric Ker=Kernel Sp=Spherical Pr=Product
19
+ % 0) None 1)FiEstAS 2)Ker Sp Normal 3)Ker Sp AM 4)KerPr Normal 5)KerPr AM
20
+ TypeOfSmoothing 1
21
+ DesNumNgb 2 % 2-10 for Fiestas and 25-100 for Kernel
22
+ VolCorr 1 % 0) Disbale 1) Enable
23
+
24
+ %--------------------------------------------------------
25
+ % Kernel smoothing related options
26
+ % 0) B-Spline 1)top hat 2)Bi_weight (1-x^2)^2 3)Epanechikov 4)CIC 5)TSC
27
+ TypeOfKernel 3
28
+ KernelBiasCorrection 1 % 0)none 1)shift central particle
29
+ AnisotropicKernel 0 % 0) Isotropic 1) Anisotropic
30
+ Anisotropy 0 % fix minimum c/a minor/major axis ratio
31
+ DesNumNgbA 128 % Neighbors for cal covar metric for Anisotropic Ker
32
+ %--------------------------------------------------------
33
+ % other miscellaneous option
34
+ TypeListOn 0
35
+ PeriodicBoundaryOn 0
36
+ %--------------------------------------------------------
37
+
@@ -0,0 +1,37 @@
1
+ % Input and Output
2
+ InitCondFile Examples/hernquist1_small/snapshot_ici
3
+ %InitCondFile Examples/uniform_6d_box_4/snapshot_ici
4
+
5
+ %-------------------------------------------------------
6
+ ICFormat 1 % O)ASCII 1)Gadget 2)User defined
7
+ SnapshotFileBase _ph3
8
+
9
+ %-------------------------------------------------------
10
+ % Tree related options
11
+ SpatialScale 1.0 % x->x/SpatialScale and v->v
12
+ PartBoundary 7 % Min particles in a node to do boundary correction
13
+ NodeSplittingCriterion 1 % 0)Alternate 1) Min Entropy
14
+ CubicCells 1 % use 1 in spherically symmetric systems
15
+ MedianSplittingOn 0 %
16
+
17
+ %--------------------------------------------------------
18
+ % Smoothing options AM=adaptive metric Ker=Kernel Sp=Spherical Pr=Product
19
+ % 0) None 1)FiEstAS 2)Ker Sp Normal 3)Ker Sp AM 4)KerPr Normal 5)KerPr AM
20
+ TypeOfSmoothing 3
21
+ DesNumNgb 40 % 2-10 for Fiestas and 25-100 for Kernel
22
+ VolCorr 1 % 0) Disbale 1) Enable
23
+
24
+ %--------------------------------------------------------
25
+ % Kernel smoothing related options
26
+ % 0) B-Spline 1)top hat 2)Bi_weight (1-x^2)^2 3)Epanechikov 4)CIC 5)TSC
27
+ TypeOfKernel 3
28
+ KernelBiasCorrection 1 % 0)none 1)shift central particle
29
+ AnisotropicKernel 0 % 0) Isotropic 1) Anisotropic
30
+ Anisotropy 0 % fix minimum c/a minor/major axis ratio
31
+ DesNumNgbA 128 % Neighbors for cal covar metric for Anisotropic Ker
32
+ %--------------------------------------------------------
33
+ % other miscellaneous option
34
+ TypeListOn 0
35
+ PeriodicBoundaryOn 0
36
+ %--------------------------------------------------------
37
+
@@ -0,0 +1,37 @@
1
+ % Input and Output
2
+ InitCondFile Examples/hernquist1_small/snapshot_ici
3
+ %InitCondFile Examples/uniform_6d_box_4/snapshot_ici
4
+
5
+ %-------------------------------------------------------
6
+ ICFormat 1 % O)ASCII 1)Gadget 2)User defined
7
+ SnapshotFileBase _ph4
8
+
9
+ %-------------------------------------------------------
10
+ % Tree related options
11
+ SpatialScale 1.0 % x->x/SpatialScale and v->v
12
+ PartBoundary 7 % Min particles in a node to do boundary correction
13
+ NodeSplittingCriterion 1 % 0)Alternate 1) Min Entropy
14
+ CubicCells 1 % use 1 in spherically symmetric systems
15
+ MedianSplittingOn 0 %
16
+
17
+ %--------------------------------------------------------
18
+ % Smoothing options AM=adaptive metric Ker=Kernel Sp=Spherical Pr=Product
19
+ % 0) None 1)FiEstAS 2)Ker Sp Normal 3)Ker Sp AM 4)KerPr Normal 5)KerPr AM
20
+ TypeOfSmoothing 3
21
+ DesNumNgb 40 % 2-10 for Fiestas and 25-100 for Kernel
22
+ VolCorr 1 % 0) Disbale 1) Enable
23
+
24
+ %--------------------------------------------------------
25
+ % Kernel smoothing related options
26
+ % 0) B-Spline 1)top hat 2)Bi_weight (1-x^2)^2 3)Epanechikov 4)CIC 5)TSC
27
+ TypeOfKernel 3
28
+ KernelBiasCorrection 1 % 0)none 1)shift central particle
29
+ AnisotropicKernel 1 % 0) Isotropic 1) Anisotropic
30
+ Anisotropy 0 % fix minimum c/a minor/major axis ratio
31
+ DesNumNgbA 64 % Neighbors for cal covar metric for Anisotropic Ker
32
+ %--------------------------------------------------------
33
+ % other miscellaneous option
34
+ TypeListOn 0
35
+ PeriodicBoundaryOn 0
36
+ %--------------------------------------------------------
37
+
@@ -0,0 +1,5 @@
1
+ 0 0 0 0 0 0
2
+
3
+
4
+
5
+
@@ -0,0 +1,43 @@
1
+ # There are a number of code options that need to be switched on/off
2
+ # on compile-time.
3
+ #
4
+ # From the following list, please select the desired options:
5
+ OPT1 = -DWARN # to enable or disable warnings
6
+ #OPT2 = -DDIM6 # Does calculations in 6 dimensional space
7
+ OPT2 = -DDIM3 # Does calculations in 3 dimensional space
8
+ #OPT2 = -DDIMO # specify dimension in allvars.h (#define ND 4)
9
+ #OPT3 = -DMEDIAN # reduces memory, if SPH not needed
10
+ #OPT4 = -DPERIODIC # Does calculations in 6 dimensional space
11
+
12
+
13
+ OPTIMIZE = -O3 -Wall
14
+ # Extra for intel machines
15
+ #OPTIMIZE = -O3 -Wall -ffast-math -msse2
16
+ # Extra for MAC OS X
17
+ #OPTIMIZE = -O3 -Wall -fast
18
+
19
+ OPTIONS = $(OPTIMIZE) $(OPT1) $(OPT2) $(OPT3) $(OPT4) $(OPT5) $(OPT6)\
20
+ $(OPT7) $(OPT8) $(OPT9) $(OPT10)
21
+
22
+ CXX = g++ #
23
+ CXXFLAGS = $(OPTIONS)
24
+ LIBS = -lm
25
+
26
+ OBJS = main.o begrun.o init.o io.o allvars.o functions.o \
27
+ allocate.o read_ic.o nr.o tree.o tree_search.o ngb_search.o density_nd.o
28
+
29
+ INCL = allvars.h proto.h nr.h functions.h ngb_search.h Makefile
30
+
31
+
32
+ EXEC = Enbid
33
+
34
+ $(EXEC): $(OBJS)
35
+ $(CXX) $(OBJS) $(LIBS) -o $(EXEC)
36
+ mv $(EXEC) ..
37
+
38
+ $(OBJS): $(INCL)
39
+
40
+ .PHONY : clean
41
+ clean:
42
+ rm -f $(OBJS)
43
+
@@ -0,0 +1,47 @@
1
+ #include <stdio.h>
2
+ #include <stdlib.h>
3
+ #include <string.h>
4
+ #include <math.h>
5
+ #include "allvars.h"
6
+ #include "proto.h"
7
+ #include "functions.h"
8
+
9
+
10
+ /* This routine allocates memory for
11
+ * particle storage.
12
+ */
13
+ void allocate_memory(void)
14
+ {
15
+
16
+
17
+ int bytes=0,bytes_tot=0;
18
+
19
+ if(All.MaxPart>0)
20
+ {
21
+ if(!(P_data=new particle_data[All.MaxPart]))
22
+ {
23
+ printf("failed to allocate memory for `P_data' (%d bytes).\n",bytes);
24
+ endrun(1);
25
+ }
26
+ bytes_tot+=All.MaxPart*sizeof(struct particle_data);
27
+
28
+ P= P_data-1; /* start with offset 1 */
29
+ Part= &P[1];
30
+ printf("Allocated %g MByte for particle storage.\n",bytes_tot/(1024.0*1024.0));
31
+ }
32
+
33
+ }
34
+
35
+
36
+
37
+ /* This routine frees the memory for the particle storage,
38
+ */
39
+ void free_memory(void)
40
+ {
41
+
42
+ if(All.MaxPart>0)
43
+ {
44
+ free(P_data);
45
+ }
46
+
47
+ }
Binary file
@@ -0,0 +1,62 @@
1
+ #include "allvars.h"
2
+ //int BatchFlag;
3
+ int NumPart;
4
+
5
+ /* variables for input/output , usually only used on process 0 */
6
+ char ParameterFile[100];
7
+
8
+ /* tabulated smoothing kernel */
9
+ double Kernel[KERNEL_TABLE+2],
10
+ KernelDer[KERNEL_TABLE+2],
11
+ KernelDer2[KERNEL_TABLE+2],
12
+ KernelRad[KERNEL_TABLE+2];
13
+
14
+ /* this struct contains mostly code parameters read from the parameter file */
15
+ struct global_data_all_processes All;
16
+
17
+ vector<int> trees;
18
+ FILE *treefile_fpt;
19
+ //real BoxHalf, Box;
20
+
21
+ /* The following structure holds all the information that is
22
+ * stored for each particle.
23
+ */
24
+
25
+ vector<int> npart,npartc;
26
+
27
+ struct io_header_1 header1;
28
+
29
+ //struct param_data Var;
30
+
31
+ struct particle_data *P,*P_data,*Part;
32
+
33
+
34
+ /* Header for the GADGET file format. */
35
+
36
+ double t00,t11,t22;
37
+ double xbmax[ND],xbmin[ND],kbuf[ND]; /* boundary calculation variables */
38
+
39
+
40
+ real searchx[ND][2], searchcenter[ND],metric[ND],metric1[ND],gmatrix[ND][ND];
41
+ int *list_kdt,*list_kd;
42
+ float *listr;
43
+
44
+ struct NODE
45
+ *nodes,*nodes_base,*nodesC;
46
+ struct SNODE
47
+ *snodes,*snodes_base;
48
+ struct PNODE
49
+ *pnodes,*pnodes_base;
50
+
51
+
52
+ struct XNODE
53
+ *xnodes,*xnodes_base;
54
+
55
+ struct linklist *pqHead;
56
+ struct pqueue *pqx1;
57
+ int pnext,pnew;
58
+
59
+ float **mrho,*d,**ve;
60
+
61
+
62
+
@@ -0,0 +1,263 @@
1
+ /* This file declares all global variables. Further variables should be added here,
2
+ and declared as 'extern'. The actual existence of these variables is provided by
3
+ the file 'allvars.cpp'. To produce 'allvars.cpp' from 'allvars.h', do the following:
4
+
5
+ 1.) Erase all #define's
6
+ 2.) add #include "allvars.h"
7
+ 3.) delete all keywords 'extern'
8
+ 4.) delete all struct definitions enclosed in {...}, e.g.
9
+ "extern struct global_data_all_processes {....} All;"
10
+ becomes "struct global_data_all_processes All;"
11
+ 5.) delete extern struct xyz_data {...}; completely
12
+ */
13
+
14
+ #include <stdio.h>
15
+ #include<iostream>
16
+ #include<vector>
17
+ using namespace std;
18
+
19
+ #ifdef MEDIAN
20
+ #define ROOT 1
21
+ #define LOWER(i,node) (i<<1)
22
+ #define UPPER(i,node) ((i<<1)+1)
23
+ #define PARENT(i,node) (i>>1)
24
+ #define SIBLING(i,node) ((i&1)?i-1:i+1)
25
+ #define SETNEXT(i,node)\
26
+ {\
27
+ while (i&1) i=i>>1;\
28
+ ++i;\
29
+ }
30
+ #else
31
+ #define ROOT 1
32
+ #define LOWER(i,node) (node[i].left)
33
+ #define UPPER(i,node) (node[i].left+1)
34
+ #define PARENT(i,node) (node[i].parent)
35
+ #define SIBLING(i,node) ((i&1)?i-1:i+1)
36
+ #define SETNEXT(i,node)\
37
+ {\
38
+ while (i&1) i=node[i].parent;\
39
+ ++i;\
40
+ }
41
+ #endif
42
+
43
+
44
+ #ifdef DIM6
45
+ #define ND 6 //const int ND=6;
46
+ #endif
47
+ #ifdef DIM3
48
+ #define ND 3 //const int ND=3;
49
+ #endif
50
+ #ifdef DIMO
51
+ #define ND 4 //const int ND=5;
52
+ #endif
53
+
54
+ #ifdef T3E
55
+ typedef short int int4byte; /* Note: int has 8 Bytes on the T3E ! */
56
+ #else
57
+ typedef int int4byte;
58
+ #endif
59
+
60
+ #define real double
61
+ #define real1 float
62
+
63
+ /* ... often used constants (cgs units) */
64
+ #define MAX_REAL_NUMBER 1e37
65
+ #define MIN_REAL_NUMBER 1e-37
66
+ #define THIRD (1.0/3.0)
67
+ #ifndef PI
68
+ #define PI 3.14159265358979323846
69
+ #endif
70
+ #define PI_INV (1/PI)
71
+ #define LN2 0.69314718
72
+ #define KERNEL_TABLE 1000
73
+ #define MAX_NGB 1000000 /* 20000defines maximum length of neighbour list */
74
+
75
+ //extern int BatchFlag;
76
+ extern int NumPart;
77
+
78
+ /* variables for input/output , usually only used on process 0 */
79
+ extern char ParameterFile[100];
80
+
81
+ /* tabulated smoothing kernel */
82
+ extern double Kernel[KERNEL_TABLE+2],
83
+ KernelDer[KERNEL_TABLE+2],
84
+ KernelDer2[KERNEL_TABLE+2],
85
+ KernelRad[KERNEL_TABLE+2];
86
+
87
+ /* this struct contains mostly code parameters read from the parameter file */
88
+ extern struct global_data_all_processes
89
+ {
90
+ /* Code options */
91
+ int TypeOfSmoothing;
92
+ int KernelBiasCorrection;
93
+ int AnisotropicKernel;
94
+ int Dimensions;
95
+ int VolCorr;
96
+ int TypeOfKernel;
97
+ double SpatialScale;
98
+ int PartBoundary;
99
+ int NodeSplittingCriterion;
100
+ int CubicCells;
101
+ double Anisotropy;
102
+ int DesNumNgb;
103
+ int NumBucket;
104
+ int DesNumNgbA;
105
+ int NumBucketA;
106
+ /* Cosmology */
107
+ // double BoxSize, BoxHalf;
108
+ int MedianSplittingOn;
109
+ float hs[ND],hsv;
110
+ double MassTable[6];
111
+ /* File options */
112
+ int ICFormat;
113
+ double OmegaBaryon;
114
+ double Omega0;
115
+ char InitCondFile[100],SnapshotFileBase[100];
116
+ char InputDir[100],
117
+ InitFileBase[100];
118
+ /* Some other global parameters */
119
+ int MaxPart,TypeListOn;
120
+ int flag_swap;
121
+ int order_flag;
122
+ int PeriodicBoundaryOn;
123
+ #ifdef PERIODIC
124
+ double boxh[ND];
125
+ #endif
126
+
127
+ } All;
128
+
129
+
130
+
131
+
132
+ extern struct particle_data
133
+ {
134
+ int ID,Type;//,NumNgb; /* unique particle identifier */
135
+ float Pos[ND]; // particle position
136
+ #ifdef DIM3
137
+ float Vel[3]; // particle velocity
138
+ #endif
139
+ float Mass; /* particle mass */
140
+ float Density;
141
+ } *P,*P_data,*Part;//,*P1;
142
+
143
+
144
+ extern vector<int> npart,npartc;
145
+
146
+ /* Header for the standard file format. */
147
+ extern struct io_header_1
148
+ {
149
+ int4byte npart[6];
150
+ double mass[6];
151
+ double time;
152
+ double redshift;
153
+ int4byte flag_sfr;
154
+ int4byte flag_feedback;
155
+ int4byte npartTotal[6];
156
+ int4byte flag_cooling;
157
+ int4byte num_files;
158
+ double BoxSize;
159
+ double Omega0;
160
+ double OmegaLambda;
161
+ double HubbleParam;
162
+ /* extra flags other than gadget*/
163
+ int4byte flag_id; /* if IDs needed in output */
164
+ int4byte flag_dim; /* no of dimensions */
165
+ /* signifies that output file contains estimated density */
166
+ int4byte flag_density;
167
+ char fill[256- 6*4- 6*8- 2*8- 2*4- 6*4- 2*4 - 4*8-3*4]; /* fills to 256 Bytes */
168
+ } header1;
169
+
170
+ extern double t00,t11,t22;
171
+ extern double xbmax[ND],xbmin[ND],kbuf[ND]; /* boundary calculation variables */
172
+
173
+
174
+ /* extern struct param_data */
175
+ /* { */
176
+ /* /\* Code options *\/ */
177
+ /* int BeginFileNum,EndFileNum,FileNum; */
178
+ /* } Var; */
179
+
180
+
181
+
182
+
183
+
184
+ extern int *list_kdt,*list_kd;//,*father;
185
+ extern float *listr;
186
+ extern real searchx[ND][2], searchcenter[ND],metric[ND],metric1[ND],gmatrix[ND][ND];//,h[ND];
187
+ extern vector<int> trees;
188
+ extern FILE *treefile_fpt;
189
+ //extern real BoxHalf, Box;
190
+ // count = no of particles
191
+ // k1=dim to be split ,kcut= split location
192
+ // for leaf node k1 is index to its pnode
193
+ // left and right left= index(pointer) to left and right nodes
194
+
195
+ #ifdef MEDIAN
196
+ extern struct NODE
197
+ {
198
+ int count,k1,lid; // 2*20=40 bytes,
199
+ real kcut;
200
+ struct XNODE * bnd;
201
+ } *nodes,*nodes_base,*nodesC;
202
+ #else
203
+ extern struct NODE
204
+ {
205
+ real kcut;
206
+ int count,k1,lid,left,parent; // 2*20=40 bytes,
207
+ struct XNODE * bnd;
208
+ } *nodes,*nodes_base,*nodesC;
209
+ #endif
210
+
211
+ //contains additional details of node
212
+ // lid: first id of particle
213
+ // k0: last dimension split
214
+ // bleft: 0 or 1 checks if the surface is derived from boundary or not
215
+ extern struct SNODE
216
+ {
217
+ // real Density,h[ND];//,ex,ev,e[ND]; 2*20=40bytes
218
+ int lid,k0;
219
+ bool bleft[ND],bright[ND];
220
+ } *snodes,*snodes_base;
221
+
222
+ // contains co-ordinates (surfaces) of leaf node
223
+ extern struct PNODE
224
+ {
225
+ real x[ND][2]; // 48 bytes
226
+ } *pnodes,*pnodes_base;
227
+
228
+
229
+ // contains co-ordinates (surfaces) of all nodes
230
+ extern struct XNODE
231
+ {
232
+ real x[ND][2]; // 2*48=96 bytes +12bytes =
233
+ } *xnodes,*xnodes_base;
234
+
235
+
236
+
237
+ extern struct linklist
238
+ {
239
+ real r;
240
+ int p;
241
+ float x[ND];
242
+ } *pqHead;
243
+
244
+ extern struct pqueue
245
+ {
246
+ struct linklist* pq;
247
+ bool operator<( const struct pqueue &a ) const
248
+ {
249
+ return pq->r < a.pq->r;
250
+ }
251
+ bool operator>( const struct pqueue &a ) const
252
+ {
253
+ return pq->r > a.pq->r;
254
+ }
255
+ }*pqx1;
256
+
257
+
258
+ extern float **mrho,*d,**ve;
259
+ extern int pnext,pnew;
260
+
261
+
262
+
263
+
Binary file