Source

enzo-3.0 / src / enzo / control / SetDefaultGlobalValues.C

The active_particles branch has multiple heads

Full commit
  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
/***********************************************************************
/
/  SETS THE DEFAULT GLOBAL VALUES
/
/  written by: Greg Bryan
/  date:       November, 1994
/  modified:   Robert Harkness
/  date:       February 29th, 2008
/
/  PURPOSE:
/
/  RETURNS: SUCCESS or FAIL
/
************************************************************************/
 
// This routine intializes a new simulation based on the parameter file.
//
 
#include "preincludes.h"
#include "ErrorExceptions.h"
#include "macros_and_parameters.h"
#include "typedefs.h"
#include "global_data.h"
#include "TopGridData.h"
#include "StarParticleData.h"
#include "PreGalaxyParticleList.h"

/* character strings */
 
char DefaultDimUnits[] = "cm";
char *DefaultDimLabel[] = {"x", "y", "z"};
 
char DefaultRestartName[] = "restart";
char DefaultDataName[] = "data";
char DefaultHistoryName[] = "history";
char DefaultRedshiftName[] = "RedshiftOutput";
char DefaultNewMovieName[] = "MoviePack";
char DefaultTracerParticleName[] = "TracerOutput";
char DefaultExtraName[] = "ExtraDumpXX";
char DefaultExtraDir[]="ED00"; 

char DefaultRestartDir[] = "RS";
char DefaultDataDir[] = "DD";
char DefaultHistoryDir[] = "HD";
char DefaultRedshiftDir[] = "RD";
char DefaultTracerParticleDir[] = "TD";
 
 
 
 
int SetDefaultGlobalValues(TopGridData &MetaData)
{
 
  /* declarations */
 
  const float Pi = 3.14159;
  int dim, i, j;
 
  huge_number               = 1.0e+20;
  tiny_number               = 1.0e-20;

  /* set the default MetaData values. */
 
  MetaData.CycleNumber     = 0;
  MetaData.SubcycleNumber     = 0;
  MetaData.Time            = 0.0;
  MetaData.CPUTime         = 0.0;
 
  MetaData.StopTime        = FLOAT_UNDEFINED;  // This must be set be the user
  MetaData.StopCycle       = 100000;            // 10000 timesteps
  MetaData.StopSteps       = 10000;            // 10000 timesteps
  MetaData.StopCPUTime     = 720.0*3600.0;     // 30 days
  MetaData.ResubmitOn      = FALSE;
  MetaData.ResubmitCommand = NULL;
 
  MetaData.MaximumTopGridTimeStep = huge_number;

  MetaData.TimeLastRestartDump = 0.0;
  MetaData.dtRestartDump       = FLOAT_UNDEFINED;
  MetaData.TimeLastDataDump    = FLOAT_UNDEFINED;
  MetaData.dtDataDump          = 0.0;
  MetaData.TimeLastHistoryDump = FLOAT_UNDEFINED;
  MetaData.dtHistoryDump       = 0.0;
  MetaData.TimeLastTracerParticleDump = FLOAT_UNDEFINED;
  MetaData.dtTracerParticleDump       = 0.0;
  MetaData.TimeLastInterpolatedDataDump    = FLOAT_UNDEFINED;
  MetaData.dtInterpolatedDataDump          = 0.0;
  MetaData.WroteData           = FALSE;
 
  MetaData.CycleLastRestartDump = 0;
  MetaData.CycleSkipRestartDump = 0;
  MetaData.CycleLastDataDump    = INT_UNDEFINED;
  MetaData.CycleSkipDataDump    = 0;
  MetaData.SubcycleLastDataDump    = 0;
  MetaData.SubcycleSkipDataDump    = 0;
  MetaData.CycleLastHistoryDump = INT_UNDEFINED;
  MetaData.CycleSkipHistoryDump = 0;
  MetaData.CycleSkipGlobalDataDump = 0; //AK
 
  MetaData.OutputFirstTimeAtLevel = 0; // zero is off
  MetaData.StopFirstTimeAtLevel   = 0; // zero is off
 
  MetaData.NumberOfOutputsBeforeExit = 0;
  MetaData.OutputsLeftBeforeExit     = 0;

  MetaData.RestartDumpNumber   = 0;            // starting restart id number
  MetaData.RestartDumpName     = DefaultRestartName;
  MetaData.RestartDumpDir      = DefaultRestartDir;
  MetaData.DataDumpNumber      = 0;
  MetaData.DataDumpName        = DefaultDataName;
  MetaData.DataDumpDir         = DefaultDataDir;
  MetaData.HistoryDumpNumber   = 0;
  MetaData.HistoryDumpName     = DefaultHistoryName;
  MetaData.HistoryDumpDir      = DefaultHistoryDir;
  MetaData.TracerParticleDumpNumber = 0;
  MetaData.TracerParticleDumpName   = DefaultTracerParticleName;
  MetaData.TracerParticleDumpDir    = DefaultTracerParticleDir;
  //MetaData.RedshiftDumpNumber  = 0;
  MetaData.RedshiftDumpName    = DefaultRedshiftName;
  MetaData.RedshiftDumpDir     = DefaultRedshiftDir;
  MetaData.ExtraDumpDir        = DefaultExtraDir;
  MetaData.ExtraDumpName        = DefaultExtraName;

  MetaData.MetaDataIdentifier    = NULL;
  MetaData.SimulationUUID        = NULL;
  MetaData.RestartDatasetUUID    = NULL;
  MetaData.InitialConditionsUUID = NULL;

  MetaData.LocalDir            = NULL;
  MetaData.GlobalDir           = NULL;

  LoadBalancing = 1;     //On, memory equalization method
  LoadBalancingCycleSkip = 10;  // Load balance root grids every 10 cycles
  ResetLoadBalancing = FALSE;
  CoresPerNode = 1;
  PreviousMaxTask = 0;
  LoadBalancingMinLevel = 0;     //All Levels
  LoadBalancingMaxLevel = MAX_DEPTH_OF_HIERARCHY;  //All Levels

  FileDirectedOutput = 1;

  // Default Hierarchy File IO settings (1 = ASCII; 2 = HDF5+ASCII)
  HierarchyFileInputFormat = 1;
  HierarchyFileOutputFormat = 2;

  for (i = 0;i < MAX_DEPTH_OF_HIERARCHY;i++) {
    RebuildHierarchyCycleSkip[i] = 1;
  }

  for (i = 0; i < MAX_TIME_ACTIONS; i++) {
    TimeActionType[i]      = 0;
    TimeActionRedshift[i]  = -1;
    TimeActionTime[i]      = 0;
    TimeActionParameter[i] = FLOAT_UNDEFINED;
  }
 
  for (i = 0; i < MAX_CUBE_DUMPS; i++) {
    CubeDumps[i] = NULL;
  }
 
  MetaData.StaticHierarchy     = TRUE;
  FastSiblingLocatorEntireDomain = TRUE;
 
  MetaData.TopGridRank = INT_UNDEFINED;
  for (dim = 0; dim < MAX_DIMENSION; dim++) {
    MetaData.TopGridDims[dim]                = INT_UNDEFINED;
    MetaData.LeftFaceBoundaryCondition[dim]  = reflecting;
    MetaData.RightFaceBoundaryCondition[dim] = reflecting;
  }
  MetaData.BoundaryConditionName = NULL;
 
  MetaData.GravityBoundary        = TopGridPeriodic;

#ifdef TRANSFER
  MetaData.RadHydroParameterFname = NULL;
#endif
 
  MetaData.ParticleBoundaryType   = periodic;  // only one implemented!
  MetaData.NumberOfParticles      = 0;         // no particles
 
  MetaData.CourantSafetyNumber    = 0.6;
  MetaData.PPMFlatteningParameter = 0;    // off
  MetaData.PPMDiffusionParameter  = 0;    // off
  MetaData.PPMSteepeningParameter = 0;    // off

  MetaData.FirstTimestepAfterRestart = TRUE;
 
  /* set the default global data. */
  CheckpointRestart         = 0;

  // Debug flag set in main
  ProblemType               = 0;                 // None
  HydroMethod               = PPM_DirectEuler;   //
  Gamma                     = 5.0/3.0;           // 5/3
  PressureFree              = FALSE;             // use pressure (duh)
  RefineBy                  = 4;                 // Refinement factor
  MaximumRefinementLevel    = 2;                 // three levels (w/ topgrid)
  MaximumGravityRefinementLevel = INT_UNDEFINED;
  MaximumParticleRefinementLevel = -1;            // unused if negative
  MustRefineRegionMinRefinementLevel = -1;        // unused if negative
  MetallicityRefinementMinLevel = -1;
  MetallicityRefinementMinMetallicity = 1.0e-5;
  MetallicityRefinementMinDensity = FLOAT_UNDEFINED;
  FluxCorrection            = TRUE;
  InterpolationMethod       = SecondOrderA;      // ?
  ConservativeInterpolation = TRUE;              // true for ppm
  MinimumEfficiency         = 0.2;               // between 0-1, usually ~0.1
  MinimumSubgridEdge        = 6;                 // min for acceptable subgrid
  MaximumSubgridSize        = 32768;             // max for acceptable subgrid
  SubgridSizeAutoAdjust     = TRUE; // true for adjusting maxsize and minedge
  OptimalSubgridsPerProcessor = 16;    // Subgrids per processor
  NumberOfBufferZones       = 1;
 
  for (i = 0; i < MAX_FLAGGING_METHODS; i++) {
    MinimumSlopeForRefinement[i]= 0.3;
    SlopeFlaggingFields[i] = INT_UNDEFINED;
    CellFlaggingMethod[i]       = INT_UNDEFINED;
    MinimumMassForRefinement[i] = FLOAT_UNDEFINED;   // usually set by:
    MinimumOverDensityForRefinement[i]       = 1.5;
    MinimumMassForRefinementLevelExponent[i] = 0;
  }
 
  for (dim = 0; dim < MAX_DIMENSION; dim++) {
    DomainLeftEdge[dim]             = 0.0;
    DomainRightEdge[dim]            = 1.0;
    GridVelocity[dim]               = 0.0;
    DimLabels[dim]                  = DefaultDimLabel[dim];
    DimUnits[dim]                   = DefaultDimUnits;
    RefineRegionLeftEdge[dim]       = FLOAT_UNDEFINED;
    RefineRegionRightEdge[dim]      = FLOAT_UNDEFINED;
    RefineRegionAutoAdjust          = FALSE;
    MetaData.NewMovieLeftEdge[dim]  = 0.0;
    MetaData.NewMovieRightEdge[dim] = 1.0;
    PointSourceGravityPosition[dim] = 0.0;
    MustRefineRegionLeftEdge[dim] = 0.0;
    MustRefineRegionRightEdge[dim] = 1.0;
  }
 
  for (i = 0; i < MAX_STATIC_REGIONS; i++) {
    StaticRefineRegionLevel[i] = INT_UNDEFINED;
    AvoidRefineRegionLevel[i]  = INT_UNDEFINED;
    for (dim = 0; dim < MAX_DIMENSION; dim++) {
      AvoidRefineRegionLeftEdge[i][dim] = FLOAT_UNDEFINED;
      AvoidRefineRegionRightEdge[i][dim] = FLOAT_UNDEFINED;
    }
  }

  /* For evolving refinement regions. */
  RefineRegionFile = NULL;
  RefineRegionTimeType = -1; /* 0=time bins 1=redshift bins*/
  for (i = 0; i < MAX_REFINE_REGIONS; i++) {
    EvolveRefineRegionTime[i] = FLOAT_UNDEFINED;
    for (j = 0; j < MAX_DIMENSION; j++) {
      EvolveRefineRegionLeftEdge[i][j]  = FLOAT_UNDEFINED;
      EvolveRefineRegionRightEdge[i][j] = FLOAT_UNDEFINED;
    }
  }

  DatabaseLocation = NULL;

 
  ParallelRootGridIO          = FALSE;
  ParallelParticleIO          = FALSE;
  Unigrid                     = FALSE;
  UnigridTranspose            = FALSE;
  NumberOfRootGridTilesPerDimensionPerProcessor = 1;
  PartitionNestedGrids        = FALSE;
  ExtractFieldsOnly           = TRUE;

  ExternalBoundaryIO          = FALSE;
  ExternalBoundaryTypeIO      = FALSE;
  ExternalBoundaryValueIO     = FALSE;
  SimpleConstantBoundary      = FALSE;

  debug1                      = 0;
  debug2                      = 0;

  TracerParticleOn            = 0;

  OutputOnDensity                  = 0;
  StartDensityOutputs              = 999;
  CurrentDensityOutput             = 999;
  IncrementDensityOutput           = 999;
  CurrentMaximumDensity            = -999;
 
  CubeDumpEnabled             = 0;

#ifdef STAGE_INPUT
  StageInput                  = 0;
#endif

  First_Pass                  = 0;

  MemoryLimit                 = 4000000000L;
 
  ExternalGravity             = FALSE;             // off
  ExternalGravityDensity      = 0.0;
  ExternalGravityRadius       = 0.0;

  UniformGravity              = FALSE;             // off
  UniformGravityDirection     = 0;                 // x-direction
  UniformGravityConstant      = 1.0;
 
  PointSourceGravity           = FALSE;             // off
  PointSourceGravityConstant   = 1.0;
  PointSourceGravityCoreRadius = 0.0;

  SelfGravity                 = FALSE;             // off
  SelfGravityGasOff           = FALSE;             // off
  AccretionKernal             = FALSE;             // off
  CopyGravPotential           = FALSE;             // off
  PotentialIterations         = 4;                 // ~4 is reasonable
  GravitationalConstant       = 4*Pi;              // G = 1
  S2ParticleSize              = 3.0;               // ~3 is reasonable
  GravityResolution           = 1.0;               // equivalent to grid
  ComputePotential            = FALSE;
  WritePotential              = FALSE;
  BaryonSelfGravityApproximation = TRUE;           // less accurate but faster

  GreensFunctionMaxNumber     = 1;                 // only one at a time
  GreensFunctionMaxSize       = 1;                 // not used yet
 
  DualEnergyFormalism         = FALSE;             // off
  DualEnergyFormalismEta1     = 0.001;             // typical 0.001
  DualEnergyFormalismEta2     = 0.1;               // 0.08-0.1
  ParticleCourantSafetyNumber = 0.5;
  RootGridCourantSafetyNumber = 1.0;
  RandomForcing               = FALSE;             // off //AK
  RandomForcingEdot           = -1.0;              //AK
  RandomForcingMachNumber     = 0.0;               //AK
  RadiativeCooling            = FALSE;             // off
  RadiativeCoolingModel       = 1;                 //1=cool_rates.in table lookup
                                                   //3=Koyama&Inutsuka 2002
  GadgetEquilibriumCooling    = FALSE;             // off
  RadiativeTransfer           = 0;                 // off
  RadiativeTransferFLD        = 0;                 // off
  ImplicitProblem             = 0;                 // off
  StarMakerEmissivityField    = 0;                 // off
  uv_param                    = 1.0e-5;            // mid-range value from Razoumov Norman 2002

  MultiSpecies                = FALSE;             // off
  NoMultiSpeciesButColors     = FALSE;             // off
  ThreeBodyRate               = 0;                 // ABN02
  CIECooling                  = 1;
  H2OpticalDepthApproximation = 1;
  H2FormationOnDust           = FALSE;
  GloverChemistryModel        = 0;                 // 0ff
  GloverRadiationBackground   = 0;
  GloverOpticalDepth          = 0;
  ShockMethod                 = 0;                 // off
  ShockTemperatureFloor       = 1.0;               // Set to 1K
  StorePreShockFields         = 0;
  FindShocksOnlyOnOutput      = 0;                 // Find at every cycle and 
                                                   // during output by default.
  RadiationFieldType          = 0;
  RadiationFieldRedshift      = 0.0;
  TabulatedLWBackground       = 0;
  RadiationFieldLevelRecompute = 0;
  RadiationData.RadiationShield = 0;
  AdjustUVBackground          = 1;
  AdjustUVBackgroundHighRedshift = 0;
  SetUVBAmplitude             = 1.0;
  SetHeIIHeatingScale         = 1.8;
  PhotoelectricHeating	      = 0;
  PhotoelectricHeatingRate    = 8.5e-26;           // ergs cm-3 s-1
  RadiationXRaySecondaryIon   = 0;
  RadiationXRayComptonHeating = 0;

  CoolData.alpha0             = 1.5;               // radiation spectral slope
  CoolData.f3                 = 1.0e-21;           // radiation normalization
  CoolData.f0to3                    = 0.1;
  CoolData.RadiationRedshiftOn      = 7.0;
  CoolData.RadiationRedshiftOff     = 0.0;
  CoolData.RadiationRedshiftFullOn  = 6.0;
  CoolData.RadiationRedshiftDropOff = 0.0;
  CoolData.HydrogenFractionByMass   = 0.76;
  /* The DToHRatio is by mass in the code, so multiply by 2. */
  CoolData.DeuteriumToHydrogenRatio = 2.0*3.4e-5; // Burles & Tytler 1998
  CoolData.SolarMetalFractionByMass = 0.02041;
  CoolData.NumberOfTemperatureBins = 600;
  CoolData.ih2co                   = 1;
  CoolData.ipiht                   = 1;
  CoolData.TemperatureStart        = 1.0;
  CoolData.TemperatureEnd          = 1.0e8;
  CoolData.comp_xray               = 0;
  CoolData.temp_xray               = 0;
  RateData.CaseBRecombination      = 0;   // default to case A rates
  RateData.NumberOfDustTemperatureBins = 250;
  RateData.DustTemperatureStart    = 1.0;
  RateData.DustTemperatureEnd      = 1500.0;

  CloudyCoolingData.CloudyCoolingGridRank          = 0;
  CloudyCoolingData.CloudyCoolingGridFile          = "";
  CloudyCoolingData.IncludeCloudyHeating           = 0;
  CloudyCoolingData.CMBTemperatureFloor            = 1;         // use CMB floor.
  CloudyCoolingData.CloudyElectronFractionFactor = 9.153959e-3; // calculated using Cloudy 07.02 abundances

  OutputCoolingTime = FALSE;
  OutputTemperature = FALSE;
  OutputDustTemperature = FALSE;

  OutputSmoothedDarkMatter = FALSE;
  SmoothedDarkMatterNeighbors = 32;

  OutputGriddedStarParticle = FALSE;

  ZEUSLinearArtificialViscosity    = 0.0;
  ZEUSQuadraticArtificialViscosity = 2.0;
  UseMinimumPressureSupport        = FALSE;
  MinimumPressureSupportParameter  = 100.0;
 
  //MinimumSlopeForRefinement        = 0.3;          // 30% change in value
  MinimumShearForRefinement        = 1.0;          //AK
  MinimumPressureJumpForRefinement = 0.33;         // As in PPM method paper
  MinimumEnergyRatioForRefinement  = 0.1;          // conservative!
  RefineByJeansLengthSafetyFactor  = 4.0;
  JeansRefinementColdTemperature  = -1.0;
  RefineByResistiveLengthSafetyFactor  = 2.0;
  ShockwaveRefinementMinMach = 1.3; // Only above M=1.3
  ShockwaveRefinementMinVelocity = 1.0e7; //1000 km/s
  ShockwaveRefinementMaxLevel = 0; 
  MustRefineParticlesRefineToLevel = 0;
  MustRefineParticlesRefineToLevelAutoAdjust = FALSE;
  MustRefineParticlesMinimumMass   = 0.0;
  ComovingCoordinates              = FALSE;        // No comoving coordinates
  StarParticleCreation             = FALSE;
  StarParticleFeedback             = FALSE;
  BigStarFormation                 = FALSE;
  BigStarFormationDone             = FALSE;
  BigStarSeparation                = 0.25;
  SimpleQ                          = 1e50;
  SimpleRampTime                   = 0.1;
  StarFormationOncePerRootGridTimeStep = FALSE;
  StarMakerTypeIaSNe               = FALSE;
  StarMakerPlanetaryNebulae        = FALSE;
  StarMakerOverDensityThreshold    = 100;          // times mean total density
  StarMakerSHDensityThreshold      = 7e-26;        // cgs density for rho_crit in Springel & Hernquist star_maker5
  StarMakerMassEfficiency          = 1;
  StarMakerMinimumMass             = 1.0e9;        // in solar masses
  StarMakerMinimumDynamicalTime    = 1.0e6;        // in years
  StarMassEjectionFraction         = 0.25;
  StarMetalYield                   = 0.02;
  StarEnergyToThermalFeedback      = 1.0e-5;
  StarEnergyToStellarUV            = 3.0e-6;
  StarEnergyToQuasarUV             = 5.0e-6;
  StarFeedbackDistRadius           = 0;
  StarFeedbackDistCellStep         = 0;
  StarFeedbackDistTotalCells       = 1;
  MultiMetals                      = FALSE;
  NumberOfParticleAttributes       = INT_UNDEFINED;
  ParticleTypeInFile               = TRUE;
  ReadGhostZones                   = FALSE;
  WriteGhostZones                  = FALSE;
  OutputParticleTypeGrouping       = FALSE;

  IsotropicConduction = FALSE;
  AnisotropicConduction = FALSE;
  IsotropicConductionSpitzerFraction = 1.0;
  AnisotropicConductionSpitzerFraction = 1.0;
  ConductionCourantSafetyNumber = 0.5;

  PythonTopGridSkip                = 0;
  PythonSubcycleSkip               = 1;
  PythonReloadScript               = FALSE;
  
  // EnzoTiming Dump Frequency
  TimingCycleSkip                  = 1;

  InlineHaloFinder                 = FALSE;
  HaloFinderSubfind                = FALSE;
  HaloFinderOutputParticleList     = FALSE;
  HaloFinderRunAfterOutput         = TRUE;
  HaloFinderMinimumSize            = 50;
  HaloFinderLinkingLength          = 0.1;
  HaloFinderCycleSkip              = 3;
  HaloFinderTimestep               = FLOAT_UNDEFINED;
  HaloFinderLastTime               = 0.0;

  StarClusterUseMetalField         = FALSE;
  StarClusterUnresolvedModel       = FALSE;
  StarClusterHeliumIonization      = FALSE;
  StarClusterMinDynamicalTime      = 10e6;         // in years
  StarClusterIonizingLuminosity    = 1e47;         // ph/s / Msun
  StarClusterSNEnergy              = 6.8e48;       // erg / Msun (Woosley&Weaver86)
  StarClusterSNRadius              = 10;           // pc
  StarClusterFormEfficiency        = 0.1;
  StarClusterMinimumMass           = 1000;         // Msun
  StarClusterCombineRadius         = 10;           // pc
  for (dim = 0; dim < MAX_DIMENSION; dim++) {
    StarClusterRegionLeftEdge[dim] = 0.0;
    StarClusterRegionRightEdge[dim] = 1.0;
  }

  PopIIIStarMass                   = 100;
  PopIIIInitialMassFunction        = FALSE;
  PopIIIInitialMassFunctionSeed    = INT_UNDEFINED;
  PopIIIInitialMassFunctionCalls   = 0;
  PopIIIHeliumIonization           = FALSE;
  PopIIILowerMassCutoff            = 1.0;
  PopIIIUpperMassCutoff            = 300.0;
  PopIIIInitialMassFunctionSlope   = -1.3;         // high mass slope
  PopIIIBlackHoles                 = FALSE;
  PopIIIBHLuminosityEfficiency     = 0.1;
  PopIIIOverDensityThreshold       = 1e6;          // times mean total density
  PopIIIH2CriticalFraction         = 5e-4;
  PopIIIMetalCriticalFraction      = 1e-4;
  PopIIISupernovaRadius            = 1;            // pc
  PopIIISupernovaUseColour         = FALSE;
  PopIIISupernovaMustRefine        = FALSE;
  PopIIISupernovaMustRefineResolution = 32;
  PopIIIColorDensityThreshold      = 1e6;          // times mean total density
  PopIIIColorMass                  = 1e6;          // total mass to color
  IMFData                          = NULL;

  MBHAccretion                     = FALSE;        // 1: Bondi rate, 2: fix temperature, 3: fix rate, 4: Bondi with v_rel=0, 5: Bondi with v_rel=0 and vorticity
  MBHAccretionRadius               = 50;           // pc
  MBHAccretingMassRatio            = 1.0;          // 100%, check Star_CalculateMassAccretion.C
  MBHAccretionFixedTemperature     = 3e5;          // K,       for MBHAccretion = 2
  MBHAccretionFixedRate            = 1e-3;         // Msun/yr, for MBHAccretion = 3
  MBHTurnOffStarFormation          = FALSE;        // check Grid_StarParticleHandler.C
  MBHCombineRadius                 = 50;           // pc
  MBHMinDynamicalTime              = 10e6;         // in years
  MBHMinimumMass                   = 1e3;          // Msun

  MBHFeedback                      = FALSE;        // 1: isotropic thermal, 2: jet along z, 3: jet along L, 4: jet along L with 10deg noise, 5: jet along random direction
  MBHFeedbackRadiativeEfficiency   = 0.1;          // Shakura & Sunyaev (1973)
  MBHFeedbackEnergyCoupling        = 0.05;         // Springel (2005), Di Matteo (2005)
  MBHFeedbackMassEjectionFraction  = 0.1;          // 10%, check Star_CalculateFeedbackParameters.C
  MBHFeedbackMetalYield            = 0.02;         // 2%, check Star_CalculateFeedbackParameters.C
  MBHFeedbackThermalRadius         = 50;           // pc
  MBHFeedbackJetsThresholdMass     = 10;           // Msun

  /* Star Class MBH Paricle IO (PARTICLE_TYPE_MBH) */
  MBHParticleIO                    = FALSE;
  MBHParticleIOFilename            = (char*) "mbh_particle_io.dat";
  MBHInsertLocationFilename        = (char*) "mbh_insert_location.in";
  OutputWhenJetsHaveNotEjected     = FALSE;

  H2StarMakerEfficiency = 0.01;
  H2StarMakerNumberDensityThreshold = 0.0;
  H2StarMakerMinimumMass = 0.0;
  H2StarMakerMinimumH2FractionForStarFormation = 1e-5;
  H2StarMakerStochastic = 1;
  H2StarMakerUseSobolevColumn = 0;
  H2StarMakerSigmaOverR = 1.0/30.0;
  H2StarMakerAssumeColdWarmPressureBalance = 0;
  H2StarMakerH2DissociationFlux_MW = 1.0;
  H2StarMakerH2FloorInColdGas = 0.0;
  H2StarMakerColdGasTemperature = 1e4;

  GMCParticleRNGSeed               = INT_UNDEFINED;
  GMCParticleRNGCalls              = 0;

  NumberOfParticleAttributes       = INT_UNDEFINED;
  AddParticleAttributes            = FALSE;
  LastSupernovaTime                = FLOAT_UNDEFINED;

  for (i = 0; i<MAX_MOVIE_FIELDS; i++)
    MovieDataField[i] = INT_UNDEFINED;
  MovieSkipTimestep = INT_UNDEFINED;
  NewMovieName = DefaultNewMovieName;
  NewMovieDumpNumber = 0;
  NewMovieParticleOn = FALSE;
  Movie3DVolumes  = FALSE;
  MovieVertexCentered = FALSE;
  MetaData.MovieTimestepCounter      = 0;

  ran1_init = 0;
  rand_init = 0;

  SinkMergeDistance     = 1e16;
  SinkMergeMass         = 0.1;
  TotalSinkMass         = 0.0;
  StellarWindFeedback   = 0;
  StellarWindTurnOnMass = 0.1;
  MSStellarWindTurnOnMass = 10.0;

  UseHydro		     = 1;
  Coordinate		     = Cartesian;
  NSpecies		     = INT_UNDEFINED;
  NColor		     = INT_UNDEFINED;
  Theta_Limiter		     = 1.5;
  RKOrder		     = 2;
  UsePhysicalUnit	     = 0;
  NEQ_HYDRO		     = 5;
  NEQ_MHD		     = 9;
  SmallRho		     = 1e-30;
  SmallP		     = 1e-35;
  SmallEint		     = 1e-30;
  SmallT		     = 1e-10;
  MaximumAlvenSpeed	     = 1e30;
  RiemannSolver		     = INT_UNDEFINED;
  RiemannSolverFallback      = 1;
  ReconstructionMethod	     = INT_UNDEFINED;
  PositiveReconstruction     = FALSE;
  ConservativeReconstruction = 0;
  EOSType		     = 0;
  EOSSoundSpeed		     = 2.65e4;
  EOSCriticalDensity	     = 1e-13;
  EOSGamma		     = 1.667;
  Mu			     = 0.6;
  DivBDampingLength          = 1.;
  CoolingCutOffDensity1	     = 0;
  CoolingCutOffDensity2	     = 1e10;
  CoolingCutOffTemperature   = 0.0;
  CoolingPowerCutOffDensity1 = 0;
  CoolingPowerCutOffDensity2 = 1e10;
  UseCUDA		     = 0;
  UseFloor		     = 0;
  UseViscosity		     = 0;
  ViscosityCoefficient       = 0.;
  UseAmbipolarDiffusion	     = 0;
  UseResistivity	     = 0;

  StringKick = 0;
  StringKickDimension = 0;

  iden	= 0;
  ivx	= 1;
  ivy	= 2;
  ivz	= 3;
  ietot = 4;
  ieint = 0;
  iBx	= 5;
  iBy	= 6;
  iBz	= 7;
  iPhi	= 8;
  iD	= 0;
  iS1	= 1;
  iS2	= 2;
  iS3	= 3;
  iEtot = 4;
  iEint = 0;

  UseDivergenceCleaning		   = 0;
  DivergenceCleaningBoundaryBuffer = 0;
  DivergenceCleaningThreshold	   = 0.001;
  PoissonApproximationThreshold	   = 0.001;
  PoissonBoundaryType	   = 0;

  UseDrivingField   = 0;
  DrivingEfficiency = 1.0;

  /* End of Stanford Hydro additions */

  /* test problem values */
  TestProblemData.HydrogenFractionByMass = 0.76;

  /* The DToHRatio is by mass in the code, so multiply by 2. */
  TestProblemData.DeuteriumToHydrogenRatio = 2.0*3.4e-5; // Burles & Tytler 1998 

  // multispecies default values assume completely neutral gas with primordial D/H ratio
  TestProblemData.MultiSpecies = 0;
  TestProblemData.HI_Fraction = 1.0;
  TestProblemData.HII_Fraction = tiny_number;
  TestProblemData.HeI_Fraction = 1.0;
  TestProblemData.HeII_Fraction = tiny_number;
  TestProblemData.HeIII_Fraction = tiny_number;
  TestProblemData.HM_Fraction = tiny_number;
  TestProblemData.H2I_Fraction = tiny_number;
  TestProblemData.H2II_Fraction = tiny_number;
  TestProblemData.DI_Fraction = 2.0*3.4e-5;
  TestProblemData.DII_Fraction = tiny_number;
  TestProblemData.HDI_Fraction = tiny_number;

  // This is for ionized gas (within a supernova blast, for example)
  TestProblemData.HI_Fraction_Inner = 1.0;
  TestProblemData.HII_Fraction_Inner = tiny_number;
  TestProblemData.HeI_Fraction_Inner = 1.0;
  TestProblemData.HeII_Fraction_Inner = tiny_number;
  TestProblemData.HeIII_Fraction_Inner = tiny_number;
  TestProblemData.HM_Fraction_Inner = tiny_number;
  TestProblemData.H2I_Fraction_Inner = tiny_number;
  TestProblemData.H2II_Fraction_Inner = tiny_number;
  TestProblemData.DI_Fraction_Inner = 2.0*3.4e-5;
  TestProblemData.DII_Fraction_Inner = tiny_number;
  TestProblemData.HDI_Fraction_Inner = tiny_number;

  TestProblemData.UseMetallicityField = 0;
  TestProblemData.MetallicityField_Fraction = tiny_number;
  TestProblemData.MetallicitySNIaField_Fraction = tiny_number;

  TestProblemData.UseMassInjection = 0;
  TestProblemData.InitialHydrogenMass = tiny_number;
  TestProblemData.InitialDeuteriumMass = tiny_number;
  TestProblemData.InitialHeliumMass = tiny_number;
  TestProblemData.InitialMetalMass = tiny_number;

  TestProblemData.MultiMetals = 0;
  TestProblemData.MultiMetalsField1_Fraction = tiny_number;
  TestProblemData.MultiMetalsField2_Fraction = tiny_number;

  TestProblemData.GloverChemistryModel = 0;
  // This is for the gas in the surrounding medium, for the blast wave problem.
  TestProblemData.CI_Fraction = tiny_number;
  TestProblemData.CII_Fraction = tiny_number;
  TestProblemData.OI_Fraction = tiny_number;
  TestProblemData.OII_Fraction = tiny_number;
  TestProblemData.SiI_Fraction = tiny_number;
  TestProblemData.SiII_Fraction = tiny_number;
  TestProblemData.SiIII_Fraction = tiny_number;
  TestProblemData.CHI_Fraction = tiny_number;
  TestProblemData.CH2I_Fraction = tiny_number;
  TestProblemData.CH3II_Fraction = tiny_number;
  TestProblemData.C2I_Fraction = tiny_number;
  TestProblemData.COI_Fraction = tiny_number;
  TestProblemData.HCOII_Fraction = tiny_number;
  TestProblemData.OHI_Fraction = tiny_number;
  TestProblemData.H2OI_Fraction = tiny_number;
  TestProblemData.O2I_Fraction = tiny_number;

  // This is for the gas in the region where the blast wave energy is injected
  TestProblemData.CI_Fraction_Inner = tiny_number;
  TestProblemData.CII_Fraction_Inner = tiny_number;
  TestProblemData.OI_Fraction_Inner = tiny_number;
  TestProblemData.OII_Fraction_Inner = tiny_number;
  TestProblemData.SiI_Fraction_Inner = tiny_number;
  TestProblemData.SiII_Fraction_Inner = tiny_number;
  TestProblemData.SiIII_Fraction_Inner = tiny_number;
  TestProblemData.CHI_Fraction_Inner = tiny_number;
  TestProblemData.CH2I_Fraction_Inner = tiny_number;
  TestProblemData.CH3II_Fraction_Inner = tiny_number;
  TestProblemData.C2I_Fraction_Inner = tiny_number;
  TestProblemData.COI_Fraction_Inner = tiny_number;
  TestProblemData.HCOII_Fraction_Inner = tiny_number;
  TestProblemData.OHI_Fraction_Inner = tiny_number;
  TestProblemData.H2OI_Fraction_Inner = tiny_number;
  TestProblemData.O2I_Fraction_Inner = tiny_number;

  TestProblemData.MinimumHNumberDensity = 1;
  TestProblemData.MaximumHNumberDensity = 1e6;
  TestProblemData.MinimumMetallicity    = 1e-6;
  TestProblemData.MaximumMetallicity    = 1;
  TestProblemData.MinimumTemperature    = 10;
  TestProblemData.MaximumTemperature    = 1e7;
  TestProblemData.ResetEnergies         = 1;

  // This should only be false for analysis.
  // It could also be used (cautiously) for other purposes.
  LoadGridDataAtStart = TRUE;

  IsothermalSoundSpeed = 1.0;
  RefineByJeansLengthUnits = 0;

  MetalCooling = FALSE;
  MetalCoolingTable = (char*) "metal_cool.dat";

#ifdef USE_PYTHON
  NumberOfPythonCalls = 0;
  NumberOfPythonTopGridCalls = 0;
  NumberOfPythonSubcycleCalls = 0;
  grid_dictionary = PyDict_New();
  old_grid_dictionary = PyDict_New();
  hierarchy_information = PyDict_New();
  yt_parameter_file = PyDict_New();
  conversion_factors = PyDict_New();
  my_processor = PyLong_FromLong((Eint) MyProcessorNumber);
#endif

  /* Some stateful variables for EvolveLevel */
  for(i = 0; i < MAX_DEPTH_OF_HIERARCHY; i++) {
    LevelCycleCount[i] = 0;
    dtThisLevelSoFar[i] = dtThisLevel[i] = 0.0;
  }

  /* Shearing Boundary Conditions variables */

  AngularVelocity=0.001;
  VelocityGradient=1.0;
  ShearingBoundaryDirection=-1;
  ShearingVelocityDirection=-1;
  ShearingBoxProblemType = 0; 
  useMHD=0;

  for(int i=0; i<MAX_EXTRA_OUTPUTS; i++) ExtraOutputs[i]=INT_UNDEFINED;
  MoveParticlesBetweenSiblings = TRUE;

  /* Particle Splitter */

  ParticleSplitterIterations = FALSE;
  ParticleSplitterChildrenParticleSeparation = 1.0;

  /* Magnetic Field Resetter */

  ResetMagneticField = FALSE;
  for (dim = 0; dim < MAX_DIMENSION; dim++) {
    ResetMagneticFieldAmplitude[dim] = 0.0;   // in Gauss
  }  

  VelAnyl                     = 0;
  BAnyl                     = 0;

  for (i = 0; i < MAX_ACTIVE_PARTICLE_TYPES; i++) EnabledActiveParticles[i] = NULL;
  EnabledActiveParticlesCount = 0;
  UnfulfilledStarFormationMass = 0;
  NextActiveParticleID = INT_UNDEFINED;
  NumberOfActiveParticles = 0;

  /* For Galaxy Particles */
  NumberOfGalaxyParticlesToInsert = 0;
  PreGalaxyParticles = NULL;

  /* Gas drag parameters */
  UseGasDrag = 0;
  GasDragCoefficient = 0.;

  return SUCCESS;
}