forked from N-BodyShop/gasoline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pst.h
1839 lines (1616 loc) · 35 KB
/
pst.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
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef PST_HINCLUDED
#define PST_HINCLUDED
#include "pkd.h"
#include "mdl.h"
#include "smoothfcn.h"
#include "floattype.h"
#include "dumpframe.h"
#ifdef OUTURBDRIVER
#include "outurb.h"
#endif
#ifdef COLLISIONS
#include "collision.h"
#endif
#ifdef AGGS
#include "aggs.h"
#endif
#ifdef RUBBLE_ZML
#include "rubble.h"
#endif
#ifdef STARFORM
#include "starform.h"
#include "feedback.h"
#include "supernova.h"
#endif
typedef struct lclBlock {
char *pszDataPath;
PKD pkd;
int nPstLvl;
int iWtFrom;
int iWtTo;
int iPart;
int iOrdSplit;
FLOAT fSplit;
FLOAT fWtLow;
FLOAT fWtHigh;
FLOAT fLow;
FLOAT fHigh;
int nWriteStart;
int nDarkWriteStart;
int nGasWriteStart;
int nStarWriteStart;
} LCL;
typedef struct pstContext {
struct pstContext *pstLower;
MDL mdl;
LCL *plcl;
int idSelf;
int idUpper;
int nLeaves;
int nLower;
int nUpper;
int iLvl;
BND bnd;
BND bndActive;
BND bndTreeActive;
int iSplitDim;
int iOrdSplit;
FLOAT fSplit;
FLOAT fSplitInactive;
int nTotal;
int nDark;
int nGas;
int nStar;
/*
** The PST node is also a valid cell for the tree.
*/
KDN kdn;
} * PST;
#define PST_FILENAME_SIZE 512
enum pst_service {
PST_SRV_STOP,
PST_SETADD,
PST_LEVELIZE,
PST_READTIPSY,
PST_MOVEPART,
PST_DOMAINDECOMP,
PST_CALCBOUND,
PST_GASWEIGHT,
PST_RUNGDDWEIGHT,
PST_WEIGHT,
PST_WEIGHTWRAP,
PST_FREESTORE,
PST_COLREJECTS,
PST_SWAPREJECTS,
PST_DOMAINCOLOR,
PST_COLORDREJECTS,
PST_DOMAINORDER,
PST_LOCALORDER,
PST_OUTARRAY,
PST_OUTVECTOR,
PST_OUTNCVECTOR,
PST_INARRAY,
PST_WRITETIPSY,
PST_TREEZIP,
PST_BUILDTREE,
PST_SMOOTH,
PST_GRAVITY,
PST_GRAVEXTERNAL,
PST_CALCEANDL,
PST_CALCEANDLEXT,
PST_DRIFT,
PST_KICK,
PST_EMERGENCYADJUST,
PST_KICKPATCH,
PST_READCHECK,
PST_WRITECHECK,
PST_OUTPUTBLACKHOLES,
PST_SETSOFT,
PST_PHYSICALSOFT,
PST_PREVARIABLESOFT,
PST_POSTVARIABLESOFT,
PST_SETTOTAL,
PST_SETTOTALS,
PST_CALCCELL,
PST_COLCELLS,
PST_DISTRIBCELLS,
PST_CALCROOT,
PST_DISTRIBROOT,
PST_ONENODEREADINIT,
PST_SWAPALL,
PST_MASSCHECK,
PST_MASSMETALSENERGYCHECK,
PST_ACTIVETYPEORDER,
PST_ACTIVEORDER,
PST_SETRUNG,
PST_ACTIVERUNG,
PST_CURRRUNG,
PST_GRAVSTEP,
PST_ACCELSTEP,
PST_DENSITYSTEP,
PST_RUNGSTATS,
PST_GETMAP,
PST_COOLVELOCITY,
PST_RESETTOUCHRUNG,
PST_ACTIVEEXACTTYPE,
PST_ACTIVETYPE,
PST_SETTYPE,
PST_RESETTYPE,
PST_COUNTTYPE,
PST_ACTIVEMASKRUNG,
PST_ACTIVETYPERUNG,
PST_SETPARTICLETYPES,
PST_SOUGHTPARTICLELIST,
PST_COOLUSINGPARTICLELIST,
PST_SETTYPEFROMFILE,
PST_MARKSMOOTH,
PST_DTSMOOTH,
PST_RESMOOTH,
PST_INITACCEL,
PST_MODIFYACCEL,
PST_DTTORUNG,
PST_INITDT,
PST_ORDWEIGHT,
PST_SETWRITESTART,
PST_SETNCWRITESTART,
PST_COLNPARTS,
PST_NEWORDER,
PST_GETNPARTS,
PST_SETNPARTS,
PST_UPDATEUDOT,
PST_UPDATESHOCKTRACKER,
PST_GETGASPRESSURE,
PST_GETDENSITYU,
PST_LOWERSOUNDSPEED,
PST_INITENERGY,
PST_KICKVPRED,
PST_KICKRHOPRED,
PST_SPHCURRRUNG,
PST_RANDOMVELOCITIES,
PST_DENSCHECK,
PST_GETSPECIALPARTICLES,
PST_DOSPECIALPARTICLES,
PST_GHOSTEXCLUDE,
/* following for COLLISIONS */
PST_NUMREJECTS,
PST_READSS,
PST_WRITESS,
PST_KICKUNIFGRAV,
PST_NEXTENCOUNTER,
PST_MARKENCOUNTERS,
PST_NEXTCOLLISION,
PST_GETCOLLIDERINFO,
PST_DOCOLLISION,
PST_RESETCOLLIDERS,
PST_FINDBINARY,
PST_MERGEBINARY,
/* following for OLD_KEPLER */
#ifdef SLIDING_PATCH
PST_FINDLM,
PST_GETNEIGHBORS,
#endif
/* following for AGGS */
PST_AGGSFIND,
PST_AGGSCONFIRM,
PST_AGGSMERGE,
PST_AGGSBACKDRIFT,
PST_AGGSGETCOM,
PST_AGGSGETAXESANDSPIN,
PST_AGGSSETBODYPOS,
PST_AGGSSETSPACEPOS,
PST_AGGSSETSPACEVEL,
PST_AGGSSETSPACESPINS,
PST_AGGSDELETE,
PST_AGGSGETACCEL,
PST_AGGSCHECKSTRESS,
PST_AGGSGETTORQUE,
/* following for SLIDING_PATCH */
PST_RANDAZWRAP,
/* following for RUBBLE_ZML */
PST_DUSTBINSGETMASS,
PST_DUSTBINSAPPLY,
PST_RUBBLERESETCOLFLAG,
PST_RUBBLECHECKFORKDKRESTART,
PST_RUBBLESTEP,
PST_RUBCLEANUP,
PST_RUBINTERPCLEANUP,
/* following for SPH, etc. */
PST_SPHSTEP,
PST_SINKSTEP,
PST_SETSPHSTEP,
PST_SETBALL,
PST_SPHVISCOSITYLIMITER,
PST_FINISHLWTREE,
PST_INITCOOLING,
PST_INITOUTURB,
PST_ACCELOUTURB,
PST_COOLTABLEREAD,
PST_GROWMASS,
PST_CLEARTIMER,
PST_MASSINR,
PST_ROTBARINIT,
PST_BALLMAX,
PST_FORMSINKS,
PST_FORMSTARS,
PST_STARCLUSTERFORMPRECONDITION,
PST_FEEDBACK,
#ifdef PARTICLESPLIT
PST_SPLITGAS,
#endif
PST_GRAVINFLOW,
PST_CREATEINFLOW,
PST_SIMPLESTARFORM,
PST_SSFCREATESTARS,
PST_DUMPFRAME,
PST_DUMPVOXEL,
PST_COM,
PST_COMBYTYPE,
PST_OLDESTSTAR,
PST_SETSINK,
PST_INITSTARLOG,
PST_FLUSHSTARLOG,
PST_INITSINKLOG,
PST_FLUSHSINKLOG
};
void pstAddServices(PST,MDL);
void pstInitialize(PST *,MDL,LCL *);
void pstFinish(PST);
/* PST_SETADD */
struct inSetAdd {
int id;
};
void pstSetAdd(PST,void *,int,void *,int *);
/* PST_LEVELIZE */
struct inLevelize {
int iLvl;
};
void pstLevelize(PST,void *,int,void *,int *);
/* PST_READTIPSY */
struct inReadTipsy {
int nFileStart;
int nFileEnd;
int nDark;
int nGas;
int nStar;
int iOrder;
int nIOProcessor;
float fExtraStore;
FLOAT fPeriod[3];
FLOAT dxInflow, dxOutflow;
int bStandard;
int iReadIOrder;
double dvFac;
double dTuFac;
char achInFile[PST_FILENAME_SIZE];
};
void pstReadTipsy(PST,void *,int,void *,int *);
/* PST_DOMAINDECOMP */
struct inDomainDecomp {
int bDoRootFind;
int bDoSplitDimFind;
int bSplitWork;
};
void pstDomainDecomp(PST,void *,int,void *,int *);
/* PST_CALCBOUND */
struct outCalcBound {
BND bnd;
BND bndActive;
BND bndTreeActive;
BND bndBall;
};
void pstCalcBound(PST,void *,int,void *,int *);
void pstGasWeight(PST,void *,int,void *,int *);
struct inRungDDWeight {
int iMaxRung;
double dWeight;
};
void pstRungDDWeight(PST,void *,int,void *,int *);
/* PST_WEIGHT */
struct inWeight {
int iSplitDim;
FLOAT fSplit;
int iSplitSide;
int ittr;
int pFlag;
};
struct outWeight {
int nLow;
int nHigh;
FLOAT fLow;
FLOAT fHigh;
};
void pstWeight(PST,void *,int,void *,int *);
struct inWeightWrap {
int iSplitDim;
FLOAT fSplit;
FLOAT fSplit2;
int iSplitSide;
int ittr;
int pFlag;
};
void pstWeightWrap(PST,void *,int,void *,int *);
/* PST_FREESTORE */
struct outFreeStore {
int nFreeStore;
};
void pstFreeStore(PST,void *,int,void *,int *);
/*
** This structure is used by reject collectors and SwapRejects
*/
typedef struct outReject {
int id;
int nRejects;
int nSpace;
int nLocal;
} OREJ;
/* PST_COLREJECTS */
struct inColRejects {
int iSplitDim;
FLOAT fSplit;
FLOAT fSplitInactive;
int iSplitSide;
};
void pstColRejects(PST,void *,int,void *,int *);
/* PST_SWAPREJECTS */
void pstSwapRejects(PST,void *,int,void *,int *);
/* PST_DOMAINCOLOR */
void pstDomainColor(PST,void *,int,void *,int *);
/* PST_COLORDREJECTS */
struct inColOrdRejects {
int iOrdSplit;
int iSplitSide;
};
void pstColOrdRejects(PST,void *,int,void *,int *);
/* PST_DOMAINORDER */
struct inDomainOrder {
int iMaxOrder;
};
void pstDomainOrder(PST,void *,int,void *,int *);
/* PST_LOCALORDER */
void pstLocalOrder(PST,void *,int,void *,int *);
/* PST_OUTARRAY */
struct inOutArray {
char achOutFile[PST_FILENAME_SIZE];
int nStart;
int iType;
int iBinaryOutput;
int bStandard;
};
void pstOutArray(PST,void *,int,void *,int *);
/*PST_OUTNCVECTOR*/
struct outNC {
float min[3][3];
float max[3][3];
int nOut;
};
void pstOutNCVector(PST,void *,int,void *,int *);
/* PST_OUTVECTOR */
struct inOutput {
char achOutFile[PST_FILENAME_SIZE];
int iDim;
int iType;
int iBinaryOutput;
int N;
int bStandard;
int nIOProcessor;
double duTFac;
double dvFac;
};
void pstOutVector(PST,void *,int,void *,int *);
/* PST_INARRAY */
struct inInput {
char achInFile[PST_FILENAME_SIZE];
int nFileStart;
int nFileEnd;
int iDim;
int iType;
int iBinaryInput;
int N;
int bStandard;
double duTFac;
double dvFac;
};
void pstInArray(PST,void *,int,void *,int *);
/* PST_WRITETIPSY */
struct inWriteTipsy {
int bStandard;
int nIOProcessor;
double dvFac;
double duTFac;
int iGasModel;
char achOutFile[PST_FILENAME_SIZE];
};
void pstWriteTipsy(PST,void *,int,void *,int *);
struct inTreeZip {
char achFile[PST_FILENAME_SIZE];
int bLocal;
BND bnd;
};
void pstTreeZip(PST,void *,int,void *,int *);
/* PST_BUILDTREE */
struct inBuildTree {
int nBucket;
int iOpenType;
int iOrder;
double dCrit;
int bBinary;
int bActiveOnly;
int bTreeActiveOnly;
int bGravity;
};
struct outBuildTree {
KDN kdn;
};
void pstBuildTree(PST,void *,int,void *,int *);
/* PST_SMOOTH */
struct inSmooth {
int nSmooth;
int bPeriodic;
int bSymmetric;
int iSmoothType;
double dfBall2OverSoft2;
SMF smf;
};
struct outSmooth {
int iSmoothFlags; /* Warning Flags for need to smooth again, etc... */
int nSmoothed;
int nSmoothedInner;
int nSmoothedFixh;
/*
** Cache Statistics.
*/
double dpASum;
double dpMSum;
double dpCSum;
double dpTSum;
double dcASum;
double dcMSum;
double dcCSum;
double dcTSum;
};
void pstSmooth(PST,void *,int,void *,int *);
/* PST_MOVEPART */
struct inMoveParticle {
PARTICLE p;
FLOAT dOrigin[3]; /* Origin of new frame */
FLOAT dRelx[3]; /* Displacement from newx */
#ifdef SLIDING_PATCH
PATCH_PARAMS PP;
#endif
};
void pstMoveParticle(PST,void *,int,void *,int *);
/* PST_GRAVITY */
struct inGravity {
int nReps;
int bPeriodic;
int iOrder;
int bEwald;
int iEwOrder;
int bComove;
int bDoSun;
double dSunSoft;
double dEwCut;
double dEwhCut;
double dRhoFac;
#ifdef SLIDING_PATCH
double dTime;
PATCH_PARAMS PP;
#endif
};
struct outGravity {
int nActive;
int nTreeActive;
double aSun[3];
double dPartSum;
double dCellSum;
double dSoftSum;
double dFlop;
/*
** Collected CPU time stats.
*/
double dWSum;
double dWMax;
double dWMin;
double dISum;
double dIMax;
double dIMin;
double dESum;
double dEMax;
double dEMin;
/*
** Cache Statistics.
*/
double dpASum;
double dpMSum;
double dpCSum;
double dpTSum;
double dcASum;
double dcMSum;
double dcCSum;
double dcTSum;
};
void pstGravity(PST,void *,int,void *,int *);
/* PST_GRAVEXTERNAL */
struct inGravExternal {
int bIndirect;
int bDoSun;
double dTime;
double dSunMass;
double dSunSoft;
double aSun[3];
/*
** For external galaxy potential stuff
*/
int bLogHalo;
double dLogHaloVcirc;
double dLogHaloEps;
double dLogHaloFlat;
double dLogHaloTwoh;
int bHernquistSpheroid;
int bNFWSpheroid;
double dNFWm200;
double dNFWr200;
double dNFWconc;
double dNFWsoft;
int bElliptical;
int bEllipticalDarkNFW;
int bHomogSpheroid;
double dHomogSpheroidM;
double dHomogSpheroidR;
int bBodyForce;
double dBodyForceConst;
int bGalaxyDiskVerticalPotential;
double dGalaxyDiskVerticalPotentialVc;
double dGalaxyDiskVerticalPotentialR;
double dGalaxyDiskVerticalPotentialStarSigma;
double dGalaxyDiskVerticalPotentialStarH;
double dGalaxyDiskVerticalPotentialGasSigma;
double dGalaxyDiskVerticalPotentialGasH;
double dGalaxyDiskVerticalPotentialGasX;
double dGalaxyDiskVerticalPotentialGasY;
double dGalaxyDiskVerticalPotentialGasZ;
int bMiyamotoDisk;
int bTimeVarying;
int bRotatingBar;
double dRotBarAmp;
double dRotBarPosAng;
double dRotBarB5;
FLOAT aCom[3];
#ifdef ROT_FRAME
int bRotFrame;
double dOmega;
double dOmegaDot;
#endif
#ifdef SLIDING_PATCH
int bPatch;
PATCH_PARAMS PP;
#endif
#ifdef SIMPLE_GAS_DRAG
int bSimpleGasDrag;
int iFlowOpt;
int bEpstein;
double dGamma;
double dTime;
#endif
};
struct outGravExternal {
double dAcc[3];
double dTorque[3];
};
void pstGravExternal(PST,void *,int,void *,int *);
/* PST_CALCEANDL */
struct outCalcEandL {
double T;
double U;
double Eth;
double L[3];
};
void pstCalcEandL(PST,void *,int,void *,int *);
/* PST_CALCEANDLEXT */
struct inCalcEandLExt {
int bHeliocentric;
};
struct outCalcEandLExt {
double dMass;
double dSumMR[3];
double dSumMV[3];
double dPot;
};
void pstCalcEandLExt(PST,void *,int,void *,int *);
/* PST_DRIFT */
struct inDrift {
double dDelta;
FLOAT fCenter[3];
int bPeriodic;
int bInflowOutflow;
int bFandG;
FLOAT fCentMass;
double dTime;
#ifdef SLIDING_PATCH
PATCH_PARAMS PP;
#endif
};
void pstDrift(PST,void *,int,void *,int *);
/* PST_UPDATEUDOT */
struct inUpdateuDot {
double duDelta;
double dTime;
double z;
UHC uhc;
int iGasModel;
double dResolveJeans;
int bUpdateState;
};
struct outUpdateuDot {
double Time;
double MaxTime;
double SumTime;
int nSum;
};
void pstUpdateuDot(PST,void *,int,void *,int *);
/* PST_KICK */
struct inKick {
double dvFacOne;
double dvFacTwo;
double dvPredFacOne;
double dvPredFacTwo;
double duDelta;
double duPredDelta;
double duDotLimit;
int iGasModel;
double z;
double dTimeEnd;
UHC uhc;
};
struct outKick {
double Time;
double MaxTime;
double SumTime;
int nSum;
};
void pstKick(PST,void *,int,void *,int *);
struct inEmergencyAdjust {
int iRung;
int iMaxRung;
double dDelta;
double dDeltaThresh;
};
struct outEmergencyAdjust {
int nUn;
int iMaxRungOut;
int nMaxRung;
int iMaxRungIdeal;
};
void pstEmergencyAdjust(PST,void *,int,void *,int *);
/* PST_KICKPATCH */
struct inKickPatch {
int bOpen;
double dOrbFreq;
double dvFacOne;
double dvFacTwo;
};
void pstKickPatch(PST,void *,int,void *,int *);
/* PST_READCHECK */
struct inReadCheck {
int iVersion;
int iOffset;
int nFileStart;
int nFileEnd;
int nDark;
int nGas;
int nStar;
int iOrder;
int nIOProcessor;
float fExtraStore;
FLOAT fPeriod[3];
FLOAT dxInflow, dxOutflow;
char achInFile[PST_FILENAME_SIZE];
};
void pstReadCheck(PST,void *,int,void *,int *);
/* PST_WRITECHECK */
struct inWriteCheck {
int iOffset;
int nIOProcessor;
char achOutFile[PST_FILENAME_SIZE];
};
void pstWriteCheck(PST,void *,int,void *,int *);
/* PST_OUTPUTBLACKHOLES */
void pstOutputBlackHoles(PST pst,void *vin,int nIn,void *vout,int *pnOut);
/* PST_SETSOFT */
struct inSetSoft {
double dSoft;
};
void pstSetSoft(PST,void *,int,void *,int *);
/* PST_PHYSICALSOFT */
struct inPhysicalSoft {
double dSoftMax;
double dFac;
int bSoftMaxMul;
};
void pstPhysicalSoft(PST,void *,int,void *,int *);
/* PST_PREVARIABLESOFT */
struct inPreVariableSoft {
int iVariableSoftType;
};
void pstPreVariableSoft(PST,void *,int,void *,int *);
/* PST_POSTVARIABLESOFT */
struct inPostVariableSoft {
double dSoftMax;
int bSoftMaxMul;
int iVariableSoftType;
};
void pstPostVariableSoft(PST,void *,int,void *,int *);
/* PST_SETTOTAL */
struct outSetTotal {
int nTotal;
};
void pstSetTotal(PST,void *,int,void *,int *);
/* PST_SETTOTALS */
struct outSetTotals {
int nGas;
int nStar;
int nDark;
};
void pstSetTotals(PST,void *,int,void *,int *);
/* PST_CALCCELL */
struct inCalcCell {
int iOrder;
FLOAT rcm[3];
};
struct outCalcCell {
struct pkdCalcCellStruct mom;
};
void pstCalcCell(PST,void *,int,void *,int *);
/* PST_COLCELLS */
struct inColCells {
int iCell;
int nCell;
};
void pstColCells(PST,void *,int,void *,int *);
/* PST_DISTRIBCELLS */
void pstDistribCells(PST,void *,int,void *,int *);
/* PST_CALCROOT */
struct ioCalcRoot {
struct ilCellNewt ilcn;
};
void pstCalcRoot(PST,void *,int,void *,int *);
/* PST_DISTRIBROOT */
void pstDistribRoot(PST,void *,int,void *,int *);
/* PST_ONENODEREADINIT */
void pstOneNodeReadInit(PST pst,void *vin,int nIn,void *vout,int *pnOut);
/* PST_SWAPALL */
void pstSwapAll(PST pst,void *vin,int nIn,void *vout,int *pnOut);
/* PST_MASSCHECK */
struct outMassCheck {
double dMass;
};
void pstMassCheck(PST,void *,int,void *,int *);
struct outMassMetalsEnergyCheck {
double dTotMass;
double dTotMetals;
double dTotOx;
double dTotFe;
double dTotEnergy;
};
void pstMassMetalsEnergyCheck(PST,void *,int,void *,int *);
struct inActiveTypeOrder {
unsigned int iTestMask;
};
void pstActiveTypeOrder(PST,void *,int,void *,int *);
/* PST_ACTIVEORDER */
void pstActiveOrder(PST,void *,int,void *,int *);
/* PST_SETRUNG */
struct inSetRung {
int iRung;
};
void pstSetRung(PST,void *,int,void *,int *);
struct inDensCheck {
int iRung;
int bGreater;
int iMeasure;
};
struct outDensCheck {
double dMaxDensError;
double dAvgDensError;
int nError;
int nTotal;
};
void pstDensCheck(PST,void *,int,void *,int *);
struct inBallMax {
int iRung;
int bGreater;
double dhFac;
};
void pstBallMax(PST,void *,int,void *,int *);
/* PST_ACTIVERUNG */
struct inActiveRung {
int iRung;
int bGreater;
};
void pstActiveRung(PST,void *,int,void *,int *);
/* PST_CURRRUNG */
struct inCurrRung {
int iRung;
};
struct outCurrRung {
int iCurrent;
};
void pstCurrRung(PST,void *,int,void *,int *);
/* PST_GRAVSTEP */
struct inGravStep {
double dEta;
};
void pstGravStep(PST,void *,int,void *,int *);
/* PST_ACCELSTEP */
struct inAccelStep {
double dEta;
double dVelFac;
double dAccFac;
int bDoGravity;
int bEpsAcc;
int bSqrtPhi;
double dhMinOverSoft;
};
void pstAccelStep(PST,void *,int,void *,int *);
/* PST_DENSITYSTEP */
struct inDensityStep {
double dEta;
double dRhoFac;
};
void pstDensityStep(PST,void *,int,void *,int *);
/* PST_RUNGSTATS */
struct inRungStats {
int iRung;
};
struct outRungStats {
int nParticles;
};
void pstRungStats(PST,void *,int,void *,int *);
/* PST_GETMAP */
struct inGetMap {
int nStart;
};
void pstGetMap(PST,void *,int,void *,int *);
/* PST_COOLVELOCITY */
struct inCoolVelocity {
int nSuperCool;
double dCoolFac;
double dCoolDens;
double dCoolMaxDens;
};
void pstCoolVelocity(PST,void *,int,void *,int *);
struct inActiveType {
unsigned int iFilterMask;
unsigned int iTestMask;
unsigned int iSetMask;
int iRung;
int bGreater;
};
void pstActiveExactType(PST,void *,int,void *,int *);
void pstActiveType(PST,void *,int,void *,int *);
void pstSetType(PST,void *,int,void *,int *);
void pstResetType(PST,void *,int,void *,int *);
void pstCountType(PST,void *,int,void *,int *);
void pstActiveMaskRung(PST,void *,int,void *,int *);
void pstActiveTypeRung(PST,void *,int,void *,int *);
#define PST_SETTYPEFROMFILEMAXLEN 160
struct inSetTypeFromFile {
int iSetMask;
int biGasOrder;
char file[PST_SETTYPEFROMFILEMAXLEN];
};
struct outSetTypeFromFile {
int niOrder;
int nSet;
int nSetiGasOrder;
};
void pstSetTypeFromFile(PST,void *,int,void *,int *);