43 new commits in enzo-dev:
https://bitbucket.org/enzo/enzo-dev/commits/bb593387aec8/
Changeset: bb593387aec8
Branch: week-of-code
User: brittonsmith
Date: 2018-05-14 21:00:57+00:00
Summary: Adding parameter files for amr cosmology.
Affected #: 2 files
diff -r 236b238081a5 -r bb593387aec8 run/CosmologyTest/amr_cosmology/amr_cosmology.conf
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/amr_cosmology.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = yes
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r 236b238081a5 -r bb593387aec8 run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
@@ -0,0 +1,129 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0441
+CosmologySimulationOmegaCDMNow = 0.2239
+CosmologySimulationDensityName = GridDensity
+CosmologySimulationVelocity1Name = GridVelocities_x
+CosmologySimulationVelocity2Name = GridVelocities_y
+CosmologySimulationVelocity3Name = GridVelocities_z
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+CosmologySimulationUseMetallicityField = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 5
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+OutputCoolingTime = 1
+OutputTemperature = 1
+
+CosmologyOutputRedshift[0] = 0.100
+CosmologyOutputRedshift[1] = 0.089
+CosmologyOutputRedshift[2] = 0.078
+CosmologyOutputRedshift[3] = 0.067
+CosmologyOutputRedshift[4] = 0.057
+CosmologyOutputRedshift[5] = 0.047
+CosmologyOutputRedshift[6] = 0.037
+CosmologyOutputRedshift[7] = 0.027
+CosmologyOutputRedshift[8] = 0.017
+CosmologyOutputRedshift[9] = 0.007
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# microphysics parameters
+#
+RadiativeCooling = 1
+use_grackle = 1
+MultiSpecies = 0 // sets grackle.primordial_chemistry
+MetalCooling = 1 // sets grackle.metal_cooling
+grackle_data_file = CloudyData_UVB=HM2012.h5
+UVbackground = 1
+CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
+
+#
+# star formation parameters
+#
+StarParticleCreation = 1
+StarParticleFeedback = 1
+StarMakerOverDensityThreshold = 100
+StarMakerMinimumMass = 1e6
+StarMakerMinimumDynamicalTime = 1e6
+StarMakerMassEfficiency = 0.1
+StarMassEjectionFraction = 0.25
+StarMetalYield = 0.1
+StarEnergyToThermalFeedback = 1e-5
+StarFeedbackDistRadius = 1
+StarFeedbackDistCellStep = 3
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
https://bitbucket.org/enzo/enzo-dev/commits/27686765540b/
Changeset: 27686765540b
Branch: week-of-code
User: dkoh
Date: 2018-05-14 21:15:48+00:00
Summary: adding hmf test
Affected #: 1 file
diff -r bb593387aec8 -r 27686765540b run/CosmologyTest/amr_cosmology/test_hmf.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_hmf.py
@@ -0,0 +1,46 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+
+def test_hmf():
+ es = yt.simulation('amr_cosmology.enzo','Enzo')
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'data.h5'
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds,filename,data)
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ asswert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ asswert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+ ds = yt.load('data.h5')
+ masses = ds.data['masses']
+ num = ds.data['n_sim']
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig('hmf.png',format='png')
+
https://bitbucket.org/enzo/enzo-dev/commits/4ac027429d3b/
Changeset: 4ac027429d3b
Branch: week-of-code
User: brittonsmith
Date: 2018-05-14 21:26:51+00:00
Summary: Adding dm-only parameter files.
Affected #: 2 files
diff -r bb593387aec8 -r 4ac027429d3b run/CosmologyTest/dm_only/dm_only.conf
--- /dev/null
+++ b/run/CosmologyTest/dm_only/dm_only.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = no
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r bb593387aec8 -r 4ac027429d3b run/CosmologyTest/dm_only/dm_only.enzo
--- /dev/null
+++ b/run/CosmologyTest/dm_only/dm_only.enzo
@@ -0,0 +1,85 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0
+CosmologySimulationOmegaCDMNow = 0.268
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 5
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
https://bitbucket.org/enzo/enzo-dev/commits/081c36e80b6e/
Changeset: 081c36e80b6e
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 13:26:47+00:00
Summary: adding test of number of data dumps for cosmology test
Affected #: 1 file
diff -r bb593387aec8 -r 081c36e80b6e run/CosmologyTest/amr_cosmology/test_output_number.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_output_number.py
@@ -0,0 +1,27 @@
+import yt
+import numpy as np
+from yt.utilities.answer_testing.framework import assert_equal
+import os,glob
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+
+def test_output_number():
+ ds = yt.load('DD0000/DD0000')
+
+ DDnum = len(glob.glob('DD????/DD????'))
+ RDnum = len(glob.glob('RD????/RD????'))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ assert_equal(output_data['num_files'], ds_comp.data['num_files'])
+
+ return
+
https://bitbucket.org/enzo/enzo-dev/commits/49396e07ad22/
Changeset: 49396e07ad22
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 13:27:04+00:00
Summary: merge
Affected #: 1 file
diff -r 081c36e80b6e -r 49396e07ad22 run/CosmologyTest/amr_cosmology/test_hmf.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_hmf.py
@@ -0,0 +1,46 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+
+def test_hmf():
+ es = yt.simulation('amr_cosmology.enzo','Enzo')
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'data.h5'
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds,filename,data)
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ asswert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ asswert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+ ds = yt.load('data.h5')
+ masses = ds.data['masses']
+ num = ds.data['n_sim']
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig('hmf.png',format='png')
+
https://bitbucket.org/enzo/enzo-dev/commits/5be4078bccdb/
Changeset: 5be4078bccdb
Branch: week-of-code
User: brittonsmith
Date: 2018-05-15 14:01:50+00:00
Summary: Merging.
Affected #: 2 files
diff -r 49396e07ad22 -r 5be4078bccdb run/CosmologyTest/dm_only/dm_only.conf
--- /dev/null
+++ b/run/CosmologyTest/dm_only/dm_only.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = no
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r 49396e07ad22 -r 5be4078bccdb run/CosmologyTest/dm_only/dm_only.enzo
--- /dev/null
+++ b/run/CosmologyTest/dm_only/dm_only.enzo
@@ -0,0 +1,85 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0
+CosmologySimulationOmegaCDMNow = 0.268
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 5
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
https://bitbucket.org/enzo/enzo-dev/commits/43282908e2bb/
Changeset: 43282908e2bb
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 14:06:55+00:00
Summary: adding test for CosmologyTest that checks DM mass, baryon mass, and gas and stellar mass
Affected #: 1 file
diff -r 49396e07ad22 -r 43282908e2bb run/CosmologyTest/amr_cosmology/test_mass.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_mass.py
@@ -0,0 +1,115 @@
+"""
+ Three functions to test (separately) the total dark matter mass,
+ the total baryon mass, and the total stellar and total gas mass
+ is the test cosmology simulations. Latter two only run if baryons
+ are present.
+"""
+import yt
+import numpy as np
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load, \
+ assert_rel_equal
+import os, glob
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",2)
+
+def test_dark_matter_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # DM should be exact
+ tolerance = 8
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+ return
+
+
+def test_individual_baryon_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+ return
+
+def test_total_baryon_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+ return
+
https://bitbucket.org/enzo/enzo-dev/commits/1b6e3eb21bdf/
Changeset: 1b6e3eb21bdf
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 14:34:26+00:00
Summary: updating default tolerance to be high for all mass tests
Affected #: 1 file
diff -r 43282908e2bb -r 1b6e3eb21bdf run/CosmologyTest/amr_cosmology/test_mass.py
--- a/run/CosmologyTest/amr_cosmology/test_mass.py
+++ b/run/CosmologyTest/amr_cosmology/test_mass.py
@@ -13,14 +13,11 @@
test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
-tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",2)
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
def test_dark_matter_mass():
pf_name = glob.glob('./*.enzo')[0]
- # DM should be exact
- tolerance = 8
-
# gather most recent data set
sim = sim_dir_load(pf_name, path= './',
find_outputs=True)
https://bitbucket.org/enzo/enzo-dev/commits/67d5119f2c28/
Changeset: 67d5119f2c28
Branch: week-of-code
User: brittonsmith
Date: 2018-05-15 15:12:01+00:00
Summary: Merging.
Affected #: 1 file
diff -r 5be4078bccdb -r 67d5119f2c28 run/CosmologyTest/amr_cosmology/test_mass.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_mass.py
@@ -0,0 +1,112 @@
+"""
+ Three functions to test (separately) the total dark matter mass,
+ the total baryon mass, and the total stellar and total gas mass
+ is the test cosmology simulations. Latter two only run if baryons
+ are present.
+"""
+import yt
+import numpy as np
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load, \
+ assert_rel_equal
+import os, glob
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
+
+def test_dark_matter_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+ return
+
+
+def test_individual_baryon_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+ return
+
+def test_total_baryon_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+ return
+
https://bitbucket.org/enzo/enzo-dev/commits/995dfd1041f1/
Changeset: 995dfd1041f1
Branch: week-of-code
User: brittonsmith
Date: 2018-05-15 15:38:29+00:00
Summary: Update hmf test to show how to move results into test_data_dir.
Affected #: 1 file
diff -r 67d5119f2c28 -r 995dfd1041f1 run/CosmologyTest/amr_cosmology/test_hmf.py
--- a/run/CosmologyTest/amr_cosmology/test_hmf.py
+++ b/run/CosmologyTest/amr_cosmology/test_hmf.py
@@ -6,8 +6,12 @@
from yt.analysis_modules.halo_analysis.api import HaloCatalog
from yt.testing import assert_rel_equal
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
def test_hmf():
es = yt.simulation('amr_cosmology.enzo','Enzo')
@@ -27,14 +31,9 @@
filename = 'data.h5'
data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
yt.save_as_dataset(ds,filename,data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
- # assert quality to 8 decimals
- asswert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
- asswert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
- ds = yt.load('data.h5')
+ # make a plot
+ ds = yt.load(filename)
masses = ds.data['masses']
num = ds.data['n_sim']
fig = plt.figure(figsize=(8,8))
@@ -44,3 +43,15 @@
plt.tick_params(labelsize=16)
plt.savefig('hmf.png',format='png')
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
https://bitbucket.org/enzo/enzo-dev/commits/a427271e8d62/
Changeset: a427271e8d62
Branch: week-of-code
User: laurennc
Date: 2018-05-15 15:56:08+00:00
Summary: test finding the densest point in the simulation, creating a sphere centered on that point with a radius of 1 Mpc, and calculating the gas and dark matter masses within the sphere as well as the density and temperature radial profiles.
Affected #: 1 file
diff -r 995dfd1041f1 -r a427271e8d62 run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
@@ -0,0 +1,44 @@
+import numpy as np
+import os
+import yt
+from yt.testing import \
+ assert_rel_equal
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+
+# name your function test_<something>
+def test_max_density_halo_quantities():
+ ds = yt.load('RD0009/RD0009')
+
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # example data
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ yt.save_as_dataset(ds, filename, data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], 8)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], 8)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], 8)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"],8)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"],8)
https://bitbucket.org/enzo/enzo-dev/commits/481f133cb91d/
Changeset: 481f133cb91d
Branch: week-of-code
User: dkoh
Date: 2018-05-15 16:03:32+00:00
Summary: deleting unnecessary lines
Affected #: 1 file
diff -r 995dfd1041f1 -r 481f133cb91d run/CosmologyTest/amr_cosmology/test_hmf.py
--- a/run/CosmologyTest/amr_cosmology/test_hmf.py
+++ b/run/CosmologyTest/amr_cosmology/test_hmf.py
@@ -33,9 +33,6 @@
yt.save_as_dataset(ds,filename,data)
# make a plot
- ds = yt.load(filename)
- masses = ds.data['masses']
- num = ds.data['n_sim']
fig = plt.figure(figsize=(8,8))
plt.semilogy(masses_sim,n_cumulative_sim,'-')
plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
https://bitbucket.org/enzo/enzo-dev/commits/e1781d9643a5/
Changeset: e1781d9643a5
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 17:38:18+00:00
Summary: merging heads
Affected #: 1 file
diff -r 481f133cb91d -r e1781d9643a5 run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
@@ -0,0 +1,44 @@
+import numpy as np
+import os
+import yt
+from yt.testing import \
+ assert_rel_equal
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+
+# name your function test_<something>
+def test_max_density_halo_quantities():
+ ds = yt.load('RD0009/RD0009')
+
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # example data
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ yt.save_as_dataset(ds, filename, data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], 8)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], 8)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], 8)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"],8)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"],8)
https://bitbucket.org/enzo/enzo-dev/commits/82c7430b8843/
Changeset: 82c7430b8843
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 17:44:23+00:00
Summary: updating with correct test result filepaths
Affected #: 1 file
diff -r e1781d9643a5 -r 82c7430b8843 run/CosmologyTest/amr_cosmology/test_output_number.py
--- a/run/CosmologyTest/amr_cosmology/test_output_number.py
+++ b/run/CosmologyTest/amr_cosmology/test_output_number.py
@@ -3,8 +3,12 @@
from yt.utilities.answer_testing.framework import assert_equal
import os,glob
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
def test_output_number():
ds = yt.load('DD0000/DD0000')
@@ -17,11 +21,13 @@
filename = "outputnum_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- assert_equal(output_data['num_files'], ds_comp.data['num_files'])
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['num_files'], ds_comp.data['num_files'])
return
https://bitbucket.org/enzo/enzo-dev/commits/b1e08e617fe4/
Changeset: b1e08e617fe4
Branch: week-of-code
User:
aeme...@gmail.com
Date: 2018-05-15 17:51:49+00:00
Summary: updating with correct result filepaths
Affected #: 1 file
diff -r 82c7430b8843 -r b1e08e617fe4 run/CosmologyTest/amr_cosmology/test_mass.py
--- a/run/CosmologyTest/amr_cosmology/test_mass.py
+++ b/run/CosmologyTest/amr_cosmology/test_mass.py
@@ -11,8 +11,12 @@
assert_rel_equal
import os, glob
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
def test_dark_matter_mass():
@@ -34,12 +38,13 @@
filename = "DM_mass_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert
- assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
return
@@ -68,12 +73,13 @@
filename = "gas_stars_mass_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
return
@@ -101,12 +107,13 @@
filename = "baryon_mass_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
return
https://bitbucket.org/enzo/enzo-dev/commits/ee1e3bd838bf/
Changeset: ee1e3bd838bf
Branch: week-of-code
User: dkoh
Date: 2018-05-15 17:53:51+00:00
Summary: add hmf test to dm_only
Affected #: 1 file
diff -r 481f133cb91d -r ee1e3bd838bf run/CosmologyTest/dm_only/test_hmf.py
--- /dev/null
+++ b/run/CosmologyTest/dm_only/test_hmf.py
@@ -0,0 +1,56 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+
+def test_hmf():
+ es = yt.simulation('dm_only.enzo','Enzo')
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'data.h5'
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds,filename,data)
+
+ # make a plot
+ ds = yt.load(filename)
+ masses = ds.data['masses']
+ num = ds.data['n_sim']
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig('hmf.png',format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
https://bitbucket.org/enzo/enzo-dev/commits/dc286face92a/
Changeset: dc286face92a
Branch: week-of-code
User: dkoh
Date: 2018-05-15 17:54:22+00:00
Summary: merged
Affected #: 3 files
diff -r ee1e3bd838bf -r dc286face92a run/CosmologyTest/amr_cosmology/test_mass.py
--- a/run/CosmologyTest/amr_cosmology/test_mass.py
+++ b/run/CosmologyTest/amr_cosmology/test_mass.py
@@ -11,8 +11,12 @@
assert_rel_equal
import os, glob
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
def test_dark_matter_mass():
@@ -34,12 +38,13 @@
filename = "DM_mass_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert
- assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
return
@@ -68,12 +73,13 @@
filename = "gas_stars_mass_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
return
@@ -101,12 +107,13 @@
filename = "baryon_mass_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
return
diff -r ee1e3bd838bf -r dc286face92a run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
@@ -0,0 +1,44 @@
+import numpy as np
+import os
+import yt
+from yt.testing import \
+ assert_rel_equal
+
+test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
+compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+
+# name your function test_<something>
+def test_max_density_halo_quantities():
+ ds = yt.load('RD0009/RD0009')
+
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # example data
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ yt.save_as_dataset(ds, filename, data)
+
+ if compare_answers:
+ compare_filename = os.path.join(test_data_dir, filename)
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], 8)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], 8)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], 8)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"],8)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"],8)
diff -r ee1e3bd838bf -r dc286face92a run/CosmologyTest/amr_cosmology/test_output_number.py
--- a/run/CosmologyTest/amr_cosmology/test_output_number.py
+++ b/run/CosmologyTest/amr_cosmology/test_output_number.py
@@ -3,8 +3,12 @@
from yt.utilities.answer_testing.framework import assert_equal
import os,glob
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE",0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
def test_output_number():
ds = yt.load('DD0000/DD0000')
@@ -17,11 +21,13 @@
filename = "outputnum_results.h5"
yt.save_as_dataset(ds, filename, output_data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- assert_equal(output_data['num_files'], ds_comp.data['num_files'])
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['num_files'], ds_comp.data['num_files'])
return
https://bitbucket.org/enzo/enzo-dev/commits/465e87de5373/
Changeset: 465e87de5373
Branch: week-of-code
User: laurennc
Date: 2018-05-15 19:19:01+00:00
Summary: updated directory structure to be in line with other methods
Affected #: 1 file
diff -r dc286face92a -r 465e87de5373 run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
--- a/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
+++ b/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
@@ -1,16 +1,23 @@
import numpy as np
-import os
+import os, glob
import yt
-from yt.testing import \
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load, \
assert_rel_equal
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
-# name your function test_<something>
def test_max_density_halo_quantities():
ds = yt.load('RD0009/RD0009')
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
val,pos = ds.find_max('Density')
sp = ds.sphere(pos,(1000.,'kpc'))
ct = sp['creation_time']
@@ -18,10 +25,13 @@
dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
- # example data
+ # Save the quantities to be compared
data = {"dm_mass": dm_mass,
"gas_mass": gas_mass,
"max_position": pos,
@@ -32,13 +42,16 @@
filename = "max_density_halo_quantities.h5"
yt.save_as_dataset(ds, filename, data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert quality to 8 decimals
- assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], 8)
- assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], 8)
- assert_rel_equal(data["max_position"], ds_comp.data["max_position"], 8)
- assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"],8)
- assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"],8)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+ return
https://bitbucket.org/enzo/enzo-dev/commits/8670d264df4d/
Changeset: 8670d264df4d
Branch: week-of-code
User: dkoh
Date: 2018-05-15 20:11:50+00:00
Summary: reduced number of dumps and add phase test
Affected #: 3 files
diff -r dc286face92a -r 8670d264df4d run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
--- a/run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
+++ b/run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
@@ -49,7 +49,7 @@
#
# I/O and stop/start parameters
#
-dtDataDump = 5
+dtDataDump = 25
RedshiftDumpName = RD
RedshiftDumpDir = RD
DataDumpName = DD
diff -r dc286face92a -r 8670d264df4d run/CosmologyTest/amr_cosmology/test_phase.py
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/test_phase.py
@@ -0,0 +1,56 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.testing import assert_rel_equal
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",0 ))
+
+def test_phase():
+ es = yt.simulation('amr_cosmology.enzo', 'Enzo')
+ es.get_time_series(redshifts=[0])
+ ds = es[-1]
+ ad = ds.all_data()
+ profile = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cell_mass")])
+ profile1 = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cooling_time")],
+ weight_field=('gas', 'cell_mass'))
+ density = profile.x
+ temperature = profile['gas', 'temperature']
+ cooling_time = profile1['gas', 'cooling_time']
+ cell_mass = profile['gas', 'cell_mass']
+
+ filename = 'phase_data.h5'
+ data = {'density': density, 'temperature': temperature, 'cooling_time': cooling_time, 'cell_mass': cell_mass}
+ yt.save_as_dataset(ds,filename,data)
+
+ pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
+ pp.set_unit('cell_mass', 'Msun')
+ pp.save()
+ pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time', weight_field='cell_mass')
+ pp1.save()
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['density'], ds_comp.data['density'], 8)
+ assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
+ assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
+ assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
+
diff -r dc286face92a -r 8670d264df4d run/CosmologyTest/dm_only/dm_only.enzo
--- a/run/CosmologyTest/dm_only/dm_only.enzo
+++ b/run/CosmologyTest/dm_only/dm_only.enzo
@@ -44,7 +44,7 @@
#
# I/O and stop/start parameters
#
-dtDataDump = 5
+dtDataDump = 25
RedshiftDumpName = RD
RedshiftDumpDir = RD
DataDumpName = DD
https://bitbucket.org/enzo/enzo-dev/commits/4463d5311196/
Changeset: 4463d5311196
Branch: week-of-code
User: dkoh
Date: 2018-05-15 20:21:35+00:00
Summary: merged
Affected #: 1 file
diff -r 8670d264df4d -r 4463d5311196 run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
--- a/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
+++ b/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
@@ -1,16 +1,23 @@
import numpy as np
-import os
+import os, glob
import yt
-from yt.testing import \
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load, \
assert_rel_equal
-test_data_dir = os.environ.get("COSMO_TEST_DATA_DIR", None)
-compare_answers = int(os.environ.get("COSMO_TEST_COMPARE", 0))
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
-# name your function test_<something>
def test_max_density_halo_quantities():
ds = yt.load('RD0009/RD0009')
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
val,pos = ds.find_max('Density')
sp = ds.sphere(pos,(1000.,'kpc'))
ct = sp['creation_time']
@@ -18,10 +25,13 @@
dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
- # example data
+ # Save the quantities to be compared
data = {"dm_mass": dm_mass,
"gas_mass": gas_mass,
"max_position": pos,
@@ -32,13 +42,16 @@
filename = "max_density_halo_quantities.h5"
yt.save_as_dataset(ds, filename, data)
- if compare_answers:
- compare_filename = os.path.join(test_data_dir, filename)
- ds_comp = yt.load(compare_filename)
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
- # assert quality to 8 decimals
- assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], 8)
- assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], 8)
- assert_rel_equal(data["max_position"], ds_comp.data["max_position"], 8)
- assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"],8)
- assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"],8)
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+ return
https://bitbucket.org/enzo/enzo-dev/commits/69b350b4c666/
Changeset: 69b350b4c666
Branch: week-of-code
User: brittonsmith
Date: 2018-05-15 21:03:21+00:00
Summary: Adding config file for amr_cosmology test.
Affected #: 1 file
diff -r 4463d5311196 -r 69b350b4c666 run/CosmologyTest/amr_cosmology/amr_cosmology.enzotest
--- /dev/null
+++ b/run/CosmologyTest/amr_cosmology/amr_cosmology.enzotest
@@ -0,0 +1,13 @@
+name = 'amr_cosmology'
+answer_testing_script = None
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 3
+max_time_minutes = 20
+fullsuite = True
+pushsuite = True
+quicksuite = True
https://bitbucket.org/enzo/enzo-dev/commits/a83ccbf3735e/
Changeset: a83ccbf3735e
Branch: week-of-code
User: brittonsmith
Date: 2018-05-15 21:05:30+00:00
Summary: Moving new cosmology tests into CosmologySimulation.
Affected #: 22 files
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/amr_cosmology.conf
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = yes
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/amr_cosmology.enzo
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzo
@@ -0,0 +1,129 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0441
+CosmologySimulationOmegaCDMNow = 0.2239
+CosmologySimulationDensityName = GridDensity
+CosmologySimulationVelocity1Name = GridVelocities_x
+CosmologySimulationVelocity2Name = GridVelocities_y
+CosmologySimulationVelocity3Name = GridVelocities_z
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+CosmologySimulationUseMetallicityField = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 25
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+OutputCoolingTime = 1
+OutputTemperature = 1
+
+CosmologyOutputRedshift[0] = 0.100
+CosmologyOutputRedshift[1] = 0.089
+CosmologyOutputRedshift[2] = 0.078
+CosmologyOutputRedshift[3] = 0.067
+CosmologyOutputRedshift[4] = 0.057
+CosmologyOutputRedshift[5] = 0.047
+CosmologyOutputRedshift[6] = 0.037
+CosmologyOutputRedshift[7] = 0.027
+CosmologyOutputRedshift[8] = 0.017
+CosmologyOutputRedshift[9] = 0.007
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# microphysics parameters
+#
+RadiativeCooling = 1
+use_grackle = 1
+MultiSpecies = 0 // sets grackle.primordial_chemistry
+MetalCooling = 1 // sets grackle.metal_cooling
+grackle_data_file = CloudyData_UVB=HM2012.h5
+UVbackground = 1
+CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
+
+#
+# star formation parameters
+#
+StarParticleCreation = 1
+StarParticleFeedback = 1
+StarMakerOverDensityThreshold = 100
+StarMakerMinimumMass = 1e6
+StarMakerMinimumDynamicalTime = 1e6
+StarMakerMassEfficiency = 0.1
+StarMassEjectionFraction = 0.25
+StarMetalYield = 0.1
+StarEnergyToThermalFeedback = 1e-5
+StarFeedbackDistRadius = 1
+StarFeedbackDistCellStep = 3
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
@@ -0,0 +1,13 @@
+name = 'amr_cosmology'
+answer_testing_script = None
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 3
+max_time_minutes = 20
+fullsuite = True
+pushsuite = True
+quicksuite = True
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/test_hmf.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_hmf.py
@@ -0,0 +1,54 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+
+def test_hmf():
+ es = yt.simulation('amr_cosmology.enzo','Enzo')
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'data.h5'
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds,filename,data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig('hmf.png',format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/test_mass.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_mass.py
@@ -0,0 +1,119 @@
+"""
+ Three functions to test (separately) the total dark matter mass,
+ the total baryon mass, and the total stellar and total gas mass
+ is the test cosmology simulations. Latter two only run if baryons
+ are present.
+"""
+import yt
+import numpy as np
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load, \
+ assert_rel_equal
+import os, glob
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
+
+def test_dark_matter_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+ return
+
+
+def test_individual_baryon_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+ return
+
+def test_total_baryon_mass():
+ pf_name = glob.glob('./*.enzo')[0]
+
+ # gather most recent data set
+ sim = sim_dir_load(pf_name, path= './',
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+ return
+
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/test_max_density_halo_quantities.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_max_density_halo_quantities.py
@@ -0,0 +1,57 @@
+import numpy as np
+import os, glob
+import yt
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load, \
+ assert_rel_equal
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
+
+def test_max_density_halo_quantities():
+ ds = yt.load('RD0009/RD0009')
+
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # Save the quantities to be compared
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ yt.save_as_dataset(ds, filename, data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+ return
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/test_output_number.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_output_number.py
@@ -0,0 +1,33 @@
+import yt
+import numpy as np
+from yt.utilities.answer_testing.framework import assert_equal
+import os,glob
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
+
+def test_output_number():
+ ds = yt.load('DD0000/DD0000')
+
+ DDnum = len(glob.glob('DD????/DD????'))
+ RDnum = len(glob.glob('RD????/RD????'))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ yt.save_as_dataset(ds, filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['num_files'], ds_comp.data['num_files'])
+
+ return
+
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/amr_cosmology/test_phase.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_phase.py
@@ -0,0 +1,56 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.testing import assert_rel_equal
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",0 ))
+
+def test_phase():
+ es = yt.simulation('amr_cosmology.enzo', 'Enzo')
+ es.get_time_series(redshifts=[0])
+ ds = es[-1]
+ ad = ds.all_data()
+ profile = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cell_mass")])
+ profile1 = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cooling_time")],
+ weight_field=('gas', 'cell_mass'))
+ density = profile.x
+ temperature = profile['gas', 'temperature']
+ cooling_time = profile1['gas', 'cooling_time']
+ cell_mass = profile['gas', 'cell_mass']
+
+ filename = 'phase_data.h5'
+ data = {'density': density, 'temperature': temperature, 'cooling_time': cooling_time, 'cell_mass': cell_mass}
+ yt.save_as_dataset(ds,filename,data)
+
+ pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
+ pp.set_unit('cell_mass', 'Msun')
+ pp.save()
+ pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time', weight_field='cell_mass')
+ pp1.save()
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['density'], ds_comp.data['density'], 8)
+ assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
+ assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
+ assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
+
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/dm_only/dm_only.conf
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/dm_only.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = no
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/dm_only/dm_only.enzo
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/dm_only.enzo
@@ -0,0 +1,85 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0
+CosmologySimulationOmegaCDMNow = 0.268
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 25
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologySimulation/dm_only/test_hmf.py
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/test_hmf.py
@@ -0,0 +1,56 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+
+sim_dir = os.path.basename(os.getcwd())
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+
+def test_hmf():
+ es = yt.simulation('dm_only.enzo','Enzo')
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'data.h5'
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds,filename,data)
+
+ # make a plot
+ ds = yt.load(filename)
+ masses = ds.data['masses']
+ num = ds.data['n_sim']
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig('hmf.png',format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/amr_cosmology.conf
--- a/run/CosmologyTest/amr_cosmology/amr_cosmology.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-[setup]
-boxlength = 32.
-zstart = 50
-levelmin = 5
-levelmin_TF = 5
-levelmax = 5
-padding = 4
-overlap = 8
-# For zoom-in ICs, set these two parameters
-#ref_dims = 512,512,512
-#ref_center = 0.5,0.5,0.5
-align_top = no
-baryons = yes
-use_2LPT = yes
-use_LLA = yes
-periodic_TF = yes
-center_vel = no
-
-[cosmology]
-Omega_m = 0.268
-Omega_L = 0.732
-Omega_b = 0.0441
-H0 = 70.4
-sigma_8 = 0.828
-nspec = 0.9632
-transfer = eisenstein
-
-[random]
-cubesize = 256
-seed[5] = 8675309
-
-[output]
-format = enzo
-filename = IC
-
-[poisson]
-fft_fine = no
-accuracy = 1e-5
-pre_smooth = 3
-post_smooth = 3
-smoother = gs
-laplace_order = 6
-grad_order = 6
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
--- a/run/CosmologyTest/amr_cosmology/amr_cosmology.enzo
+++ /dev/null
@@ -1,129 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
-# This is a small cosmology simulation that runs to z = 0.
-# The redshift outputs can be used to create a light-cone out to z = 0.1.
-#
-# define problem
-#
-ProblemType = 30 // cosmology simulation
-TopGridRank = 3
-TopGridDimensions = 32 32 32
-SelfGravity = 1 // gravity on
-TopGridGravityBoundary = 0 // Periodic BC for gravity
-LeftFaceBoundaryCondition = 3 3 3 // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.0441
-CosmologySimulationOmegaCDMNow = 0.2239
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities_x
-CosmologySimulationVelocity2Name = GridVelocities_y
-CosmologySimulationVelocity3Name = GridVelocities_z
-CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
-CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
-CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
-CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
-CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
-CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
-CosmologySimulationCalculatePositions = 1
-CosmologySimulationNumberOfInitialGrids = 1
-CosmologySimulationUseMetallicityField = 1
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyHubbleConstantNow = 0.704
-CosmologyComovingBoxSize = 32.0
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 50
-CosmologyFinalRedshift = 0
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-dtDataDump = 25
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-OutputCoolingTime = 1
-OutputTemperature = 1
-
-CosmologyOutputRedshift[0] = 0.100
-CosmologyOutputRedshift[1] = 0.089
-CosmologyOutputRedshift[2] = 0.078
-CosmologyOutputRedshift[3] = 0.067
-CosmologyOutputRedshift[4] = 0.057
-CosmologyOutputRedshift[5] = 0.047
-CosmologyOutputRedshift[6] = 0.037
-CosmologyOutputRedshift[7] = 0.027
-CosmologyOutputRedshift[8] = 0.017
-CosmologyOutputRedshift[9] = 0.007
-
-#
-# hydro parameters
-#
-HydroMethod = 0 // PPM
-Gamma = 1.6667
-PPMDiffusionParameter = 0 // diffusion off
-DualEnergyFormalism = 1 // use total & internal energy
-InterpolationMethod = 1 // SecondOrderA
-FluxCorrection = 1
-ConservativeInterpolation = 1
-CourantSafetyNumber = 0.5
-ParticleCourantSafetyNumber = 0.8
-UseMinimumPressureSupport = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 5
-MaximumGravityRefinementLevel = 5
-MaximumParticleRefinementLevel = 5
-RefineBy = 2
-CellFlaggingMethod = 2 4
-MinimumOverDensityForRefinement = 8.0 8.0
-MinimumMassForRefinementLevelExponent = 0.0 0.0
-MinimumEfficiency = 0.35
-
-#
-# microphysics parameters
-#
-RadiativeCooling = 1
-use_grackle = 1
-MultiSpecies = 0 // sets grackle.primordial_chemistry
-MetalCooling = 1 // sets grackle.metal_cooling
-grackle_data_file = CloudyData_UVB=HM2012.h5
-UVbackground = 1
-CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
-
-#
-# star formation parameters
-#
-StarParticleCreation = 1
-StarParticleFeedback = 1
-StarMakerOverDensityThreshold = 100
-StarMakerMinimumMass = 1e6
-StarMakerMinimumDynamicalTime = 1e6
-StarMakerMassEfficiency = 0.1
-StarMassEjectionFraction = 0.25
-StarMetalYield = 0.1
-StarEnergyToThermalFeedback = 1e-5
-StarFeedbackDistRadius = 1
-StarFeedbackDistCellStep = 3
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-ParallelRootGridIO = 1
-ParallelParticleIO = 1
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/amr_cosmology.enzotest
--- a/run/CosmologyTest/amr_cosmology/amr_cosmology.enzotest
+++ /dev/null
@@ -1,13 +0,0 @@
-name = 'amr_cosmology'
-answer_testing_script = None
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 3
-max_time_minutes = 20
-fullsuite = True
-pushsuite = True
-quicksuite = True
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/test_hmf.py
--- a/run/CosmologyTest/amr_cosmology/test_hmf.py
+++ /dev/null
@@ -1,54 +0,0 @@
-import yt
-import matplotlib.pyplot as plt
-import numpy as np
-import os
-from yt.analysis_modules.halo_mass_function.api import *
-from yt.analysis_modules.halo_analysis.api import HaloCatalog
-from yt.testing import assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
-
-def test_hmf():
- es = yt.simulation('amr_cosmology.enzo','Enzo')
- es.get_time_series()
- ds = es[-1]
- hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
- hc.create()
- masses = hc.data_source['particle_mass'].in_units('Msun')
- h = ds.hubble_constant
- mtot = np.log10(masses*1.2) - np.log10(h)
- masses_sim = np.sort(mtot)
- sim_volume = ds.domain_width.in_units('Mpccm').prod()
- n_cumulative_sim = np.arange(len(mtot),0,-1)
- masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
-
- n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
- filename = 'data.h5'
- data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
- yt.save_as_dataset(ds,filename,data)
-
- # make a plot
- fig = plt.figure(figsize=(8,8))
- plt.semilogy(masses_sim,n_cumulative_sim,'-')
- plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
- plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
- plt.tick_params(labelsize=16)
- plt.savefig('hmf.png',format='png')
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- # do the comparison
- ds_comp = yt.load(compare_filename)
-
- # assert quality to 8 decimals
- assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
- assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
-
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/test_mass.py
--- a/run/CosmologyTest/amr_cosmology/test_mass.py
+++ /dev/null
@@ -1,119 +0,0 @@
-"""
- Three functions to test (separately) the total dark matter mass,
- the total baryon mass, and the total stellar and total gas mass
- is the test cosmology simulations. Latter two only run if baryons
- are present.
-"""
-import yt
-import numpy as np
-from yt.utilities.answer_testing.framework import \
- sim_dir_load, \
- assert_rel_equal
-import os, glob
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
-tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
-
-def test_dark_matter_mass():
- pf_name = glob.glob('./*.enzo')[0]
-
- # gather most recent data set
- sim = sim_dir_load(pf_name, path= './',
- find_outputs=True)
- sim.get_time_series()
- ds = sim[-1]
- data = ds.all_data()
-
- # sum masses
- MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
-
- output_data = {'mass' : MDM}
-
- # save
- filename = "DM_mass_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
-
- return
-
-
-def test_individual_baryon_mass():
- pf_name = glob.glob('./*.enzo')[0]
-
- # gather most recent data set
- sim = sim_dir_load(pf_name, path= './',
- find_outputs=True)
-
- if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
- return
-
- sim.get_time_series()
- ds = sim[-1]
- data = ds.all_data()
-
- # sum masses
- Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
- Mgas = np.sum(data['cell_mass'].to('Msun'))
-
- output_data = {'masses' : np.array([Mstar, Mgas])}
-
- # save
- filename = "gas_stars_mass_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
-
- return
-
-def test_total_baryon_mass():
- pf_name = glob.glob('./*.enzo')[0]
-
- # gather most recent data set
- sim = sim_dir_load(pf_name, path= './',
- find_outputs=True)
-
- if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
- return
-
- sim.get_time_series()
- ds = sim[-1]
- data = ds.all_data()
-
- # sum masses
- Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
- Mgas = np.sum(data['cell_mass'].to('Msun'))
-
- output_data = {'masses' : Mstar + Mgas}
-
- # save
- filename = "baryon_mass_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
-
- return
-
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
--- a/run/CosmologyTest/amr_cosmology/test_max_density_halo_quantities.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import numpy as np
-import os, glob
-import yt
-from yt.utilities.answer_testing.framework import \
- sim_dir_load, \
- assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
-tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
-
-def test_max_density_halo_quantities():
- ds = yt.load('RD0009/RD0009')
-
- # Find the point of maximum density, center a sphere of radius
- # 1 Mpc around it, and sum the masses inside
- val,pos = ds.find_max('Density')
- sp = ds.sphere(pos,(1000.,'kpc'))
- ct = sp['creation_time']
- dm = (ct < 0)
- dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
- gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
-
- # Also look at the radial profiles of density and temperature
- # within these spheres. The bin size is chosen to make the profiles
- # smooth and for each bin to be larger than the cell size.
- ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
- ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
-
- # Save the quantities to be compared
- data = {"dm_mass": dm_mass,
- "gas_mass": gas_mass,
- "max_position": pos,
- "density_profile": ptest0['density'],
- "temperature_profile": ptest1['temperature']}
-
- # save your results file
- filename = "max_density_halo_quantities.h5"
- yt.save_as_dataset(ds, filename, data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
- assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
- assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
- assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
- assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
-
- return
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/test_output_number.py
--- a/run/CosmologyTest/amr_cosmology/test_output_number.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import yt
-import numpy as np
-from yt.utilities.answer_testing.framework import assert_equal
-import os,glob
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
-
-def test_output_number():
- ds = yt.load('DD0000/DD0000')
-
- DDnum = len(glob.glob('DD????/DD????'))
- RDnum = len(glob.glob('RD????/RD????'))
-
- output_data = {'number_of_files' : np.array([DDnum,RDnum])}
-
- filename = "outputnum_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_equal(output_data['num_files'], ds_comp.data['num_files'])
-
- return
-
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/amr_cosmology/test_phase.py
--- a/run/CosmologyTest/amr_cosmology/test_phase.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import yt
-import matplotlib.pyplot as plt
-import numpy as np
-import os
-from yt.testing import assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",0 ))
-
-def test_phase():
- es = yt.simulation('amr_cosmology.enzo', 'Enzo')
- es.get_time_series(redshifts=[0])
- ds = es[-1]
- ad = ds.all_data()
- profile = ad.profile([("gas", "density")],
- [("gas", "temperature"),
- ("gas", "cell_mass")])
- profile1 = ad.profile([("gas", "density")],
- [("gas", "temperature"),
- ("gas", "cooling_time")],
- weight_field=('gas', 'cell_mass'))
- density = profile.x
- temperature = profile['gas', 'temperature']
- cooling_time = profile1['gas', 'cooling_time']
- cell_mass = profile['gas', 'cell_mass']
-
- filename = 'phase_data.h5'
- data = {'density': density, 'temperature': temperature, 'cooling_time': cooling_time, 'cell_mass': cell_mass}
- yt.save_as_dataset(ds,filename,data)
-
- pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
- pp.set_unit('cell_mass', 'Msun')
- pp.save()
- pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time', weight_field='cell_mass')
- pp1.save()
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- # do the comparison
- ds_comp = yt.load(compare_filename)
-
-
-
- # assert quality to 8 decimals
- assert_rel_equal(data['density'], ds_comp.data['density'], 8)
- assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
- assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
- assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
-
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/dm_only/dm_only.conf
--- a/run/CosmologyTest/dm_only/dm_only.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-[setup]
-boxlength = 32.
-zstart = 50
-levelmin = 5
-levelmin_TF = 5
-levelmax = 5
-padding = 4
-overlap = 8
-# For zoom-in ICs, set these two parameters
-#ref_dims = 512,512,512
-#ref_center = 0.5,0.5,0.5
-align_top = no
-baryons = no
-use_2LPT = yes
-use_LLA = yes
-periodic_TF = yes
-center_vel = no
-
-[cosmology]
-Omega_m = 0.268
-Omega_L = 0.732
-Omega_b = 0.0441
-H0 = 70.4
-sigma_8 = 0.828
-nspec = 0.9632
-transfer = eisenstein
-
-[random]
-cubesize = 256
-seed[5] = 8675309
-
-[output]
-format = enzo
-filename = IC
-
-[poisson]
-fft_fine = no
-accuracy = 1e-5
-pre_smooth = 3
-post_smooth = 3
-smoother = gs
-laplace_order = 6
-grad_order = 6
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/dm_only/dm_only.enzo
--- a/run/CosmologyTest/dm_only/dm_only.enzo
+++ /dev/null
@@ -1,85 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
-# This is a small cosmology simulation that runs to z = 0.
-# The redshift outputs can be used to create a light-cone out to z = 0.1.
-#
-# define problem
-#
-ProblemType = 30 // cosmology simulation
-TopGridRank = 3
-TopGridDimensions = 32 32 32
-SelfGravity = 1 // gravity on
-TopGridGravityBoundary = 0 // Periodic BC for gravity
-LeftFaceBoundaryCondition = 3 3 3 // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.0
-CosmologySimulationOmegaCDMNow = 0.268
-CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
-CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
-CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
-CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
-CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
-CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
-CosmologySimulationCalculatePositions = 1
-CosmologySimulationNumberOfInitialGrids = 1
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyHubbleConstantNow = 0.704
-CosmologyComovingBoxSize = 32.0
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 50
-CosmologyFinalRedshift = 0
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-dtDataDump = 25
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-#
-# hydro parameters
-#
-HydroMethod = 0 // PPM
-Gamma = 1.6667
-PPMDiffusionParameter = 0 // diffusion off
-DualEnergyFormalism = 1 // use total & internal energy
-InterpolationMethod = 1 // SecondOrderA
-FluxCorrection = 1
-ConservativeInterpolation = 1
-CourantSafetyNumber = 0.5
-ParticleCourantSafetyNumber = 0.8
-UseMinimumPressureSupport = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 5
-MaximumGravityRefinementLevel = 5
-MaximumParticleRefinementLevel = 5
-RefineBy = 2
-CellFlaggingMethod = 2 4
-MinimumOverDensityForRefinement = 8.0 8.0
-MinimumMassForRefinementLevelExponent = 0.0 0.0
-MinimumEfficiency = 0.35
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-ParallelRootGridIO = 1
-ParallelParticleIO = 1
diff -r 69b350b4c666 -r a83ccbf3735e run/CosmologyTest/dm_only/test_hmf.py
--- a/run/CosmologyTest/dm_only/test_hmf.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import yt
-import matplotlib.pyplot as plt
-import numpy as np
-import os
-from yt.analysis_modules.halo_analysis.api import HaloCatalog
-from yt.testing import assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
-
-def test_hmf():
- es = yt.simulation('dm_only.enzo','Enzo')
- es.get_time_series()
- ds = es[-1]
- hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
- hc.create()
- masses = hc.data_source['particle_mass'].in_units('Msun')
- h = ds.hubble_constant
- mtot = np.log10(masses*1.2) - np.log10(h)
- masses_sim = np.sort(mtot)
- sim_volume = ds.domain_width.in_units('Mpccm').prod()
- n_cumulative_sim = np.arange(len(mtot),0,-1)
- masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
-
- n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
- filename = 'data.h5'
- data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
- yt.save_as_dataset(ds,filename,data)
-
- # make a plot
- ds = yt.load(filename)
- masses = ds.data['masses']
- num = ds.data['n_sim']
- fig = plt.figure(figsize=(8,8))
- plt.semilogy(masses_sim,n_cumulative_sim,'-')
- plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
- plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
- plt.tick_params(labelsize=16)
- plt.savefig('hmf.png',format='png')
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- # do the comparison
- ds_comp = yt.load(compare_filename)
-
- # assert quality to 8 decimals
- assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
- assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
-
https://bitbucket.org/enzo/enzo-dev/commits/1e43ece35570/
Changeset: 1e43ece35570
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 17:19:22+00:00
Summary: Adding CosmologySimulation flag to test runner.
Affected #: 1 file
diff -r a83ccbf3735e -r 1e43ece35570 run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -19,7 +19,7 @@
known_categories = [
"Cooling",
"Cosmology",
- "CosmoSim",
+ "CosmologySimulation",
"DrivenTurbulence3D",
"FLD",
"GravitySolver",
@@ -73,6 +73,7 @@
mhd = (bool, False),
gravity = (bool, False),
cosmology = (bool, False),
+ cosmology_simulation = (bool, False),
chemistry = (bool, False),
cooling = (bool, False),
AMR = (bool, False),
https://bitbucket.org/enzo/enzo-dev/commits/2a378325148e/
Changeset: 2a378325148e
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 17:20:58+00:00
Summary: Updating hmf test to work with test_runner.
Affected #: 2 files
diff -r 1e43ece35570 -r 2a378325148e run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
--- a/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
@@ -1,11 +1,12 @@
name = 'amr_cosmology'
-answer_testing_script = None
+answer_testing_script = 'test_hmf.py'
nprocs = 1
runtime = 'short'
hydro = True
gravity = True
AMR = True
cosmology = True
+cosmology_simulation = True
dimensionality = 3
max_time_minutes = 20
fullsuite = True
diff -r 1e43ece35570 -r 2a378325148e run/CosmologySimulation/amr_cosmology/test_hmf.py
--- a/run/CosmologySimulation/amr_cosmology/test_hmf.py
+++ b/run/CosmologySimulation/amr_cosmology/test_hmf.py
@@ -6,18 +6,26 @@
from yt.analysis_modules.halo_analysis.api import HaloCatalog
from yt.testing import assert_rel_equal
-sim_dir = os.path.basename(os.getcwd())
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
if not os.path.exists(test_data_dir):
os.makedirs(test_data_dir)
generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
def test_hmf():
- es = yt.simulation('amr_cosmology.enzo','Enzo')
+ es = sim_dir_load(_pf_name, path=_dir_name)
es.get_time_series()
ds = es[-1]
- hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
hc.create()
masses = hc.data_source['particle_mass'].in_units('Msun')
h = ds.hubble_constant
@@ -28,9 +36,10 @@
masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
- filename = 'data.h5'
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
- yt.save_as_dataset(ds,filename,data)
+ yt.save_as_dataset(ds, save_filename, data)
# make a plot
fig = plt.figure(figsize=(8,8))
@@ -38,11 +47,11 @@
plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
plt.tick_params(labelsize=16)
- plt.savefig('hmf.png',format='png')
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
compare_filename = os.path.join(test_data_dir, filename)
if generate_answers:
- os.rename(filename, compare_filename)
+ os.rename(save_filename, compare_filename)
return
# do the comparison
https://bitbucket.org/enzo/enzo-dev/commits/aa30c04b257f/
Changeset: aa30c04b257f
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 17:22:15+00:00
Summary: Renaming test file.
Affected #: 3 files
diff -r 2a378325148e -r aa30c04b257f run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
--- a/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
@@ -1,5 +1,5 @@
name = 'amr_cosmology'
-answer_testing_script = 'test_hmf.py'
+answer_testing_script = 'test_amr_cosmology.py'
nprocs = 1
runtime = 'short'
hydro = True
diff -r 2a378325148e -r aa30c04b257f run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
@@ -0,0 +1,63 @@
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+
+def test_hmf():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
diff -r 2a378325148e -r aa30c04b257f run/CosmologySimulation/amr_cosmology/test_hmf.py
--- a/run/CosmologySimulation/amr_cosmology/test_hmf.py
+++ /dev/null
@@ -1,63 +0,0 @@
-import yt
-import matplotlib.pyplot as plt
-import numpy as np
-import os
-from yt.analysis_modules.halo_mass_function.api import *
-from yt.analysis_modules.halo_analysis.api import HaloCatalog
-from yt.testing import assert_rel_equal
-
-from yt.utilities.answer_testing.framework import \
- sim_dir_load
-
-_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
-_dir_name = os.path.dirname(__file__)
-
-sim_dir = os.path.basename(_dir_name)
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
-
-def test_hmf():
- es = sim_dir_load(_pf_name, path=_dir_name)
- es.get_time_series()
- ds = es[-1]
- hc = HaloCatalog(
- data_ds=ds, finder_method='fof',
- output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
- hc.create()
- masses = hc.data_source['particle_mass'].in_units('Msun')
- h = ds.hubble_constant
- mtot = np.log10(masses*1.2) - np.log10(h)
- masses_sim = np.sort(mtot)
- sim_volume = ds.domain_width.in_units('Mpccm').prod()
- n_cumulative_sim = np.arange(len(mtot),0,-1)
- masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
-
- n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
- filename = 'hmf.h5'
- save_filename = os.path.join(_dir_name, filename)
- data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
- yt.save_as_dataset(ds, save_filename, data)
-
- # make a plot
- fig = plt.figure(figsize=(8,8))
- plt.semilogy(masses_sim,n_cumulative_sim,'-')
- plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
- plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
- plt.tick_params(labelsize=16)
- plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(save_filename, compare_filename)
- return
-
- # do the comparison
- ds_comp = yt.load(compare_filename)
-
- # assert quality to 8 decimals
- assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
- assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
-
https://bitbucket.org/enzo/enzo-dev/commits/5c9a326ce651/
Changeset: 5c9a326ce651
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 18:02:49+00:00
Summary: Adding other tests to one single file.
Affected #: 1 file
diff -r aa30c04b257f -r 5c9a326ce651 run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
--- a/run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
+++ b/run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
@@ -1,3 +1,4 @@
+import glob
import yt
import matplotlib.pyplot as plt
import numpy as np
@@ -18,6 +19,7 @@
if not os.path.exists(test_data_dir):
os.makedirs(test_data_dir)
generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE", 8)
def test_hmf():
es = sim_dir_load(_pf_name, path=_dir_name)
@@ -61,3 +63,196 @@
assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+def test_max_density_halo_quantities():
+ ds = yt.load(os.path.join(_dir_name, 'RD0009/RD0009'))
+
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # Save the quantities to be compared
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+def test_dark_matter_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+def test_individual_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_total_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_output_number():
+ ds = yt.load(os.path.join(_dir_name, 'DD0000/DD0000'))
+
+ DDnum = len(glob.glob(os.path.join(_dir_name, 'DD????/DD????')))
+ RDnum = len(glob.glob(os.path.join(_dir_name, 'RD????/RD????')))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['num_files'], ds_comp.data['num_files'])
+
+def test_phase():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series(redshifts=[0])
+ ds = es[-1]
+ ad = ds.all_data()
+ profile = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cell_mass")])
+ profile1 = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cooling_time")],
+ weight_field=('gas', 'cell_mass'))
+ density = profile.x
+ temperature = profile['gas', 'temperature']
+ cooling_time = profile1['gas', 'cooling_time']
+ cell_mass = profile['gas', 'cell_mass']
+
+ filename = 'phase_data.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'density': density, 'temperature': temperature,
+ 'cooling_time': cooling_time, 'cell_mass': cell_mass}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
+ pp.set_unit('cell_mass', 'Msun')
+ pp.save(_dir_name)
+ pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time',
+ weight_field='cell_mass')
+ pp1.save(_dir_name)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['density'], ds_comp.data['density'], 8)
+ assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
+ assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
+ assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
https://bitbucket.org/enzo/enzo-dev/commits/2c23abcd01f1/
Changeset: 2c23abcd01f1
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 18:03:18+00:00
Summary: Removing old files.
Affected #: 4 files
diff -r 5c9a326ce651 -r 2c23abcd01f1 run/CosmologySimulation/amr_cosmology/test_mass.py
--- a/run/CosmologySimulation/amr_cosmology/test_mass.py
+++ /dev/null
@@ -1,119 +0,0 @@
-"""
- Three functions to test (separately) the total dark matter mass,
- the total baryon mass, and the total stellar and total gas mass
- is the test cosmology simulations. Latter two only run if baryons
- are present.
-"""
-import yt
-import numpy as np
-from yt.utilities.answer_testing.framework import \
- sim_dir_load, \
- assert_rel_equal
-import os, glob
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
-tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
-
-def test_dark_matter_mass():
- pf_name = glob.glob('./*.enzo')[0]
-
- # gather most recent data set
- sim = sim_dir_load(pf_name, path= './',
- find_outputs=True)
- sim.get_time_series()
- ds = sim[-1]
- data = ds.all_data()
-
- # sum masses
- MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
-
- output_data = {'mass' : MDM}
-
- # save
- filename = "DM_mass_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
-
- return
-
-
-def test_individual_baryon_mass():
- pf_name = glob.glob('./*.enzo')[0]
-
- # gather most recent data set
- sim = sim_dir_load(pf_name, path= './',
- find_outputs=True)
-
- if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
- return
-
- sim.get_time_series()
- ds = sim[-1]
- data = ds.all_data()
-
- # sum masses
- Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
- Mgas = np.sum(data['cell_mass'].to('Msun'))
-
- output_data = {'masses' : np.array([Mstar, Mgas])}
-
- # save
- filename = "gas_stars_mass_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
-
- return
-
-def test_total_baryon_mass():
- pf_name = glob.glob('./*.enzo')[0]
-
- # gather most recent data set
- sim = sim_dir_load(pf_name, path= './',
- find_outputs=True)
-
- if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
- return
-
- sim.get_time_series()
- ds = sim[-1]
- data = ds.all_data()
-
- # sum masses
- Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
- Mgas = np.sum(data['cell_mass'].to('Msun'))
-
- output_data = {'masses' : Mstar + Mgas}
-
- # save
- filename = "baryon_mass_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
-
- return
-
diff -r 5c9a326ce651 -r 2c23abcd01f1 run/CosmologySimulation/amr_cosmology/test_max_density_halo_quantities.py
--- a/run/CosmologySimulation/amr_cosmology/test_max_density_halo_quantities.py
+++ /dev/null
@@ -1,57 +0,0 @@
-import numpy as np
-import os, glob
-import yt
-from yt.utilities.answer_testing.framework import \
- sim_dir_load, \
- assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
-tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE",8)
-
-def test_max_density_halo_quantities():
- ds = yt.load('RD0009/RD0009')
-
- # Find the point of maximum density, center a sphere of radius
- # 1 Mpc around it, and sum the masses inside
- val,pos = ds.find_max('Density')
- sp = ds.sphere(pos,(1000.,'kpc'))
- ct = sp['creation_time']
- dm = (ct < 0)
- dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
- gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
-
- # Also look at the radial profiles of density and temperature
- # within these spheres. The bin size is chosen to make the profiles
- # smooth and for each bin to be larger than the cell size.
- ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
- ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
-
- # Save the quantities to be compared
- data = {"dm_mass": dm_mass,
- "gas_mass": gas_mass,
- "max_position": pos,
- "density_profile": ptest0['density'],
- "temperature_profile": ptest1['temperature']}
-
- # save your results file
- filename = "max_density_halo_quantities.h5"
- yt.save_as_dataset(ds, filename, data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
- assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
- assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
- assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
- assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
-
- return
diff -r 5c9a326ce651 -r 2c23abcd01f1 run/CosmologySimulation/amr_cosmology/test_output_number.py
--- a/run/CosmologySimulation/amr_cosmology/test_output_number.py
+++ /dev/null
@@ -1,33 +0,0 @@
-import yt
-import numpy as np
-from yt.utilities.answer_testing.framework import assert_equal
-import os,glob
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", None), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",1))
-
-def test_output_number():
- ds = yt.load('DD0000/DD0000')
-
- DDnum = len(glob.glob('DD????/DD????'))
- RDnum = len(glob.glob('RD????/RD????'))
-
- output_data = {'number_of_files' : np.array([DDnum,RDnum])}
-
- filename = "outputnum_results.h5"
- yt.save_as_dataset(ds, filename, output_data)
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- ds_comp = yt.load(compare_filename)
- assert_equal(output_data['num_files'], ds_comp.data['num_files'])
-
- return
-
diff -r 5c9a326ce651 -r 2c23abcd01f1 run/CosmologySimulation/amr_cosmology/test_phase.py
--- a/run/CosmologySimulation/amr_cosmology/test_phase.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import yt
-import matplotlib.pyplot as plt
-import numpy as np
-import os
-from yt.testing import assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE",0 ))
-
-def test_phase():
- es = yt.simulation('amr_cosmology.enzo', 'Enzo')
- es.get_time_series(redshifts=[0])
- ds = es[-1]
- ad = ds.all_data()
- profile = ad.profile([("gas", "density")],
- [("gas", "temperature"),
- ("gas", "cell_mass")])
- profile1 = ad.profile([("gas", "density")],
- [("gas", "temperature"),
- ("gas", "cooling_time")],
- weight_field=('gas', 'cell_mass'))
- density = profile.x
- temperature = profile['gas', 'temperature']
- cooling_time = profile1['gas', 'cooling_time']
- cell_mass = profile['gas', 'cell_mass']
-
- filename = 'phase_data.h5'
- data = {'density': density, 'temperature': temperature, 'cooling_time': cooling_time, 'cell_mass': cell_mass}
- yt.save_as_dataset(ds,filename,data)
-
- pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
- pp.set_unit('cell_mass', 'Msun')
- pp.save()
- pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time', weight_field='cell_mass')
- pp1.save()
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- # do the comparison
- ds_comp = yt.load(compare_filename)
-
-
-
- # assert quality to 8 decimals
- assert_rel_equal(data['density'], ds_comp.data['density'], 8)
- assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
- assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
- assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
-
https://bitbucket.org/enzo/enzo-dev/commits/8006cc18ca50/
Changeset: 8006cc18ca50
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 19:16:17+00:00
Summary: Setting environment variables for cosmology tests.
Affected #: 1 file
diff -r 2c23abcd01f1 -r 8006cc18ca50 run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -624,6 +624,16 @@
parser.add_option_group(testproblem_group)
options, args = parser.parse_args()
+ # The cosmology tests change behavior based on environment variables,
+ # so set those based on the related run time arguments.
+ os.environ["COSMO_TEST_GENERATE"] = str(int(options.store_results))
+ if options.output_dir is None:
+ test_data_dir = "."
+ else:
+ test_data_dir = options.output_dir
+ if options.answer_name is not None:
+ test_data_dir = os.path.join(test_data_dir, options.answer_name)
+ os.environ["COSMO_TEST_DATA_DIR"] = test_data_dir
if options.pdb:
pdb_plugin.enabled = True
https://bitbucket.org/enzo/enzo-dev/commits/1d51709ffcbc/
Changeset: 1d51709ffcbc
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 19:30:28+00:00
Summary: Fix field name.
Affected #: 1 file
diff -r 8006cc18ca50 -r 1d51709ffcbc run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
--- a/run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
+++ b/run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
@@ -6,6 +6,7 @@
from yt.analysis_modules.halo_mass_function.api import *
from yt.analysis_modules.halo_analysis.api import HaloCatalog
from yt.testing import assert_rel_equal
+from numpy.testing import assert_equal
from yt.utilities.answer_testing.framework import \
sim_dir_load
@@ -211,7 +212,8 @@
return
ds_comp = yt.load(compare_filename)
- assert_equal(output_data['num_files'], ds_comp.data['num_files'])
+ assert_equal(output_data['number_of_files'],
+ ds_comp.data['number_of_files'])
def test_phase():
es = sim_dir_load(_pf_name, path=_dir_name)
https://bitbucket.org/enzo/enzo-dev/commits/585fe05d06cf/
Changeset: 585fe05d06cf
Branch: week-of-code
User: brittonsmith
Date: 2018-05-16 19:44:42+00:00
Summary: Install girder-client and download cosmo test data from yt hub.
Affected #: 1 file
diff -r 1d51709ffcbc -r 585fe05d06cf test.sh
--- a/test.sh
+++ b/test.sh
@@ -3,7 +3,7 @@
bash ./Miniconda2-latest-Linux-x86_64.sh -b -p ./enzo-conda -f
export PATH=$PWD/enzo-conda/bin:$PATH
conda install -q -y mercurial cython h5py matplotlib sympy numpy!=1.14.0 pytest flake8 yt nose
-pip install python-hglib
+pip install python-hglib girder-client
# install OS dependencies
sudo apt-get update
@@ -46,6 +46,8 @@
# Generate the gold standard results.
cd $BITBUCKET_CLONE_DIR/run
+# First, download the ICs for the cosmology simulation tests from the yt hub
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5af9ef42ec1bd30001fcd001 CosmologySimulation
python ./test_runner.py --suite=push -o $ENZOTEST_DIR --answer-store --answer-name=push_suite --local --strict=high --verbose
# Build the tip version.
https://bitbucket.org/enzo/enzo-dev/commits/a50409bbbb45/
Changeset: a50409bbbb45
Branch: week-of-code
User: dkoh
Date: 2018-05-17 17:49:47+00:00
Summary: added dm_only tests
Affected #: 5 files
diff -r 585fe05d06cf -r a50409bbbb45 run/CosmologySimulation/dm_only/dm_only.enzotest
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/dm_only.enzotest
@@ -0,0 +1,14 @@
+name = 'dm_only'
+answer_testing_script = 'test_dm_only.py'
+nprocs = 1
+runtime = 'short'
+hydro = False
+gravity = True
+AMR = True
+cosmology = True
+cosmology_simulation = True
+dimensionality = 3
+max_time_minutes = 20
+fullsuite = True
+pushsuite = True
+quicksuite = True
diff -r 585fe05d06cf -r a50409bbbb45 run/CosmologySimulation/dm_only/test_dm_only.py
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/test_dm_only.py
@@ -0,0 +1,112 @@
+import glob
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+from numpy.testing import assert_equal
+
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE", 8)
+
+def test_hmf():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
+def test_dark_matter_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+def test_output_number():
+ ds = yt.load(os.path.join(_dir_name, 'DD0000/DD0000'))
+
+ DDnum = len(glob.glob(os.path.join(_dir_name, 'DD????/DD????')))
+ RDnum = len(glob.glob(os.path.join(_dir_name, 'RD????/RD????')))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['number_of_files'],
+ ds_comp.data['number_of_files'])
diff -r 585fe05d06cf -r a50409bbbb45 run/CosmologySimulation/dm_only/test_hmf.py
--- a/run/CosmologySimulation/dm_only/test_hmf.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import yt
-import matplotlib.pyplot as plt
-import numpy as np
-import os
-from yt.analysis_modules.halo_analysis.api import HaloCatalog
-from yt.testing import assert_rel_equal
-
-sim_dir = os.path.basename(os.getcwd())
-test_data_dir = os.path.join(
- os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
-if not os.path.exists(test_data_dir):
- os.makedirs(test_data_dir)
-generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
-
-def test_hmf():
- es = yt.simulation('dm_only.enzo','Enzo')
- es.get_time_series()
- ds = es[-1]
- hc = HaloCatalog(data_ds=ds,finder_method='fof',output_dir="halo_catalogs/catalog")
- hc.create()
- masses = hc.data_source['particle_mass'].in_units('Msun')
- h = ds.hubble_constant
- mtot = np.log10(masses*1.2) - np.log10(h)
- masses_sim = np.sort(mtot)
- sim_volume = ds.domain_width.in_units('Mpccm').prod()
- n_cumulative_sim = np.arange(len(mtot),0,-1)
- masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
-
- n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
- filename = 'data.h5'
- data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
- yt.save_as_dataset(ds,filename,data)
-
- # make a plot
- ds = yt.load(filename)
- masses = ds.data['masses']
- num = ds.data['n_sim']
- fig = plt.figure(figsize=(8,8))
- plt.semilogy(masses_sim,n_cumulative_sim,'-')
- plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
- plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
- plt.tick_params(labelsize=16)
- plt.savefig('hmf.png',format='png')
-
- compare_filename = os.path.join(test_data_dir, filename)
- if generate_answers:
- os.rename(filename, compare_filename)
- return
-
- # do the comparison
- ds_comp = yt.load(compare_filename)
-
- # assert quality to 8 decimals
- assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
- assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
-
diff -r 585fe05d06cf -r a50409bbbb45 run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -765,7 +765,7 @@
# Same with MHD2DRotorTest
ignore_list = ('GravityTest', 'ProtostellarCollapse_Std',
'ZeldovichPancake', 'AMRZeldovichPancake',
- 'MHD2DRotorTest', 'Toro-6-ShockTube', 'MHDCTOrszagTangAMR', 'MHDCTOrszagTang')
+ 'MHD2DRotorTest', 'Toro-6-ShockTube', 'MHDCTOrszagTangAMR', 'MHDCTOrszagTang','dm_only')
template = open("test_type.py.template").read()
diff -r 585fe05d06cf -r a50409bbbb45 test.sh
--- a/test.sh
+++ b/test.sh
@@ -48,6 +48,7 @@
cd $BITBUCKET_CLONE_DIR/run
# First, download the ICs for the cosmology simulation tests from the yt hub
girder-cli --api-url
https://girder.hub.yt/api/v1 download 5af9ef42ec1bd30001fcd001 CosmologySimulation
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afb0145ec1bd30001fcd024 CosmologySimulation
python ./test_runner.py --suite=push -o $ENZOTEST_DIR --answer-store --answer-name=push_suite --local --strict=high --verbose
# Build the tip version.
https://bitbucket.org/enzo/enzo-dev/commits/ecd470145d06/
Changeset: ecd470145d06
Branch: week-of-code
User: dkoh
Date: 2018-05-17 17:52:12+00:00
Summary: removed old AMR test problems
Affected #: 10 files
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRCosmology/AMRCosmology.enzo
--- a/run/CosmologySimulation/AMRCosmology/AMRCosmology.enzo
+++ /dev/null
@@ -1,118 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
-# This is a small cosmology simulation that runs to z = 0.
-# The redshift outputs can be used to create a light-cone out to z = 0.1.
-#
-# define problem
-#
-ProblemType = 30 // cosmology simulation
-TopGridRank = 3
-TopGridDimensions = 32 32 32
-SelfGravity = 1 // gravity on
-TopGridGravityBoundary = 0 // Periodic BC for gravity
-LeftFaceBoundaryCondition = 3 3 3 // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.0441
-CosmologySimulationOmegaCDMNow = 0.2239
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities
-CosmologySimulationVelocity2Name = GridVelocities
-CosmologySimulationVelocity3Name = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 1
-CosmologySimulationUseMetallicityField = 1
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyHubbleConstantNow = 0.704
-CosmologyComovingBoxSize = 32.0
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 50
-CosmologyFinalRedshift = 0
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-dtDataDump = 5
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-CosmologyOutputRedshift[0] = 0.100
-CosmologyOutputRedshift[1] = 0.089
-CosmologyOutputRedshift[2] = 0.078
-CosmologyOutputRedshift[3] = 0.067
-CosmologyOutputRedshift[4] = 0.057
-CosmologyOutputRedshift[5] = 0.047
-CosmologyOutputRedshift[6] = 0.037
-CosmologyOutputRedshift[7] = 0.027
-CosmologyOutputRedshift[8] = 0.017
-CosmologyOutputRedshift[9] = 0.007
-
-#
-# hydro parameters
-#
-HydroMethod = 0 // PPM
-Gamma = 1.6667
-PPMDiffusionParameter = 0 // diffusion off
-DualEnergyFormalism = 1 // use total & internal energy
-InterpolationMethod = 1 // SecondOrderA
-FluxCorrection = 1
-ConservativeInterpolation = 1
-CourantSafetyNumber = 0.5
-ParticleCourantSafetyNumber = 0.8
-UseMinimumPressureSupport = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 5
-MaximumGravityRefinementLevel = 5
-MaximumParticleRefinementLevel = 5
-RefineBy = 2
-CellFlaggingMethod = 2 4
-MinimumOverDensityForRefinement = 8.0 8.0
-MinimumMassForRefinementLevelExponent = 0.0 0.0
-MinimumEfficiency = 0.35
-
-#
-# microphysics parameters
-#
-MultiSpecies = 0
-RadiativeCooling = 1
-RadiationFieldType = 0
-
-#
-# star formation parameters
-#
-StarParticleCreation = 1
-StarParticleFeedback = 1
-StarMakerOverDensityThreshold = 100
-StarMakerMinimumMass = 1e6
-StarMakerMinimumDynamicalTime = 1e6
-StarMakerMassEfficiency = 0.1
-StarMassEjectionFraction = 0.25
-StarMetalYield = 0.1
-StarEnergyToThermalFeedback = 1e-5
-StarFeedbackDistRadius = 1
-StarFeedbackDistCellStep = 3
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-ParallelRootGridIO = 1
-ParallelParticleIO = 1
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRCosmology/AMRCosmology.enzotest
--- a/run/CosmologySimulation/AMRCosmology/AMRCosmology.enzotest
+++ /dev/null
@@ -1,14 +0,0 @@
-name = 'AMRCosmology'
-answer_testing_script = None
-nprocs = 2
-runtime = 'long'
-AMR = True
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 3
-author = 'Uncle Enzo'
-max_time_minutes = 120
-fullsuite = False
-pushsuite = False
-quicksuite = False
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRCosmology/AMRCosmology.inits
--- a/run/CosmologySimulation/AMRCosmology/AMRCosmology.inits
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyOmegaBaryonNow = 0.0441
-CosmologyComovingBoxSize = 32.0 // in Mpc/h
-CosmologyHubbleConstantNow = 0.704 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 50
-
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.807
-PowerSpectrumPrimordialIndex = 0.961
-PowerSpectrumRandomSeed = -312367047
-
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 1
-GridDims = 32 32 32
-
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 1
-ParticleDims = 32 32 32
-
-#
-# Names
-#
-ParticlePositionName = ParticlePositions
-ParticleVelocityName = ParticleVelocities
-GridDensityName = GridDensity
-GridVelocityName = GridVelocities
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRCosmology/notes.txt
--- a/run/CosmologySimulation/AMRCosmology/notes.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-This is a cosmology simulation that runs to z = 0 with tabulated
-radiative cooling and conventional, non-radiative star formation and
-feedback. It will run on 2 processors in about 40 minutes.
-
-note: you'll need a
cool_rates.in file, which can be found in the inputs
-directory
-
-Usage:
-./inits.exe -d AMRCosmology.inits
-mpirun -np 2 ./ring.exe pv ParticlePositions ParticleVelocities
-mpirun -np 2 ./enzo.exe -d AMRCosmology.enzo
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzo
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzo
+++ /dev/null
@@ -1,121 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Nested Cosmology Simulation
-# This is a cosmology simulation that runs until a dense object collapses.
-#
-# define problem
-#
-ProblemType = 30
-TopGridRank = 3
-SelfGravity = 1
-TopGridGravityBoundary = 0
-LeftFaceBoundaryCondition = 3 3 3
-RightFaceBoundaryCondition = 3 3 3
-BaryonSelfGravityApproximation = 1
-TopGridDimensions = 32 32 32
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.04
-CosmologySimulationOmegaCDMNow = 0.26
-CosmologySimulationInitialTemperature = 140.0
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities
-CosmologySimulationVelocity2Name = GridVelocities
-CosmologySimulationVelocity3Name = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 3
-CosmologySimulationGridDimension[1] = 32 32 32
-CosmologySimulationGridLeftEdge[1] = 0.25 0.25 0.25
-CosmologySimulationGridRightEdge[1] = 0.75 0.75 0.75
-CosmologySimulationGridLevel[1] = 1
-CosmologySimulationGridDimension[2] = 32 32 32
-CosmologySimulationGridLeftEdge[2] = 0.375 0.375 0.375
-CosmologySimulationGridRightEdge[2] = 0.625 0.625 0.625
-CosmologySimulationGridLevel[2] = 2
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyHubbleConstantNow = 0.70
-CosmologyComovingBoxSize = 0.3
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 99
-CosmologyFinalRedshift = 15
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-
-dtDataDump = 1.0
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-CosmologyOutputRedshift[0] = 99
-CosmologyOutputRedshift[1] = 40
-CosmologyOutputRedshift[2] = 35
-CosmologyOutputRedshift[3] = 30
-CosmologyOutputRedshift[4] = 25
-CosmologyOutputRedshift[5] = 24
-CosmologyOutputRedshift[6] = 23
-CosmologyOutputRedshift[7] = 22
-CosmologyOutputRedshift[8] = 21
-CosmologyOutputRedshift[9] = 20
-CosmologyOutputRedshift[10] = 19
-CosmologyOutputRedshift[11] = 18
-CosmologyOutputRedshift[12] = 17
-CosmologyOutputRedshift[13] = 16
-CosmologyOutputRedshift[14] = 15
-
-#
-# hydro parameters
-#
-Gamma = 1.6667
-PPMDiffusionParameter = 0
-DualEnergyFormalism = 1
-HydroMethod = 0
-InterpolationMethod = 1
-CourantSafetyNumber = 0.4
-ParticleCourantSafetyNumber = 0.6
-UseMinimumPressureSupport = 0
-FluxCorrection = 1
-ConservativeInterpolation = 0
-
-#
-# microphysics parameters
-#
-RadiativeCooling = 1
-MultiSpecies = 2
-RadiationFieldType = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 12
-MaximumGravityRefinementLevel = 12
-OutputFirstTimeAtLevel = 6
-StopFirstTimeAtLevel = 12
-RefineBy = 2
-CellFlaggingMethod = 2 4 7
-MinimumEfficiency = 0.35
-MinimumOverDensityForRefinement = 0.125 0.125
-RefineRegionLeftEdge = 0.375 0.375 0.375
-RefineRegionRightEdge = 0.625 0.625 0.625
-MinimumMassForRefinementLevelExponent = -0.3
-MinimumEnergyRatioForRefinement = 0.4
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-#ParallelRootGridIO = 1
-#ParallelParticleIO = 1
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzotest
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzotest
+++ /dev/null
@@ -1,14 +0,0 @@
-name = 'AMRNestedCosmology'
-answer_testing_script = None
-nprocs = 1
-runtime = 'medium'
-AMR = True
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 3
-author = 'Uncle Enzo'
-max_time_minutes = 10
-fullsuite = False
-pushsuite = False
-quicksuite = False
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubGrid.inits
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubGrid.inits
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyOmegaBaryonNow = 0.04
-CosmologyComovingBoxSize = 0.3 // in Mpc/h
-CosmologyHubbleConstantNow = 0.70 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 99
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed = -267478895
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 2
-GridDims = 32 32 32
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 2
-ParticleDims = 32 32 32
-
-#
-# Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndexInNewCenterTopGridSystem = 8 8 8
-EndIndexInNewCenterTopGridSystem = 23 23 23
-RootGridDims = 32 32 32
-#
-# Names
-#
-ParticlePositionName = ParticlePositions.1
-ParticleVelocityName = ParticleVelocities.1
-GridDensityName = GridDensity.1
-GridVelocityName = GridVelocities.1
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubSubGrid.inits
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubSubGrid.inits
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyOmegaBaryonNow = 0.04
-CosmologyComovingBoxSize = 0.3 // in Mpc/h
-CosmologyHubbleConstantNow = 0.70 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 99
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed = -267478895
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 1
-GridDims = 32 32 32
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 1
-ParticleDims = 32 32 32
-
-#
-# Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndexInNewCenterTopGridSystem = 12 12 12
-EndIndexInNewCenterTopGridSystem = 19 19 19
-RootGridDims = 32 32 32
-#
-# Names
-#
-ParticlePositionName = ParticlePositions.2
-ParticleVelocityName = ParticleVelocities.2
-GridDensityName = GridDensity.2
-GridVelocityName = GridVelocities.2
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_TopGrid.inits
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_TopGrid.inits
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyOmegaBaryonNow = 0.04
-CosmologyComovingBoxSize = 0.3 // in Mpc/h
-CosmologyHubbleConstantNow = 0.70 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 99
-
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed = -267478895
-
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 4
-GridDims = 32 32 32
-
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 4
-ParticleDims = 32 32 32
-
-#
-# Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndex = 0 0 0
-RootGridDims = 32 32 32
-
-#
-# Names
-#
-ParticlePositionName = ParticlePositions.0
-ParticleVelocityName = ParticleVelocities.0
-GridDensityName = GridDensity.0
-GridVelocityName = GridVelocities.0
diff -r a50409bbbb45 -r ecd470145d06 run/CosmologySimulation/AMRNestedCosmology/notes.txt
--- a/run/CosmologySimulation/AMRNestedCosmology/notes.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-This is a cosmological simulation that simulates the collapse of a
-metal-free object at z ~ 20. It uses the primordial chemistry with H2
-cooling. The simulation stops when the maximum refinement level
-reaches 12. It will run on a single processor in about 5 minutes.
-
-Usage:
-./inits.exe -d -s AMRNestedCosmology_SubGrid.inits AMRNestedCosmology_TopGrid.init
-./inits.exe -d -s AMRNestedCosmology_SubSubGrid.inits AMRNestedCosmology_SubGrid.inits
-./inits.exe -d AMRNestedCosmology_SubSubGrid.inits
-./enzo.exe -d AMRNestedCosmology.enzo
-
-To run in parallel with parallel i/o:
-Uncomment the following lines in AMRNestedCosmology.enzo:
-#ParallelRootGridIO = 1
-#ParallelParticleIO = 1
-
-After running inits, and before running enzo, do:
-mpirun -np NPROCS ./ring.exe pv ParticlePositions.0 ParticleVelocities.0
-mpirun -np NPROCS ./ring.exe pv ParticlePositions.1 ParticleVelocities.1
-mpirun -np NPROCS ./ring.exe pv ParticlePositions.2 ParticleVelocities.2
https://bitbucket.org/enzo/enzo-dev/commits/470bc748b217/
Changeset: 470bc748b217
Branch: week-of-code
User: brittonsmith
Date: 2018-05-18 16:02:32+00:00
Summary: Decreaing max run time for the dm_only run.
Affected #: 1 file
diff -r ecd470145d06 -r 470bc748b217 run/CosmologySimulation/dm_only/dm_only.enzotest
--- a/run/CosmologySimulation/dm_only/dm_only.enzotest
+++ b/run/CosmologySimulation/dm_only/dm_only.enzotest
@@ -8,7 +8,7 @@
cosmology = True
cosmology_simulation = True
dimensionality = 3
-max_time_minutes = 20
+max_time_minutes = 1
fullsuite = True
pushsuite = True
quicksuite = True
https://bitbucket.org/enzo/enzo-dev/commits/b4ea19aaf36c/
Changeset: b4ea19aaf36c
Branch: week-of-code
User: brittonsmith
Date: 2018-05-18 19:39:24+00:00
Summary: Adding amr_nested_cosmology test simulation.
Affected #: 4 files
diff -r 470bc748b217 -r b4ea19aaf36c run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzo
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzo
@@ -0,0 +1,126 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0441
+CosmologySimulationOmegaCDMNow = 0.2239
+CosmologySimulationDensityName = GridDensity
+CosmologySimulationVelocity1Name = GridVelocities_x
+CosmologySimulationVelocity2Name = GridVelocities_y
+CosmologySimulationVelocity3Name = GridVelocities_z
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 2
+CosmologySimulationGridDimension[1] = 10 14 14
+CosmologySimulationGridLeftEdge[1] = 0.40625 0.375 0.34375
+CosmologySimulationGridRightEdge[1] = 0.5625 0.59375 0.5625
+CosmologySimulationGridLevel[1] = 1
+CosmologySimulationUseMetallicityField = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaDarkMatterNow = 0.2239
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 1.8
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 5
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+OutputCoolingTime = 1
+OutputTemperature = 1
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4 8
+MinimumOverDensityForRefinement = 1.0 1.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+MustRefineParticlesCreateParticles = 3
+MustRefineParticlesRefineToLevel = 1
+CosmologySimulationParticleTypeName = RefinementMask
+
+#
+# microphysics parameters
+#
+RadiativeCooling = 1
+use_grackle = 1
+MultiSpecies = 0 // sets grackle.primordial_chemistry
+MetalCooling = 1 // sets grackle.metal_cooling
+grackle_data_file = CloudyData_UVB=HM2012.h5
+UVbackground = 1
+CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
+
+#
+# star formation parameters
+#
+StarParticleCreation = 1
+StarParticleFeedback = 1
+StarMakerOverDensityThreshold = 100
+StarMakerMinimumMass = 1e6
+StarMakerMinimumDynamicalTime = 1e6
+StarMakerMassEfficiency = 0.1
+StarMassEjectionFraction = 0.25
+StarMetalYield = 0.1
+StarEnergyToThermalFeedback = 1e-5
+StarFeedbackDistRadius = 1
+StarFeedbackDistCellStep = 3
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
diff -r 470bc748b217 -r b4ea19aaf36c run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
@@ -0,0 +1,14 @@
+name = 'amr_nested_cosmology'
+answer_testing_script = 'test_amr_cosmology.py'
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+cosmology_simulation = True
+dimensionality = 3
+max_time_minutes = 20
+fullsuite = True
+pushsuite = True
+quicksuite = True
diff -r 470bc748b217 -r b4ea19aaf36c run/CosmologySimulation/amr_nested_cosmology/test_amr_nested_cosmology.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/test_amr_nested_cosmology.py
@@ -0,0 +1,260 @@
+import glob
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+from numpy.testing import assert_equal
+
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE", 8)
+
+def test_hmf():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
+def test_max_density_halo_quantities():
+ ds = yt.load(os.path.join(_dir_name, 'DD0013/DD0013'))
+
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # Save the quantities to be compared
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+def test_dark_matter_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+def test_individual_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_total_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_output_number():
+ ds = yt.load(os.path.join(_dir_name, 'DD0000/DD0000'))
+
+ DDnum = len(glob.glob(os.path.join(_dir_name, 'DD????/DD????')))
+ RDnum = len(glob.glob(os.path.join(_dir_name, 'RD????/RD????')))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['number_of_files'],
+ ds_comp.data['number_of_files'])
+
+def test_phase():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series(redshifts=[0])
+ ds = es[-1]
+ ad = ds.all_data()
+ profile = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cell_mass")])
+ profile1 = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cooling_time")],
+ weight_field=('gas', 'cell_mass'))
+ density = profile.x
+ temperature = profile['gas', 'temperature']
+ cooling_time = profile1['gas', 'cooling_time']
+ cell_mass = profile['gas', 'cell_mass']
+
+ filename = 'phase_data.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'density': density, 'temperature': temperature,
+ 'cooling_time': cooling_time, 'cell_mass': cell_mass}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
+ pp.set_unit('cell_mass', 'Msun')
+ pp.save(_dir_name)
+ pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time',
+ weight_field='cell_mass')
+ pp1.save(_dir_name)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['density'], ds_comp.data['density'], 8)
+ assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
+ assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
+ assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
diff -r 470bc748b217 -r b4ea19aaf36c test.sh
--- a/test.sh
+++ b/test.sh
@@ -48,7 +48,6 @@
cd $BITBUCKET_CLONE_DIR/run
# First, download the ICs for the cosmology simulation tests from the yt hub
girder-cli --api-url
https://girder.hub.yt/api/v1 download 5af9ef42ec1bd30001fcd001 CosmologySimulation
-girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afb0145ec1bd30001fcd024 CosmologySimulation
python ./test_runner.py --suite=push -o $ENZOTEST_DIR --answer-store --answer-name=push_suite --local --strict=high --verbose
# Build the tip version.
https://bitbucket.org/enzo/enzo-dev/commits/73cab2f6e23a/
Changeset: 73cab2f6e23a
Branch: week-of-code
User: brittonsmith
Date: 2018-05-18 20:08:45+00:00
Summary: Adding notes for each cosmology simulation.
Affected #: 3 files
diff -r b4ea19aaf36c -r 73cab2f6e23a run/CosmologySimulation/amr_cosmology/notes.txt
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/notes.txt
@@ -0,0 +1,20 @@
+This is a cosmology simulation with Cen & Ostriker star
+formation/feedback, cooling with Grackle, and initial conditions made
+with MUSIC. It consists of a 32 Mpc/h box with 32^3 root grid cells
+and dark matter particles and 5 levels of AMR.
+
+This simulation will run to z = 0 in about 10 minutes on a single
+core. To run this, you will need to copy the file,
+CloudyData_UVB=HM2012.h5, from the input directory of your Grackle
+source, to the run directory of the simulation.
+
+To generate the ICs with MUSIC:
+./MUSIC amr_cosmology.conf
+
+Initial conditions can also be downloaded from the "Enzo test data"
+collection on the yt Hub (
hub.yt), or do:
+pip install girder-client
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afb0040ec1bd30001fcd002
+
+To run the simulation:
+./enzo.exe -d amr_cosmology.enzo
diff -r b4ea19aaf36c -r 73cab2f6e23a run/CosmologySimulation/amr_nested_cosmology/notes.txt
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/notes.txt
@@ -0,0 +1,19 @@
+This is a variation of the amr_cosmology simulation with 1 level of
+initial refinement and must-refine-particles. The simulation uses Cen
+& Ostriker star formation/feedback, cooling with Grackle, and initial
+conditions made with MUSIC. The nested refinement zooms in on the most
+massive halo in the box at z = 1.8. Must-refine-particles are used to
+allow AMR only for particles that end up within 3 virial radii of the
+most massive halo at z = 1.8.
+
+The zoom initial conditions with must-refine-particle flagging was
+created using the method outlined in
+
https://bitbucket.org/jwise77/enzo-mrp-music
+
+Initial conditions can be downloaded from the "Enzo test data"
+collection on the yt Hub (
hub.yt), or do:
+pip install girder-client
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afef79bec1bd30001fcd07e
+
+To run the simulation:
+./enzo.exe -d amr_nested_cosmology.enzo
diff -r b4ea19aaf36c -r 73cab2f6e23a run/CosmologySimulation/dm_only/notes.txt
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/notes.txt
@@ -0,0 +1,15 @@
+This is a dark-matter-only version of the amr_cosmology simulation. It
+consists of a 32 Mpc/h box with 32^3 dark matter particles and 5
+levels of AMR. This simulation will run to z = 0 in less than a minute
+on a single core.
+
+To generate the ICs with MUSIC:
+./MUSIC dm_only.conf
+
+Initial conditions can also be downloaded from the "Enzo test data"
+collection on the yt Hub (
hub.yt), or do:
+pip install girder-client
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afb0145ec1bd30001fcd024
+
+To run the simulation:
+./enzo.exe -d dm_only.enzo
https://bitbucket.org/enzo/enzo-dev/commits/14d39096fa2f/
Changeset: 14d39096fa2f
Branch: week-of-code
User: brittonsmith
Date: 2018-05-18 20:12:43+00:00
Summary: Updating note with runtime.
Affected #: 1 file
diff -r 73cab2f6e23a -r 14d39096fa2f run/CosmologySimulation/amr_nested_cosmology/notes.txt
--- a/run/CosmologySimulation/amr_nested_cosmology/notes.txt
+++ b/run/CosmologySimulation/amr_nested_cosmology/notes.txt
@@ -4,7 +4,8 @@
conditions made with MUSIC. The nested refinement zooms in on the most
massive halo in the box at z = 1.8. Must-refine-particles are used to
allow AMR only for particles that end up within 3 virial radii of the
-most massive halo at z = 1.8.
+most massive halo at z = 1.8. The simulation will run in about 1
+minute on a single core.
The zoom initial conditions with must-refine-particle flagging was
created using the method outlined in
https://bitbucket.org/enzo/enzo-dev/commits/bef34d11b136/
Changeset: bef34d11b136
Branch: week-of-code
User: brittonsmith
Date: 2018-05-18 20:13:12+00:00
Summary: Removing old AMRCosmology_Grackle simulation.
Affected #: 4 files
diff -r 14d39096fa2f -r bef34d11b136 run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzo
--- a/run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzo
+++ /dev/null
@@ -1,122 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
-# This is a small cosmology simulation that runs to z = 0.
-# The redshift outputs can be used to create a light-cone out to z = 0.1.
-#
-# define problem
-#
-ProblemType = 30 // cosmology simulation
-TopGridRank = 3
-TopGridDimensions = 32 32 32
-SelfGravity = 1 // gravity on
-TopGridGravityBoundary = 0 // Periodic BC for gravity
-LeftFaceBoundaryCondition = 3 3 3 // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.0441
-CosmologySimulationOmegaCDMNow = 0.2239
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities
-CosmologySimulationVelocity2Name = GridVelocities
-CosmologySimulationVelocity3Name = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 1
-CosmologySimulationUseMetallicityField = 1
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyHubbleConstantNow = 0.704
-CosmologyComovingBoxSize = 32.0
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 50
-CosmologyFinalRedshift = 0
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-dtDataDump = 5
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-CosmologyOutputRedshift[0] = 0.100
-CosmologyOutputRedshift[1] = 0.089
-CosmologyOutputRedshift[2] = 0.078
-CosmologyOutputRedshift[3] = 0.067
-CosmologyOutputRedshift[4] = 0.057
-CosmologyOutputRedshift[5] = 0.047
-CosmologyOutputRedshift[6] = 0.037
-CosmologyOutputRedshift[7] = 0.027
-CosmologyOutputRedshift[8] = 0.017
-CosmologyOutputRedshift[9] = 0.007
-
-#
-# hydro parameters
-#
-HydroMethod = 0 // PPM
-Gamma = 1.6667
-PPMDiffusionParameter = 0 // diffusion off
-DualEnergyFormalism = 1 // use total & internal energy
-InterpolationMethod = 1 // SecondOrderA
-FluxCorrection = 1
-ConservativeInterpolation = 1
-CourantSafetyNumber = 0.5
-ParticleCourantSafetyNumber = 0.8
-UseMinimumPressureSupport = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 5
-MaximumGravityRefinementLevel = 5
-MaximumParticleRefinementLevel = 5
-RefineBy = 2
-CellFlaggingMethod = 2 4
-MinimumOverDensityForRefinement = 8.0 8.0
-MinimumMassForRefinementLevelExponent = 0.0 0.0
-MinimumEfficiency = 0.35
-
-#
-# microphysics parameters
-#
-RadiativeCooling = 1
-use_grackle = 1
-MultiSpecies = 0 // sets grackle.primordial_chemistry
-MetalCooling = 1 // sets grackle.metal_cooling
-grackle_data_file = CloudyData_UVB=HM2012.h5
-UVbackground = 1
-CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
-
-#
-# star formation parameters
-#
-StarParticleCreation = 1
-StarParticleFeedback = 1
-StarMakerOverDensityThreshold = 100
-StarMakerMinimumMass = 1e6
-StarMakerMinimumDynamicalTime = 1e6
-StarMakerMassEfficiency = 0.1
-StarMassEjectionFraction = 0.25
-StarMetalYield = 0.1
-StarEnergyToThermalFeedback = 1e-5
-StarFeedbackDistRadius = 1
-StarFeedbackDistCellStep = 3
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-ParallelRootGridIO = 1
-ParallelParticleIO = 1
diff -r 14d39096fa2f -r bef34d11b136 run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzotest
--- a/run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzotest
+++ /dev/null
@@ -1,14 +0,0 @@
-name = 'AMRCosmology_Grackle'
-answer_testing_script = None
-nprocs = 2
-runtime = 'long'
-AMR = True
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 3
-author = 'Uncle Enzo'
-max_time_minutes = 120
-fullsuite = False
-pushsuite = False
-quicksuite = False
diff -r 14d39096fa2f -r bef34d11b136 run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.inits
--- a/run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.inits
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyOmegaBaryonNow = 0.0441
-CosmologyComovingBoxSize = 32.0 // in Mpc/h
-CosmologyHubbleConstantNow = 0.704 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 50
-
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.807
-PowerSpectrumPrimordialIndex = 0.961
-PowerSpectrumRandomSeed = -312367047
-
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 1
-GridDims = 32 32 32
-
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 1
-ParticleDims = 32 32 32
-
-#
-# Names
-#
-ParticlePositionName = ParticlePositions
-ParticleVelocityName = ParticleVelocities
-GridDensityName = GridDensity
-GridVelocityName = GridVelocities
diff -r 14d39096fa2f -r bef34d11b136 run/CosmologySimulation/AMRCosmology_Grackle/notes.txt
--- a/run/CosmologySimulation/AMRCosmology_Grackle/notes.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This is a cosmology simulation identical to AMRCosmology, except using
-the Grackle to solve the cooling. See the documentation
-for more information on running with Grackle.
-
-This simulation runs to z = 0 with tabulated primordial and metal
-cooling from Grackle and conventional, non-radiative star formation and
-feedback. It will run on 2 processors in about 40 minutes.
-
-To run this, you will need to copy the file, CloudyData_UVB=HM2012.h5,
-from the input directory of your Grackle source, to the run directory
-of the simulation.
-
-Usage:
-./inits.exe -d AMRCosmology_Grackle.inits
-mpirun -np 2 ./ring.exe pv ParticlePositions ParticleVelocities
-mpirun -np 2 ./enzo.exe -d AMRCosmology_Grackle.enzo
https://bitbucket.org/enzo/enzo-dev/commits/e7aed1e0cbfd/
Changeset: e7aed1e0cbfd
Branch: week-of-code
User: brittonsmith
Date: 2018-07-23 20:54:49+00:00
Summary: Merging with tip.
Affected #: 167 files
diff -r bef34d11b136 -r e7aed1e0cbfd .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -21,3 +21,4 @@
dc247c9b1e5ade9b984f19b1cc21a29225d9a0c6 gold-standard-v5
e19bb86dfece56363d7165620db4f5aa9ab75405 gold-standard-v6
1bd78f067e9168391ac76d6234d5af1e2bd9273b gold-standard-v7
+cc6d4f93e6ee6df2c5fdd8107f135a12410a826e gold-standard-v8
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/CreateSubgridList.html
--- a/doc/flowchart/CreateSubgridList.html
+++ b/doc/flowchart/CreateSubgridList.html
@@ -1,4 +1,4 @@
<img src="CreateSubgridList.gif" usemap="#CreateSubgridList" Border = 0><map name="CreateSubgridList">
-<area shape=rect coords="126,262, 270,334" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ReturnFluxDims.C">
+<area shape=rect coords="126,262, 270,334" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ReturnFluxDims.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/DetermineDT.html
--- a/doc/flowchart/DetermineDT.html
+++ b/doc/flowchart/DetermineDT.html
@@ -1,5 +1,5 @@
<img src="DetermineDT.gif" usemap="#DetermineDT"><map name="DetermineDT">
-<area shape=rect coords="20,596, 200,632" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid.h#L207">
-<area shape=rect coords="20,38, 200,74" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ComputeTimeStep.C">
+<area shape=rect coords="20,596, 200,632" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid.h#L207">
+<area shape=rect coords="20,38, 200,74" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComputeTimeStep.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveHierarchy.html
--- a/doc/flowchart/EvolveHierarchy.html
+++ b/doc/flowchart/EvolveHierarchy.html
@@ -1,18 +1,18 @@
<img src="EvolveHierarchy.gif" usemap="#EvolveHierarchy" Border = 0><map name="EvolveHierarchy"><area shape=poly coords="236,1694, 229,1680, 212,1668, 185,1660, 155,1658, 124,1660, 97,1668, 80,1680, 74,1694, 80,1707, 97,1719, 124,1727, 155,1730, 185,1727, 212,1719, 229,1707" href="main.html">
-<area shape=rect coords="65,1586, 245,1622" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/WriteAllData.C">
-<area shape=rect coords="281,1406, 461,1451" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/ReduceFragmentation.C">
-<area shape=rect coords="65,1334, 245,1370" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CheckForOutput.C">
-<area shape=rect coords="65,479, 245,515" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CheckForOutput.C">
-<area shape=rect coords="65,1271, 245,1307" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CheckForTimeAction.C">
+<area shape=rect coords="65,1586, 245,1622" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/WriteAllData.C">
+<area shape=rect coords="281,1406, 461,1451" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ReduceFragmentation.C">
+<area shape=rect coords="65,1334, 245,1370" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckForOutput.C">
+<area shape=rect coords="65,479, 245,515" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckForOutput.C">
+<area shape=rect coords="65,1271, 245,1307" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckForTimeAction.C"><area shape=rect coords="65,1046, 245,1082" href="RebuildHierarchy.html"><area shape=rect coords="65,965, 245,1001" href="EvolveLevel.html">
-<area shape=rect coords="65,776, 245,812" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/OutputLevelInformation.C">
+<area shape=rect coords="65,776, 245,812" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/OutputLevelInformation.C"><area shape=rect coords="65,830, 245,911" href="DetermineDT.html"><area shape=rect coords="65,542, 245,578" href="RebuildHierarchy.html">
-<area shape=rect coords="74,326, 236,362" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_SetExternalBoundaryValues.C">
-<area shape=rect coords="74,380, 236,416" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CopyOverlappingZones.C">
+<area shape=rect coords="74,326, 236,362" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SetExternalBoundaryValues.C">
+<area shape=rect coords="74,380, 236,416" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CopyOverlappingZones.C"><area shape=rect coords="74,101, 236,137" href="
http://lca.ucsd.edu/projects/enzo/wiki/UserGuide/FlowChart#ReturnCPUTime">
-<area shape=poly coords="236,38, 229,24, 212,12, 185,4, 155,2, 124,4, 97,12, 80,24, 74,38, 80,51, 97,63, 124,71, 155,74, 185,71, 212,63, 229,51" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveHierarchy.C">
+<area shape=poly coords="236,38, 229,24, 212,12, 185,4, 155,2, 124,4, 97,12, 80,24, 74,38, 80,51, 97,63, 124,71, 155,74, 185,71, 212,63, 229,51" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveHierarchy.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel.html
--- a/doc/flowchart/EvolveLevel.html
+++ b/doc/flowchart/EvolveLevel.html
@@ -1,20 +1,20 @@
<img src="EvolveLevel.gif" usemap="#EvolveLevel" Border = 0><map name="EvolveLevel">
-<area shape=rect coords="65,1757, 218,1802" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_AddToBoundaryFluxes.C">
+<area shape=rect coords="65,1757, 218,1802" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_AddToBoundaryFluxes.C"><area shape=rect coords="65,1703, 218,1748" href="EvolveLevel_UpdateFromFinerGrids.html"><area shape=poly coords="292,2083, 286,2069, 269,2057, 242,2049, 211,2047, 180,2049, 153,2057, 136,2069, 130,2083, 136,2096, 153,2108, 180,2116, 211,2119, 242,2116, 269,2108, 286,2096" href="EvolveHierarchy.html"><area shape=rect coords="65,1919, 218,1955" href="RebuildHierarchy.html">
-<area shape=rect coords="47,1838, 236,1874" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/RadiationFieldUpdate.C">
-<area shape=rect coords="245,1577, 344,1613" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveLevel.C">
-<area shape=rect coords="39,1345, 246,1408" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=rect coords="47,1838, 236,1874" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/RadiationFieldUpdate.C">
+<area shape=rect coords="245,1577, 344,1613" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevel.C">
+<area shape=rect coords="39,1345, 246,1408" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C"><area shape=rect coords="80,1165, 224,1273" href="EvolveLevel_Sub1.html"><area shape=rect coords="101,1082, 191,1118" href="SolveHydroEquations.html">
-<area shape=rect coords="83,947, 218,1028" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_CopyBaryonFieldToOldBaryonField.C">
+<area shape=rect coords="83,947, 218,1028" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_CopyBaryonFieldToOldBaryonField.C"><area shape=rect coords="227,857, 335,929" href="EvolveLevel_Gravity.html">
-<area shape=rect coords="254,623, 353,668" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=rect coords="254,623, 353,668" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C"><area shape=rect coords="65,524, 218,578" href="CreateSubgridList.html"><area shape=rect coords="65,461, 218,497" href="DetermineDT.html">
-<area shape=rect coords="92,254, 209,317" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ClearBoundaryFluxes.C">
-<area shape=rect coords="59,113, 248,176" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveLevelRoutinesOptimized.C">
-<area shape=rect coords="47,2, 263,74" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveLevel.C">
+<area shape=rect coords="92,254, 209,317" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ClearBoundaryFluxes.C">
+<area shape=rect coords="59,113, 248,176" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=rect coords="47,2, 263,74" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevel.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel_CorrectForRefinedFluxes.html
--- a/doc/flowchart/EvolveLevel_CorrectForRefinedFluxes.html
+++ b/doc/flowchart/EvolveLevel_CorrectForRefinedFluxes.html
@@ -2,7 +2,7 @@
Border = 0><map name="EvolveLevel_CorrectForRefinedFluxes"><area shape=poly coords="336,2347, 327,2332, 305,2318, 269,2310, 228,2307, 187,2310, 151,2318, 129,2332, 120,2347, 129,2362, 151,2376, 187,2384, 228,2388, 269,2384, 305,2376, 327,2362" href="EvolveLevel_UpdateFromFinerGrids.html">
-<area shape=rect coords="354,192, 471,228" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CosmologyComputeExpansionFactor.C">
-<area shape=rect coords="174,120, 300,156" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_IdentifyPhysicalQuantities.C">
-<area shape=poly coords="344,51, 335,32, 313,16, 279,5, 240,2, 201,5, 167,16, 145,32, 137,51, 145,70, 167,86, 201,97, 240,101, 279,97, 313,86, 335,70" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_CorrectForRefinedFluxes.C">
+<area shape=rect coords="354,192, 471,228" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CosmologyComputeExpansionFactor.C">
+<area shape=rect coords="174,120, 300,156" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=poly coords="344,51, 335,32, 313,16, 279,5, 240,2, 201,5, 167,16, 145,32, 137,51, 145,70, 167,86, 201,97, 240,101, 279,97, 313,86, 335,70" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_CorrectForRefinedFluxes.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.html
--- a/doc/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.html
+++ b/doc/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.html
@@ -2,7 +2,7 @@
usemap="#EvolveLevel_GetProjectedBoundaryFluxes" Border=0><map name="EvolveLevel_GetProjectedBoundaryFluxes"><area shape=poly coords="258,1658, 250,1644, 229,1632, 196,1624, 159,1622, 121,1624, 88,1632, 68,1644, 60,1658, 68,1671, 88,1683, 121,1691, 159,1694, 196,1691, 229,1683, 250,1671" href="EvolveLevel_UpdateFromFinerGrids.html">
-<area shape=rect coords="258,1487, 384,1532" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationSendFluxes.C">
-<area shape=rect coords="258,1352, 384,1397" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationReceiveFluxes.C">
-<area shape=poly coords="276,38, 267,24, 244,12, 209,4, 168,2, 127,4, 91,12, 68,24, 60,38, 68,51, 91,63, 127,71, 168,74, 209,71, 244,63, 267,51" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_GetProjectedBoundaryFluxes.C">
+<area shape=rect coords="258,1487, 384,1532" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationSendFluxes.C">
+<area shape=rect coords="258,1352, 384,1397" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationReceiveFluxes.C">
+<area shape=poly coords="276,38, 267,24, 244,12, 209,4, 168,2, 127,4, 91,12, 68,24, 60,38, 68,51, 91,63, 127,71, 168,74, 209,71, 244,63, 267,51" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_GetProjectedBoundaryFluxes.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel_Gravity.html
--- a/doc/flowchart/EvolveLevel_Gravity.html
+++ b/doc/flowchart/EvolveLevel_Gravity.html
@@ -1,7 +1,7 @@
<img src="EvolveLevel_Gravity.gif" usemap="#EvolveLevel_Gravity" Border = 0><map name="EvolveLevel_Gravity">
-<area shape=rect coords="185,334, 266,388" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CheckEnergyConservation.C">
-<area shape=rect coords="185,181, 275,253" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo//Grid_ComputeAccelerationFieldExternal.C">
-<area shape=rect coords="167,109, 248,145" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo//Grid_ComputeAccelerations.C">
-<area shape=rect coords="167,55, 248,91" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo//Grid_SolveForPotential.C">
+<area shape=rect coords="185,334, 266,388" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckEnergyConservation.C">
+<area shape=rect coords="185,181, 275,253" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo//Grid_ComputeAccelerationFieldExternal.C">
+<area shape=rect coords="167,109, 248,145" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo//Grid_ComputeAccelerations.C">
+<area shape=rect coords="167,55, 248,91" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo//Grid_SolveForPotential.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel_ProjectSolutionToParentGrid.html
--- a/doc/flowchart/EvolveLevel_ProjectSolutionToParentGrid.html
+++ b/doc/flowchart/EvolveLevel_ProjectSolutionToParentGrid.html
@@ -2,7 +2,7 @@
usemap="#EvolveLevel_ProjectSolutionToParentGrid" Border = 0><map name="EvolveLevel_ProjectSolutionToParentGrid"><area shape=poly coords="293,1860, 285,1846, 264,1834, 232,1826, 194,1824, 156,1826, 124,1834, 103,1846, 95,1860, 103,1873, 124,1885, 156,1893, 194,1896, 232,1893, 264,1885, 285,1873" href="EvolveLevel_UpdateFromFinerGrids.html">
-<area shape=rect coords="266,1311, 392,1401" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_Irecv_CommunicationReceiveRegion.C">
-<area shape=rect coords="158,636, 284,672" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_IdentifyPhysicalQuantities.C">
-<area shape=poly coords="311,123, 303,109, 282,97, 250,89, 212,87, 174,89, 142,97, 121,109, 113,123, 121,136, 142,148, 174,156, 212,159, 250,156, 282,148, 303,136" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ProjectSolutionToParentGrid.C">
+<area shape=rect coords="266,1311, 392,1401" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_Irecv_CommunicationReceiveRegion.C">
+<area shape=rect coords="158,636, 284,672" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=poly coords="311,123, 303,109, 282,97, 250,89, 212,87, 174,89, 142,97, 121,109, 113,123, 121,136, 142,148, 174,156, 212,159, 250,156, 282,148, 303,136" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ProjectSolutionToParentGrid.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel_Sub1.html
--- a/doc/flowchart/EvolveLevel_Sub1.html
+++ b/doc/flowchart/EvolveLevel_Sub1.html
@@ -1,9 +1,9 @@
<img src="EvolveLevel_Sub1.gif" usemap="#EvolveLevel_Sub1" Border = 0><map name="EvolveLevel_Sub1">
-<area shape=rect coords="47,217, 173,253" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/UpdateParticlePositions.C">
-<area shape=rect coords="47,271, 173,298" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_StarParticleHandler.C">
-<area shape=rect coords="209,496, 281,532" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ComovingExpansionTerms.C">
-<area shape=rect coords="191,343, 299,397" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid.h#L799">
-<area shape=rect coords="209,145, 281,181" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_SolveRadiativeCooling.C">
-<area shape=rect coords="209,64, 281,100" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_SolveRateEquations.C">
+<area shape=rect coords="47,217, 173,253" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/UpdateParticlePositions.C">
+<area shape=rect coords="47,271, 173,298" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_StarParticleHandler.C">
+<area shape=rect coords="209,496, 281,532" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComovingExpansionTerms.C">
+<area shape=rect coords="191,343, 299,397" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid.h#L799">
+<area shape=rect coords="209,145, 281,181" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SolveRadiativeCooling.C">
+<area shape=rect coords="209,64, 281,100" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SolveRateEquations.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/EvolveLevel_UpdateFromFinerGrids.html
--- a/doc/flowchart/EvolveLevel_UpdateFromFinerGrids.html
+++ b/doc/flowchart/EvolveLevel_UpdateFromFinerGrids.html
@@ -5,5 +5,5 @@
<area shape=rect coords="101,413, 245,458" href="EvolveLevel_ProjectSolutionToParentGrid.html"><area shape=rect coords="101,278, 245,323" href="EvolveLevel_CorrectForRefinedFluxes.html"><area shape=rect coords="101,215, 245,260" href="EvolveLevel_GetProjectedBoundaryFluxes.html">
-<area shape=poly coords="272,42, 265,27, 245,13, 214,5, 178,2, 142,5, 111,13, 91,27, 83,42, 91,57, 111,71, 142,79, 178,83, 214,79, 245,71, 265,57" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=poly coords="272,42, 265,27, 245,13, 214,5, 178,2, 142,5, 111,13, 91,27, 83,42, 91,57, 111,71, 142,79, 178,83, 214,79, 245,71, 265,57" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/RebuildHierarchy.html
--- a/doc/flowchart/RebuildHierarchy.html
+++ b/doc/flowchart/RebuildHierarchy.html
@@ -1,21 +1,21 @@
<img src="RebuildHierarchy.gif" usemap="#RebuildHierarchy" Border = 0><map name="RebuildHierarchy">
-<area shape=rect coords="236,3440, 362,3476" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_InterpolateBoundaryFromParent.C">
-<area shape=rect coords="218,3233, 389,3278" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_MoveSubgridParticlesFast.C">
-<area shape=rect coords="236,3143, 362,3179" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
-<area shape=rect coords="218,3008, 389,3053" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
-<area shape=rect coords="245,2495, 371,2531" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_InterpolateFieldValues.C">
-<area shape=rect coords="245,2378, 371,2414" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_InterpolateFieldValues.C">
-<area shape=rect coords="245,2135, 371,2171" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_CopyZonesFromGridCountOnly.C">
-<area shape=rect coords="245,2756, 371,2792" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationLoadBalanceGrids.C">
-<area shape=rect coords="245,2648, 380,2684" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ComputeTimeStep.C">
-<area shape=rect coords="227,1892, 398,1937" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/LevelHierarchy_AddLevel.C">
-<area shape=rect coords="227,1793, 398,1838" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationShareGrids.C">
-<area shape=rect coords="227,1640, 398,1685" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_MoveSubgridParticlesFast.C">
-<area shape=rect coords="245,1550, 371,1586" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
-<area shape=rect coords="227,1415, 398,1460" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
-<area shape=rect coords="227,1226, 398,1271" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/FindSubgrids.C">
-<area shape=rect coords="362,677, 533,722" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationTransferParticles.C">
-<area shape=rect coords="236,560, 407,605" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_MoveAllParticles.C">
-<area shape=rect coords="216,114, 414,204" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/RebuildHierarchy.C">
+<area shape=rect coords="236,3440, 362,3476" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_InterpolateBoundaryFromParent.C">
+<area shape=rect coords="218,3233, 389,3278" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_MoveSubgridParticlesFast.C">
+<area shape=rect coords="236,3143, 362,3179" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="218,3008, 389,3053" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="245,2495, 371,2531" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_InterpolateFieldValues.C">
+<area shape=rect coords="245,2378, 371,2414" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_InterpolateFieldValues.C">
+<area shape=rect coords="245,2135, 371,2171" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_CopyZonesFromGridCountOnly.C">
+<area shape=rect coords="245,2756, 371,2792" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationLoadBalanceGrids.C">
+<area shape=rect coords="245,2648, 380,2684" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComputeTimeStep.C">
+<area shape=rect coords="227,1892, 398,1937" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/LevelHierarchy_AddLevel.C">
+<area shape=rect coords="227,1793, 398,1838" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationShareGrids.C">
+<area shape=rect coords="227,1640, 398,1685" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_MoveSubgridParticlesFast.C">
+<area shape=rect coords="245,1550, 371,1586" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="227,1415, 398,1460" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="227,1226, 398,1271" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/FindSubgrids.C">
+<area shape=rect coords="362,677, 533,722" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationTransferParticles.C">
+<area shape=rect coords="236,560, 407,605" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_MoveAllParticles.C">
+<area shape=rect coords="216,114, 414,204" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/RebuildHierarchy.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/SolveHydroEquations.html
--- a/doc/flowchart/SolveHydroEquations.html
+++ b/doc/flowchart/SolveHydroEquations.html
@@ -1,13 +1,13 @@
<img src="SolveHydroEquations.gif" usemap="#SolveHydroEquations" Border = 0><map name="SolveHydroEquations"><area shape=poly coords="327,2765, 320,2751, 302,2739, 274,2731, 242,2729, 209,2731, 181,2739, 163,2751, 156,2765, 163,2778, 181,2790, 209,2798, 242,2801, 274,2798, 302,2790, 320,2778" href="EvolveLevel.html">
-<area shape=rect coords="309,2486, 444,2522" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ZeusSolver.C">
-<area shape=rect coords="309,2378, 444,2414" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/ppm_lr.src">
-<area shape=rect coords="309,2279, 444,2315" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_PPMDirectEuler.C">
-<area shape=rect coords="309,2054, 453,2099" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CosmologyComputeExpansionFactor.C">
-<area shape=rect coords="273,695, 435,740" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_ComputeGammaField.C">
-<area shape=rect coords="273,407, 435,452" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_IdentifyPhysicalQuantities.C">
-<area shape=rect coords="273,290, 435,335" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_IdentifyPhysicalQuantities.C">
-<area shape=rect coords="93,191, 255,236" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_IdentifyPhysicalQuantities.C">
-<area shape=rect coords="12,2, 336,92" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_SolveHydroEquations.C">
+<area shape=rect coords="309,2486, 444,2522" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeusSolver.C">
+<area shape=rect coords="309,2378, 444,2414" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ppm_lr.src">
+<area shape=rect coords="309,2279, 444,2315" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_PPMDirectEuler.C">
+<area shape=rect coords="309,2054, 453,2099" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CosmologyComputeExpansionFactor.C">
+<area shape=rect coords="273,695, 435,740" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComputeGammaField.C">
+<area shape=rect coords="273,407, 435,452" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=rect coords="273,290, 435,335" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=rect coords="93,191, 255,236" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=rect coords="12,2, 336,92" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SolveHydroEquations.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/flowchart/main.html
--- a/doc/flowchart/main.html
+++ b/doc/flowchart/main.html
@@ -1,16 +1,16 @@
<img src="main.gif" usemap="#main" Border=0><map name="main">
-<area shape=rect coords="281,578, 452,614" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/OutputLevelInformation.C">
-<area shape=rect coords="272,497, 452,533" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/LevelHierarchy_AddLevel.C">
-<area shape=rect coords="272,281, 452,317" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/ReadAllData.C">
-<area shape=rect coords="452,380, 551,425" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationPartitionGrid.C">
+<area shape=rect coords="281,578, 452,614" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/OutputLevelInformation.C">
+<area shape=rect coords="272,497, 452,533" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/LevelHierarchy_AddLevel.C">
+<area shape=rect coords="272,281, 452,317" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ReadAllData.C">
+<area shape=rect coords="452,380, 551,425" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationPartitionGrid.C"><area shape=poly coords="209,1095, 203,1083, 189,1073, 167,1066, 141,1064, 115,1066, 93,1073, 79,1083, 74,1095, 79,1107, 93,1117, 115,1124, 141,1127, 167,1124, 189,1117, 203,1107" href="
http://www.stonebrew.com">
-<area shape=poly coords="182,24, 178,15, 170,8, 156,3, 141,2, 126,3, 112,8, 104,15, 101,24, 104,33, 112,40, 126,45, 141,47, 156,45, 170,40, 178,33" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/enzo.C">
+<area shape=poly coords="182,24, 178,15, 170,8, 156,3, 141,2, 126,3, 112,8, 104,15, 101,24, 104,33, 112,40, 126,45, 141,47, 156,45, 170,40, 178,33" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/enzo.C"><area shape=rect coords="56,992, 227,1028" href="EvolveHierarchy.html">
-<area shape=rect coords="281,884, 452,920" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/InitializeNew.C">
-<area shape=rect coords="281,803, 452,839" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/Grid_OutputAsParticleData.C">
-<area shape=rect coords="281,695, 452,731" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/ExtractSection.C">
-<area shape=rect coords="272,227, 452,263" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/SetDefaultGlobalValues.C">
-<area shape=rect coords="56,128, 227,164" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/InterpretCommandLine.C">
-<area shape=rect coords="56,74, 227,110" href="
http://lca.ucsd.edu/projects/enzo/browser/public/trunk/src/enzo/CommunicationInitialize.C">
+<area shape=rect coords="281,884, 452,920" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/InitializeNew.C">
+<area shape=rect coords="281,803, 452,839" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_OutputAsParticleData.C">
+<area shape=rect coords="281,695, 452,731" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ExtractSection.C">
+<area shape=rect coords="272,227, 452,263" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/SetDefaultGlobalValues.C">
+<area shape=rect coords="56,128, 227,164" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/InterpretCommandLine.C">
+<area shape=rect coords="56,74, 227,110" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationInitialize.C"></map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/Makefile
--- a/doc/manual/Makefile
+++ b/doc/manual/Makefile
@@ -2,7 +2,7 @@
#
# You can set these variables from the command line.
-SPHINXOPTS =
+SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/CreateSubgridList.gif
Binary file doc/manual/source/_static/flowchart/CreateSubgridList.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/CreateSubgridList.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/CreateSubgridList.html
@@ -0,0 +1,4 @@
+<img src="CreateSubgridList.gif" usemap="#CreateSubgridList" Border = 0>
+<map name="CreateSubgridList">
+<area shape=rect coords="126,262, 270,334" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ReturnFluxDims.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/DetermineDT.gif
Binary file doc/manual/source/_static/flowchart/DetermineDT.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/DetermineDT.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/DetermineDT.html
@@ -0,0 +1,5 @@
+<img src="DetermineDT.gif" usemap="#DetermineDT">
+<map name="DetermineDT">
+<area shape=rect coords="20,596, 200,632" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid.h#L207">
+<area shape=rect coords="20,38, 200,74" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComputeTimeStep.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveHierarchy.gif
Binary file doc/manual/source/_static/flowchart/EvolveHierarchy.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveHierarchy.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveHierarchy.html
@@ -0,0 +1,18 @@
+<img src="EvolveHierarchy.gif" usemap="#EvolveHierarchy" Border = 0>
+<map name="EvolveHierarchy">
+<area shape=poly coords="236,1694, 229,1680, 212,1668, 185,1660, 155,1658, 124,1660, 97,1668, 80,1680, 74,1694, 80,1707, 97,1719, 124,1727, 155,1730, 185,1727, 212,1719, 229,1707" href="main.html">
+<area shape=rect coords="65,1586, 245,1622" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/WriteAllData.C">
+<area shape=rect coords="281,1406, 461,1451" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ReduceFragmentation.C">
+<area shape=rect coords="65,1334, 245,1370" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckForOutput.C">
+<area shape=rect coords="65,479, 245,515" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckForOutput.C">
+<area shape=rect coords="65,1271, 245,1307" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckForTimeAction.C">
+<area shape=rect coords="65,1046, 245,1082" href="RebuildHierarchy.html">
+<area shape=rect coords="65,965, 245,1001" href="EvolveLevel.html">
+<area shape=rect coords="65,776, 245,812" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/OutputLevelInformation.C">
+<area shape=rect coords="65,830, 245,911" href="DetermineDT.html">
+<area shape=rect coords="65,542, 245,578" href="RebuildHierarchy.html">
+<area shape=rect coords="74,326, 236,362" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SetExternalBoundaryValues.C">
+<area shape=rect coords="74,380, 236,416" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CopyOverlappingZones.C">
+<area shape=rect coords="74,101, 236,137" href="
http://lca.ucsd.edu/projects/enzo/wiki/UserGuide/FlowChart#ReturnCPUTime">
+<area shape=poly coords="236,38, 229,24, 212,12, 185,4, 155,2, 124,4, 97,12, 80,24, 74,38, 80,51, 97,63, 124,71, 155,74, 185,71, 212,63, 229,51" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveHierarchy.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel.html
@@ -0,0 +1,20 @@
+<img src="EvolveLevel.gif" usemap="#EvolveLevel" Border = 0>
+<map name="EvolveLevel">
+<area shape=rect coords="65,1757, 218,1802" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_AddToBoundaryFluxes.C">
+<area shape=rect coords="65,1703, 218,1748" href="EvolveLevel_UpdateFromFinerGrids.html">
+<area shape=poly coords="292,2083, 286,2069, 269,2057, 242,2049, 211,2047, 180,2049, 153,2057, 136,2069, 130,2083, 136,2096, 153,2108, 180,2116, 211,2119, 242,2116, 269,2108, 286,2096" href="EvolveHierarchy.html">
+<area shape=rect coords="65,1919, 218,1955" href="RebuildHierarchy.html">
+<area shape=rect coords="47,1838, 236,1874" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/RadiationFieldUpdate.C">
+<area shape=rect coords="245,1577, 344,1613" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevel.C">
+<area shape=rect coords="39,1345, 246,1408" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=rect coords="80,1165, 224,1273" href="EvolveLevel_Sub1.html">
+<area shape=rect coords="101,1082, 191,1118" href="SolveHydroEquations.html">
+<area shape=rect coords="83,947, 218,1028" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_CopyBaryonFieldToOldBaryonField.C">
+<area shape=rect coords="227,857, 335,929" href="EvolveLevel_Gravity.html">
+<area shape=rect coords="254,623, 353,668" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=rect coords="65,524, 218,578" href="CreateSubgridList.html">
+<area shape=rect coords="65,461, 218,497" href="DetermineDT.html">
+<area shape=rect coords="92,254, 209,317" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ClearBoundaryFluxes.C">
+<area shape=rect coords="59,113, 248,176" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C">
+<area shape=rect coords="47,2, 263,74" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevel.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_CorrectForRefinedFluxes.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel_CorrectForRefinedFluxes.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_CorrectForRefinedFluxes.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel_CorrectForRefinedFluxes.html
@@ -0,0 +1,8 @@
+<img src="EvolveLevel_CorrectForRefinedFluxes.gif" usemap="#EvolveLevel_CorrectForRefinedFluxes"
+Border = 0>
+<map name="EvolveLevel_CorrectForRefinedFluxes">
+<area shape=poly coords="336,2347, 327,2332, 305,2318, 269,2310, 228,2307, 187,2310, 151,2318, 129,2332, 120,2347, 129,2362, 151,2376, 187,2384, 228,2388, 269,2384, 305,2376, 327,2362" href="EvolveLevel_UpdateFromFinerGrids.html">
+<area shape=rect coords="354,192, 471,228" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CosmologyComputeExpansionFactor.C">
+<area shape=rect coords="174,120, 300,156" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=poly coords="344,51, 335,32, 313,16, 279,5, 240,2, 201,5, 167,16, 145,32, 137,51, 145,70, 167,86, 201,97, 240,101, 279,97, 313,86, 335,70" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_CorrectForRefinedFluxes.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel_GetProjectedBoundaryFluxes.html
@@ -0,0 +1,8 @@
+<img src="EvolveLevel_GetProjectedBoundaryFluxes.gif"
+usemap="#EvolveLevel_GetProjectedBoundaryFluxes" Border=0>
+<map name="EvolveLevel_GetProjectedBoundaryFluxes">
+<area shape=poly coords="258,1658, 250,1644, 229,1632, 196,1624, 159,1622, 121,1624, 88,1632, 68,1644, 60,1658, 68,1671, 88,1683, 121,1691, 159,1694, 196,1691, 229,1683, 250,1671" href="EvolveLevel_UpdateFromFinerGrids.html">
+<area shape=rect coords="258,1487, 384,1532" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationSendFluxes.C">
+<area shape=rect coords="258,1352, 384,1397" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationReceiveFluxes.C">
+<area shape=poly coords="276,38, 267,24, 244,12, 209,4, 168,2, 127,4, 91,12, 68,24, 60,38, 68,51, 91,63, 127,71, 168,74, 209,71, 244,63, 267,51" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_GetProjectedBoundaryFluxes.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_Gravity.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel_Gravity.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_Gravity.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel_Gravity.html
@@ -0,0 +1,7 @@
+<img src="EvolveLevel_Gravity.gif" usemap="#EvolveLevel_Gravity" Border = 0>
+<map name="EvolveLevel_Gravity">
+<area shape=rect coords="185,334, 266,388" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CheckEnergyConservation.C">
+<area shape=rect coords="185,181, 275,253" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo//Grid_ComputeAccelerationFieldExternal.C">
+<area shape=rect coords="167,109, 248,145" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo//Grid_ComputeAccelerations.C">
+<area shape=rect coords="167,55, 248,91" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo//Grid_SolveForPotential.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_ProjectSolutionToParentGrid.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel_ProjectSolutionToParentGrid.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_ProjectSolutionToParentGrid.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel_ProjectSolutionToParentGrid.html
@@ -0,0 +1,8 @@
+<img src="EvolveLevel_ProjectSolutionToParentGrid.gif"
+usemap="#EvolveLevel_ProjectSolutionToParentGrid" Border = 0>
+<map name="EvolveLevel_ProjectSolutionToParentGrid">
+<area shape=poly coords="293,1860, 285,1846, 264,1834, 232,1826, 194,1824, 156,1826, 124,1834, 103,1846, 95,1860, 103,1873, 124,1885, 156,1893, 194,1896, 232,1893, 264,1885, 285,1873" href="EvolveLevel_UpdateFromFinerGrids.html">
+<area shape=rect coords="266,1311, 392,1401" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_Irecv_CommunicationReceiveRegion.C">
+<area shape=rect coords="158,636, 284,672" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=poly coords="311,123, 303,109, 282,97, 250,89, 212,87, 174,89, 142,97, 121,109, 113,123, 121,136, 142,148, 174,156, 212,159, 250,156, 282,148, 303,136" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ProjectSolutionToParentGrid.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_Sub1.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel_Sub1.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_Sub1.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel_Sub1.html
@@ -0,0 +1,9 @@
+<img src="EvolveLevel_Sub1.gif" usemap="#EvolveLevel_Sub1" Border = 0>
+<map name="EvolveLevel_Sub1">
+<area shape=rect coords="47,217, 173,253" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/UpdateParticlePositions.C">
+<area shape=rect coords="47,271, 173,298" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_StarParticleHandler.C">
+<area shape=rect coords="209,496, 281,532" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComovingExpansionTerms.C">
+<area shape=rect coords="191,343, 299,397" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid.h#L799">
+<area shape=rect coords="209,145, 281,181" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SolveRadiativeCooling.C">
+<area shape=rect coords="209,64, 281,100" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SolveRateEquations.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_UpdateFromFinerGrids.gif
Binary file doc/manual/source/_static/flowchart/EvolveLevel_UpdateFromFinerGrids.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/EvolveLevel_UpdateFromFinerGrids.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/EvolveLevel_UpdateFromFinerGrids.html
@@ -0,0 +1,9 @@
+<img src="EvolveLevel_UpdateFromFinerGrids.gif" usemap="#EvolveLevel_UpdateFromFinerGrids" Border =
+0>
+<map name="EvolveLevel_UpdateFromFinerGrids">
+<area shape=poly coords="272,609, 265,594, 245,580, 214,572, 178,569, 142,572, 111,580, 91,594, 83,609, 91,624, 111,638, 142,646, 178,650, 214,646, 245,638, 265,624" href="EvolveLevel.html">
+<area shape=rect coords="101,413, 245,458" href="EvolveLevel_ProjectSolutionToParentGrid.html">
+<area shape=rect coords="101,278, 245,323" href="EvolveLevel_CorrectForRefinedFluxes.html">
+<area shape=rect coords="101,215, 245,260" href="EvolveLevel_GetProjectedBoundaryFluxes.html">
+<area shape=poly coords="272,42, 265,27, 245,13, 214,5, 178,2, 142,5, 111,13, 91,27, 83,42, 91,57, 111,71, 142,79, 178,83, 214,79, 245,71, 265,57" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/EvolveLevelRoutinesOptimized.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/General.gif
Binary file doc/manual/source/_static/flowchart/General.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/RebuildHierarchy.gif
Binary file doc/manual/source/_static/flowchart/RebuildHierarchy.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/RebuildHierarchy.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/RebuildHierarchy.html
@@ -0,0 +1,21 @@
+<img src="RebuildHierarchy.gif" usemap="#RebuildHierarchy" Border = 0>
+<map name="RebuildHierarchy">
+<area shape=rect coords="236,3440, 362,3476" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_InterpolateBoundaryFromParent.C">
+<area shape=rect coords="218,3233, 389,3278" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_MoveSubgridParticlesFast.C">
+<area shape=rect coords="236,3143, 362,3179" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="218,3008, 389,3053" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="245,2495, 371,2531" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_InterpolateFieldValues.C">
+<area shape=rect coords="245,2378, 371,2414" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_InterpolateFieldValues.C">
+<area shape=rect coords="245,2135, 371,2171" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_CopyZonesFromGridCountOnly.C">
+<area shape=rect coords="245,2756, 371,2792" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationLoadBalanceGrids.C">
+<area shape=rect coords="245,2648, 380,2684" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComputeTimeStep.C">
+<area shape=rect coords="227,1892, 398,1937" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/LevelHierarchy_AddLevel.C">
+<area shape=rect coords="227,1793, 398,1838" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationShareGrids.C">
+<area shape=rect coords="227,1640, 398,1685" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_MoveSubgridParticlesFast.C">
+<area shape=rect coords="245,1550, 371,1586" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="227,1415, 398,1460" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeroSolutionUnderSubgrid.C">
+<area shape=rect coords="227,1226, 398,1271" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/FindSubgrids.C">
+<area shape=rect coords="362,677, 533,722" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationTransferParticles.C">
+<area shape=rect coords="236,560, 407,605" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_MoveAllParticles.C">
+<area shape=rect coords="216,114, 414,204" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/RebuildHierarchy.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/SolveHydroEquations.gif
Binary file doc/manual/source/_static/flowchart/SolveHydroEquations.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/SolveHydroEquations.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/SolveHydroEquations.html
@@ -0,0 +1,13 @@
+<img src="SolveHydroEquations.gif" usemap="#SolveHydroEquations" Border = 0>
+<map name="SolveHydroEquations">
+<area shape=poly coords="327,2765, 320,2751, 302,2739, 274,2731, 242,2729, 209,2731, 181,2739, 163,2751, 156,2765, 163,2778, 181,2790, 209,2798, 242,2801, 274,2798, 302,2790, 320,2778" href="EvolveLevel.html">
+<area shape=rect coords="309,2486, 444,2522" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ZeusSolver.C">
+<area shape=rect coords="309,2378, 444,2414" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ppm_lr.src">
+<area shape=rect coords="309,2279, 444,2315" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_PPMDirectEuler.C">
+<area shape=rect coords="309,2054, 453,2099" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CosmologyComputeExpansionFactor.C">
+<area shape=rect coords="273,695, 435,740" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_ComputeGammaField.C">
+<area shape=rect coords="273,407, 435,452" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=rect coords="273,290, 435,335" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=rect coords="93,191, 255,236" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_IdentifyPhysicalQuantities.C">
+<area shape=rect coords="12,2, 336,92" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_SolveHydroEquations.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/index.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/index.html
@@ -0,0 +1,11 @@
+<img src="General.gif" usemap="#General" Border = 0>
+<map name="General">
+<area shape=rect coords="245,407, 380,461" href="EvolveLevel_UpdateFromFinerGrids.html">
+<area shape=rect coords="245,587, 380,641" href="RebuildHierarchy.html">
+<area shape=rect coords="245,326, 380,380" href="SolveHydroEquations.html">
+<area shape=poly coords="551,2, 398,2, 398,99, 413,106, 427,108, 444,107, 474,99, 504,91, 521,90, 535,92, 551,99" href="
http://lca.ucsd.edu/projects/enzo/wiki/UserGuide/FlowChart#Classes">
+<area shape=rect coords="245,479, 380,533" href="RebuildHierarchy.html">
+<area shape=rect coords="173,254, 434,569" href="EvolveLevel.html">
+<area shape=rect coords="137,200, 461,668" href="EvolveHierarchy.html">
+<area shape=rect coords="101,164, 497,713" href="main.html">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/main.gif
Binary file doc/manual/source/_static/flowchart/main.gif has changed
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/_static/flowchart/main.html
--- /dev/null
+++ b/doc/manual/source/_static/flowchart/main.html
@@ -0,0 +1,16 @@
+<img src="main.gif" usemap="#main" Border=0>
+<map name="main">
+<area shape=rect coords="281,578, 452,614" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/OutputLevelInformation.C">
+<area shape=rect coords="272,497, 452,533" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/LevelHierarchy_AddLevel.C">
+<area shape=rect coords="272,281, 452,317" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ReadAllData.C">
+<area shape=rect coords="452,380, 551,425" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationPartitionGrid.C">
+<area shape=poly coords="209,1095, 203,1083, 189,1073, 167,1066, 141,1064, 115,1066, 93,1073, 79,1083, 74,1095, 79,1107, 93,1117, 115,1124, 141,1127, 167,1124, 189,1117, 203,1107" href="
http://www.stonebrew.com">
+<area shape=poly coords="182,24, 178,15, 170,8, 156,3, 141,2, 126,3, 112,8, 104,15, 101,24, 104,33, 112,40, 126,45, 141,47, 156,45, 170,40, 178,33" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/enzo.C">
+<area shape=rect coords="56,992, 227,1028" href="EvolveHierarchy.html">
+<area shape=rect coords="281,884, 452,920" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/InitializeNew.C">
+<area shape=rect coords="281,803, 452,839" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/Grid_OutputAsParticleData.C">
+<area shape=rect coords="281,695, 452,731" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/ExtractSection.C">
+<area shape=rect coords="272,227, 452,263" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/SetDefaultGlobalValues.C">
+<area shape=rect coords="56,128, 227,164" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/InterpretCommandLine.C">
+<area shape=rect coords="56,74, 227,110" href="
https://bitbucket.org/enzo/enzo-dev/src/week-of-code/src/enzo/CommunicationInitialize.C">
+</map>
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/conf.py
--- a/doc/manual/source/conf.py
+++ b/doc/manual/source/conf.py
@@ -124,7 +124,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-# html_static_path = ['_static']
+html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/index.rst
--- a/doc/manual/source/index.rst
+++ b/doc/manual/source/index.rst
@@ -14,7 +14,6 @@
Enzo development is supported by grants AST-0808184 and OCI-0832662 from the
National Science Foundation.
-
.. toctree::
:maxdepth: 2
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/analysis.rst
--- a/doc/manual/source/parameters/analysis.rst
+++ /dev/null
@@ -1,51 +0,0 @@
-Inline Analysis
-~~~~~~~~~~~~~~~
-
-Inline Halo Finding
-^^^^^^^^^^^^^^^^^^^
-
-Enzo can find dark matter (sub)halos on the fly with a
-friends-of-friends (FOF) halo finder and a subfind method,
-originally written by Volker Springel. All output files will be
-written in the directory FOF/.
-
-``InlineHaloFinder`` (external)
- Set to 1 to turn on the inline halo finder. Default: 0.
-``HaloFinderSubfind`` (external)
- Set to 1 to find subhalos inside each dark matter halo found in the
- friends-of-friends method. Default: 0.
-``HaloFinderOutputParticleList`` (external)
- Set to 1 to output a list of particle positions and IDs for each
- (sub)halo. Written in HDF5. Default: 0.
-``HaloFinderMinimumSize`` (external)
- Minimum number of particles to be considered a halo. Default: 50.
-``HaloFinderLinkingLength`` (external)
- Linking length of particles when finding FOF groups. In units of
- cell width of the finest static grid, e.g. unigrid -> root cell
- width. Default: 0.1.
-``HaloFinderCycleSkip`` (external)
- Find halos every N\ :sup:`th`\ top-level timestep, where N is this
- parameter. Not used if set to 0. Default: 3.
-``HaloFinderTimestep`` (external)
- Find halos every dt = (this parameter). Only evaluated at each
- top-level timestep. Not used if negative. Default: -99999.0
-``HaloFinderRunAfterOutput`` (external)
- When turned on, the inline halo finder is run after an output is written. Default: 0
-``HaloFinderLastTime`` (internal)
- Last time of a halo find. Default: 0.
-
-Inline Python
-^^^^^^^^^^^^^
-
-``PythonTopGridSkip`` (external)
- How many top grid cycles should we skip between calling python at the top of the hierarchy? Only works with python-yes in compile settings.
-``PythonSubcycleSkip`` (external)
- How many subgrid cycles should we skip between calling python at the bottom of the hierarchy?
-``PythonReloadScript`` (external)
- Should "user_script.py" be reloaded in between Python calls?
-``NumberOfPythonCalls`` (internal)
- Internal parameter tracked by Enzo
-``NumberOfPythonTopGridCalls`` (internal)
- Internal parameter tracked by Enzo
-``NumberOfPythonSubcycleCalls`` (internal)
- Internal parameter tracked by Enzo
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/bhform.rst
--- a/doc/manual/source/parameters/bhform.rst
+++ /dev/null
@@ -1,136 +0,0 @@
-Massive Black Hole Physics Parameters
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Following parameters are for the accretion and feedback from the
-massive black hole particle (``PARTICLE_TYPE_MBH``). Details
-are described in Kim, Wise, Alvarez, and Abel (2011).
-
-Accretion Physics
-^^^^^^^^^^^^^^^^^
-
-``MBHAccretion`` (external)
- Set to 1 to turn on accretion based on the Eddington-limited
- spherical Bondi-Hoyle formula (Bondi 1952). Set to 2 to turn on
- accretion based on the Bondi-Hoyle formula but with fixed
- temperature defined below. Set to 3 to turn on accretion with a
- fixed rate defined below. Set to 4 to to turn on accretion based on
- the Eddington-limited spherical Bondi-Hoyle formula, but without
- v_rel in the denominator. Set to 5 to turn on accretion based on
- Krumholz et al.(2006) which takes vorticity into account. Set to 6
- to turn on alpha disk formalism based on DeBuhr et al.(2010).
- 7 and 8 are still failed experiment. Add 10 to each of these options
- (i.e. 11, 12, 13, 14) to ignore the Eddington limit. See
- ``Star_CalculateMassAccretion.C``. Default: 0 (FALSE)
-``MBHAccretionRadius`` (external)
- This is the radius (in pc) of a gas sphere from which the accreting
- mass is subtracted out at every timestep. Instead, you may want to
- try set this parameter to -1, in which case an approximate Bondi
- radius is calculated and used (from ``DEFAULT_MU`` and
- ``MBHAccretionFixedTemperature``). If set to -N, it will use N\*(Bondi
- radius). See ``CalculateSubtractionParameters.C``. Default: 50.0
-``MBHAccretingMassRatio`` (external)
- There are three different scenarios you can utilize this parameter.
- (1) In principle this parameter is a nondimensional factor
- multiplied to the Bondi-Hoyle accretion rate; so 1.0 should give
- the plain Bondi rate. (2) However, if the Bondi radius is resolved
- around the MBH, the local density used to calculate Mdot can be
- higher than what was supposed to be used (density at the Bondi
- radius!), resulting in the overestimation of Mdot. 0.0 <
- ``MBHAccretingMassRatio`` < 1.0 can be used to fix this. (3) Or, one
- might try using the density profile of R\ :sup:`-1.5`\ to estimate
- the density at the Bondi radius, which is utilized when
- ``MBHAccretingMassRatio`` is set to -1. See
- ``Star_CalculateMassAccretion.C``. Default: 1.0
-``MBHAccretionFixedTemperature`` (external)
- This parameter (in K) is used when ``MBHAccretion = 2``. A fixed gas
- temperature that goes into the Bondi-Hoyle accretion rate
- estimation formula. Default: 3e5
-``MBHAccretionFixedRate`` (external)
- This parameter (in Msun/yr) is used when ``MBHAccretion = 3``. Default:
- 1e-3
-``MBHTurnOffStarFormation`` (external)
- Set to 1 to turn off star formation (only for ``StarParicleCreation``
- method 7) in the cells where MBH particles reside. Default: 0
- (FALSE)
-``MBHCombineRadius`` (external)
- The distance (in pc) between two MBH particles in which two
- energetically-bound MBH particles merge to form one particle.
- Default: 50.0
-``MBHMinDynamicalTime`` (external)
- Minimum dynamical time (in yr) for a MBH particle. Default: 1e7
-``MBHMinimumMass`` (external)
- Minimum mass (in Msun) for a MBH particle. Default: 1e3
-
-Feedback Physics
-^^^^^^^^^^^^^^^^
-
-``MBHFeedback`` (external)
- Set to 1 to turn on thermal feedback of MBH particles (``MBH_THERMAL``
- - not fully tested). Set to 2 to turn on mechanical feedback of MBH
- particles (``MBH_JETS``, bipolar jets along the total angular momentum
- of gas accreted onto the MBH particle so far). Set to 3 to turn on
- another version of mechanical feedback of MBH particles (``MBH_JETS``,
- always directed along z-axis). Set to 4 to turn on experimental version of
- mechanical feedback (`MBH_JETS`, bipolar jets along the total angular
- momentum of gas accreted onto the MBH particle so far + 10 degree random
- noise). Set to 5 to turn on experimental version of mechanical feedback
- (``MBH_JETS``, launched at random direction). Note that, even when this
- parameter is set to 0, MBH particles still can be radiation sources
- if ``RadiativeTransfer`` is on. See ``Grid_AddFeedbackSphere.C``.
- Default: 0 (FALSE)
-
- ::
-
- ``RadiativeTransfer = 0`` & ``MBHFeedback = 0`` : no feedback at all
- ``RadiativeTransfer = 0`` & ``MBHFeedback = 1`` : purely thermal feedback
- ``RadiativeTransfer = 0`` & ``MBHFeedback = 2`` : purely mechanical feedback
- ``RadiativeTransfer = 1`` & ``MBHFeedback = 0`` : purely radiative feedback
- ``RadiativeTransfer = 1`` & ``MBHFeedback = 2`` : radiative and
- mechanical feedback combined (one has to change the following
- ``MBHFeedbackRadiativeEfficiency`` parameter accordingly, say from 0.1
- to 0.05, to keep the same total energy across different modes of
- feedback)
-
-``MBHFeedbackRadiativeEfficiency`` (external)
- The radiative efficiency of a black hole. 10% is the widely
- accepted value for the conversion rate from the rest-mass energy of
- the accreting material to the feedback energy, at the innermost
- stable orbit of a non-spinning Schwarzschild black hole (Shakura &
- Sunyaev 1973, Booth & Schaye 2009). Default: 0.1
-``MBHFeedbackEnergyCoupling`` (external)
- The fraction of feedback energy that is thermodynamically (for
- ``MBH_THERMAL``) or mechanically (for ``MBH_JETS``) coupled to the gas.
- 0.05 is widely used for thermal feedback (Springel et al. 2005, Di
- Matteo et al. 2005), whereas 0.0001 or less is recommended for
- mechanical feedback depending on the resolution of the simulation
- (Ciotti et al. 2009). Default: 0.05
-``MBHFeedbackMassEjectionFraction`` (external)
- The fraction of accreting mass that is returning to the gas phase.
- For either ``MBH_THERMAL`` or ``MBH_JETS``. Default: 0.1
-``MBHFeedbackMetalYield`` (external)
- The mass fraction of metal in the ejected mass. Default: 0.02
-``MBHFeedbackThermalRadius`` (external)
- The radius (in pc) of a sphere in which the energy from
- ``MBH_THERMAL`` feedback is deposited. If set to a negative value, the
- radius of a sphere gets bigger in a way that the sphere encloses
- the constant mass (=
- 4/3\*pi\*(-``MBHFeedbackThermalRadius``)\ :sup:`3`\ Msun). The latter
- is at the moment very experimental; see ``Star_FindFeedbackSphere.C``.
- Default: 50.0
-``MBHFeedbackJetsThresholdMass`` (external)
- The bipolar jets by ``MBH_JETS`` feedback are injected every time the
- accumulated ejecta mass surpasses ``MBHFeedbackJetsThresholdMass`` (in
- Msun). Although continuously injecting jets into the gas cells
- might sound great, unless the gas cells around the MBH are resolved
- down to Mdot, the jets make little or no dynamical impact on the
- surrounding gas. By imposing ``MBHFeedbackJetsThresholdMass``, the jets
- from MBH particles are rendered intermittent, yet dynamically
- important. Default: 10.0
-``MBHParticleIO`` (external)
- Set to 1 to print out basic information about MBH particles. Will
- be automatically turned on if ``MBHFeedback`` is set to 2 or 3.
- Default: 0 (FALSE)
-``MBHParticleIOFilename`` (external)
- The name of the file used for the parameter above. Default:
- ``mbh_particle_io.dat``
-
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/conduction.rst
--- a/doc/manual/source/parameters/conduction.rst
+++ /dev/null
@@ -1,42 +0,0 @@
-Conduction
-~~~~~~~~~~
-
-Isotropic and anisotropic thermal conduction are implemented using the
-method of Parrish and Stone: namely, using an explicit, forward
-time-centered algorithm. In the anisotropic conduction, heat can only
-conduct along magnetic field lines. One can turn on the two types of
-conduction independently, since there are situations where one might
-want to use both. The Spitzer fraction can be also set
-independently for the isotropic and anisotropic conduction. Running a
-cosmological simulation with conduction on can be tricky as the timesteps
-can become very short. It is recommended that you look carefully at all the
-available conduction parameters. Additionally, if you intend to run with
-star particles, it is highly recommended that you set the parameter,
-``StarMakerTimeIndependentFormation``. See the description in
-:ref:`starparticleparameters` for more information.
-
-``IsotropicConduction`` (external)
- Turns on isotropic thermal conduction using Spitzer conduction. Default: 0 (FALSE)
-``AnisotropicConduction`` (external)
- Turns on anisotropic thermal conduction using Spitzer conduction.
- Can only be used if MHD is turned on (``HydroMethod`` = 4).
- Default: 0 (FALSE)
-``IsotropicConductionSpitzerFraction`` (external)
- Prefactor that goes in front of the isotropic Spitzer conduction
- coefficient. Should be a value between 0 and 1.
- Default: 1.0
-``AnisotropicConductionSpitzerFraction`` (external)
- Prefactor that goes in front of the anisotropic Spitzer conduction
- coefficient. Should be a value between 0 and 1.
- Default: 1.0
-``ConductionCourantSafetyNumber`` (external)
- This is a prefactor that controls the stability of the conduction
- algorithm. In its current explicit formulation, it must be set to
- a value of 0.5 or less.
- Default: 0.5
-``SpeedOfLightTimeStepLimit`` (external)
- When used, this sets a floor for the conduction timestep to be the local light crossing time (dx / c). This prevents the conduction machinery from prescribing extremely small timesteps. While this can technically violate the conduction stability criterion, testing has shown that this does not result in notable differences. (1 - ON; 0 - OFF) Default: 0 (OFF).
-``ConductionDynamicRebuildHierarchy`` (external)
- Using conduction can often result in the code taking extremely short timesteps. Since the hierarchy is rebuilt each timestep, this can exacerbate memory fragmentation issues and slow the simulation. In the case where the conduction timestep is the limiter, the hierarchy should not need to be rebuilt every timestep since conduction mostly does not alter the fields which control refinement. When this option is used, the timestep calculation is carried out as usual, but the hierarchy is only rebuilt on a timescale that is calculated neglecting the conduction timestep. This results in a decent speedup and reduced memory fragmentation when running with conduction. (1 - ON; 0 - OFF) Default: 0 (OFF).
-``ConductionDynamicRebuildMinLevel`` (external)
- The minimum level on which the dynamic hierarcy rebuild is performed. Default: 0.
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/cooling.rst
--- a/doc/manual/source/parameters/cooling.rst
+++ /dev/null
@@ -1,214 +0,0 @@
-.. _cooling_parameters:
-
-Cooling Parameters
-~~~~~~~~~~~~~~~~~~
-
-Simple Cooling Options
-^^^^^^^^^^^^^^^^^^^^^^
-
-``RadiativeCooling`` (external)
- This flag (1 - on, 0 - off) controls whether or not a radiative
- cooling module is called for each grid. There are currently several
- possibilities, controlled by the value of another flag. See :ref:`cooling`
- for more information on the various cooling methods. Default: 0
-
- - If the ``MultiSpecies`` flag is off, then equilibrium cooling is
- assumed and one of the following two will happen. If the parameter
- ``GadgetCooling`` is set to 1, the primordial equilibrium code is
- called (see below). If ``GadgetCooling`` is set to 0, a file called
- ``
cool_rates.in`` is read to set a cooling curve. This file consists
- of a set of temperature and the associated cgs cooling rate; a
- sample compute with a metallicity Z=0.3 Raymond-Smith code is
- provided in ``input/
cool_rates.in``. This has a cutoff at 10000 K
- (Sarazin & White 1987). Another choice will be
- ``input/cool_rates.in_300K`` which goes further down to 300 K (Rosen
- & Bregman 1995).
- - If the ``MultiSpecies`` flag is on, then the cooling rate is
- computed directly by the species abundances. This routine (which
- uses a backward differenced multi-step algorithm) is borrowed
- from the Hercules code written by Peter Anninos and Yu Zhang,
- featuring rates from Tom Abel. Other varieties of cooling are
- controlled by the ``MetalCooling`` parameter, as discused below.
-``RadiativeCoolingModel`` (external)
- This switches between the tabular look up cooling that is standard (RadiativeCoolingModel=1) and an analytic fit to the Wolfire et al 2003, ApJ, 587, 278 made by Koyama and Inutsuka 2006 (RadiativeCoolingModel = 3, arXiv:astro-ph/0605528). Default: 1
-``GadgetCooling`` (external)
- This flag (1 - on, 0 - off) turns on (when set to 1) a set of
- routines that calculate cooling rates based on the assumption of a
- six-species primordial gas (H, He, no H2 or D) in equilibrium, and
- is valid for temperatures greater than 10,000 K. This requires the
- file ``TREECOOL`` to execute. Default: 0
-``GadgetEquilibriumCooling`` (external)
- An implementation of the ionization equilibrium cooling code used
- in the GADGET code which includes both radiative cooling and a
- uniform metagalactic UV background specified by the ``TREECOOL`` file
- (in the ``amr_mpi/exe`` directory). When this parameter is turned on,
- ``MultiSpecies`` and ``RadiationFieldType`` are forced to 0 and
- ``RadiativeCooling`` is forced to 1.
- [Not in public release version]
-``MetalCooling`` (external)
- This flag (0 - off, 1 - metal cooling from Glover & Jappsen 2007,
- 2 - Cen et al (1995), 3 - Cloudy cooling from Smith, Sigurdsson, &
- Abel 2008) turns on metal cooling for runs that track
- metallicity. Option 1 is valid for temperatures between 100 K and
- 10\ :sup:`8`\ K because it considers fine-structure line emission
- from carbon, oxygen, and silicon and includes the additional metal
- cooling rates from Sutherland & Dopita (1993). Option 2 is only
- valid for temperatures above 10\ :sup:`4`\ K. Option 3 uses
- multi-dimensional tables of heating/cooling values created with
- Cloudy and optionally coupled to the ``MultiSpecies``
- chemistry/cooling solver. This method is valid from 10 K to 10\
- :sup:`8`\ K. See the Cloudy Cooling parameters below. Default: 0.
-``MetalCoolingTable`` (internal)
- This field contains the metal cooling table required for
- ``MetalCooling`` option 1. In the top level directory input/, there are
- two files ``metal_cool.dat`` and ``metal_cool_pop3.dat`` that consider
- metal cooling for solar abundance and abundances from
- pair-instability supernovae, respectively. In the same directory,
- one can find an IDL routine (``make_Zcool_table.pro``) that generates
- these tables. Default: ``metal_cool.dat``
-``MultiSpecies`` (external)
- If this flag (1, 2, 3- on, 0 - off) is on, then the code follows
- not just the total density, but also the ionization states of
- Hydrogen and Helium. If set to 2, then a nine-species model
- (including H2, H2+ and H-) will be computed, otherwise only six
- species are followed (H, H+, He, He+, He++, e-). If set to 3, then
- a 12 species model is followed, including D, D+ and HD. This
- routine, like the last one, is based on work done by Abel, Zhang
- and Anninos. Default: 0
-``MultiMetals`` (external)
- This was added so that the user could turn on or off additional
- metal fields - currently there is the standard metallicity field
- (Metal_Density) and two additional metal fields (Z_Field1 and
- Z_Field2). Acceptable values are 1 or 0, Default: 0 (off).
-``ThreeBodyRate`` (external)
- Which Three Body rate should be used for H2 formation?: 0 = Abel, Bryan, Norman 2002, 1 = PSS83, 2= CW83, 3 = FH07, 4= G08. (See `Turk et al 2011 <
http://adsabs.harvard.edu/abs/2011ApJ...726...55T>`)
-``CIECooling`` (external)
- Should CIE (`Ripamonti & Abel 2004 <
http://adsabs.harvard.edu/abs/2004MNRAS.348.1019R>`) cooling be included at high densities?
-``H2OpticalDepthApproximation`` (external)
- Should the H2 cooling be attenuated? Taken from `Ripamonti & Abel 2004 <
http://adsabs.harvard.edu/abs/2004MNRAS.348.1019R>`. Default: 1?
-``H2FormationOnDust`` (external)
- Turns on H2 formation on dust grains and gas-grain heat transfer following `Omukai (2000) <
http://adsabs.harvard.edu/abs/2000ApJ...534..809O>`. Default: 0 (OFF)
-``NumberOfDustTemperatureBins`` (external)
- Number of dust temperature bins for the dust cooling and H2 formation rates. Default: 250
-``DustTemperatureStart`` (external)
- Minimum dust temperature for dust rates. Default: 1.0
-``DustTemperatureEnd`` (external)
- Maximum dust temperature for dust rates. Default: 1500
-``OutputDustTemperature`` (external)
- Flag to write out the dust temperature field. Default: 0
-``PhotoelectricHeating`` (external)
- If set to be 1, the following parameter will be added uniformly
- to the gas without any shielding (`Tasker & Bryan 2008 <
http://adsabs.harvard.edu/abs/2008ApJ...673..810T>`). Default: 0
-``PhotoelectricHeatingRate`` (external)
- This is the parameter used as Gamma_pe for uniform photoelectric heating.
- Default: 8.5e-26 erg s^-1 cm^-3
-
-.. _cloudy_cooling:
-
-Cloudy Cooling
-^^^^^^^^^^^^^^
-
-Cloudy cooling from Smith, Sigurdsson, & Abel (2008) interpolates
-over tables of precomputed cooling data. Cloudy cooling is turned
-on by setting ``MetalCooling`` to 3. ``RadiativeCooling`` must also be set
-to 1. Depending on the cooling data used, it can be coupled with
-``MultiSpecies`` = 1, 2, or 3 so that the metal-free cooling comes from
-the ``MultiSpecies`` machinery and the Cloudy tables provide only the
-metal cooling. Datasets range in dimension from 1 to 5. Dim 1:
-interpolate over temperature. Dim 2: density and temperature. Dim
-3: density, metallicity, and temperature. Dim 4: density,
-metallicity, electron fraction, and temperature. Dim 5: density,
-metallicity, electron fraction, spectral strength, and temperature.
-See Smith, Sigurdsson, & Abel (2008) for more information on
-creating Cloudy datasets.
-
-``CloudyCoolingGridFile`` (external)
- A string specifying the path to the Cloudy cooling dataset.
-``IncludeCloudyHeating`` (external)
- An integer (0 or 1) specifying whether the heating rates are to be
- included in the calculation of the cooling. Some Cloudy datasets
- are made with the intention that only the cooling rates are to be
- used. Default: 0 (off).
-``CMBTemperatureFloor`` (external)
- An integer (0 or 1) specifying whether a temperature floor is
- created at the temperature of the cosmic microwave background
- (T\ :sub:`CMB`\ = 2.72 (1 + z) K). This is accomplished in the
- code by subtracting the cooling rate at T\ :sub:`CMB`\ such that
- Cooling = Cooling(T) - Cooling(T\ :sub:`CMB`\ ). Default: 1 (on).
-``CloudyElectronFractionFactor`` (external)
- A float value to account for additional electrons contributed by
- metals. This is only used with Cloudy datasets with dimension
- greater than or equal to 4. The value of this factor is calculated
- as the sum of (A\ :sub:`i`\ \* i) over all elements i heavier than
- He, where A\ :sub:`i`\ is the solar number abundance relative to
- H. For the solar abundance pattern from the latest version of
- Cloudy, using all metals through Zn, this value is 9.153959e-3.
- Default: 9.153959e-3.
-
-.. _grackle_pars:
-
-The Grackle
-^^^^^^^^^^^
-
-The Grackle is an external chemistry and cooling library originally derived from
-Enzo's MultiSpecies chemistry and Cloudy cooling modules. See :ref:`here <Grackle>`
-for a full description, including why you might use this over Enzo's internal
-chemistry and cooling. For more information on Grackle parameter, see also the
-`Grackle documentation <
https://grackle.readthedocs.org/>`_. Note, some Grackle
-parameters have been mapped to Enzo parameters for simplicity.
-
-``use_grackle`` (int)
- Flag to use the Grackle machinery (1 - on, 0 - off). Default: 0.
-
-``with_radiative_cooling`` (int)
- Flag to include radiative cooling and actually update the thermal energy during the chemistry solver. If off, the chemistry species will still be updated. The most common reason to set this to off is to iterate the chemistry network to an equilibrium state (1 - on, 0 - off). Default: 1.
-
-``MultiSpecies`` (int) [mapped to Grackle parameter ``primordial_chemistry``]
- Flag to control which primordial chemistry network is used. Default: 0.
-
- - 0: no chemistry network. Radiative cooling for primordial species is solved by interpolating from lookup tables calculated with Cloudy.
- - 1: 6-species atomic H and He. Active species: H, H\ :sup:`+`, He, He\ :sup:`+`, \ :sup:`++`, e\ :sup:`-`.
- - 2: 9-species network including atomic species above and species for molecular hydrogen formation. This network includes formation from the H\ :sup:`-` and H\ :sub:`2`\ :sup:`+` channels, three-body formation (H+H+H and H+H+H\ :sub:`2`), H\ :sub:`2` rotational transitions, chemical heating, and collision-induced emission (optional). Active species: above + H\ :sup:`-`, H\ :sub:`2`, H\ :sub:`2`\ :sup:`+`.
- - 3: 12-species network include all above plus HD rotation cooling. Active species: above plus D, D\ :sup:`+`, HD.
-
-``H2FormationOnDust`` (int) [mapped to Grackle parameter ``h2_on_dust``]
- See Enzo equivalent above. Default: 0.
-
-``MetalCooling`` (int) [mapped to Grackle parameter ``metal_cooling``]
- Flag to enable metal cooling using the Cloudy tables. If enabled, the cooling table to be used must be specified with the ``grackle_data_file`` parameter (1 - on, 0 - off). Default: 0.
-
-``CMBTemperatureFloor`` (int) [mapped to Grackle parameter ``cmb_temperature_floor``]
- See Enzo equivalent above. Default: 1.
-
-``UVbackground`` (int)
- Flag to enable a UV background. If enabled, the cooling table to be used must be specified with the ``grackle_data_file`` parameter (1 - on, 0 - off). Default: 0.
-
-``grackle_data_file`` (string)
- Path to the data file containing the metal cooling and UV background tables. Default: "".
-
-``Gamma`` (float)
- See Enzo equivalent above. Default: 5/3.
-
-``ThreeBodyRate`` (int) [mapped to Grackle parameter ``three_body_rate``]
- See Enzo equivalent above. Default: 0.
-
-``CIECooling`` (int) [mapped to Grackle parameter ``cie_cooling``]
- See Enzo equivalent above. Default: 0.
-
-``H2OpticalDepthApproximation`` (int) [mapped to Grackle parameter ``h2_optical_depth_approximation``]
- See Enzo equivalent above. Default: 0.
-
-``PhotoelectricHeating`` (int) [mapped to Grackle parameter ``photoelectric_heating``]
- See Enzo equivalent above. Default: 0.
-
-``PhotoelectricHeatingRate`` (float) [mapped to Grackle parameter ``photoelectric_heating_rate``]
- See Enzo equivalent above. Default: 8.5e-26.
-
-``Compton_xray_heating`` (int)
- Flag to enable Compton heating from an X-ray background following `Madau & Efstathiou (1999) <
http://adsabs.harvard.edu/abs/1999ApJ...517L...9M>`_. Default: 0.
-
-``LWbackground_intensity`` (float)
- Intensity of a constant Lyman-Werner H\ :sub:`2` photo-dissociating radiation field in units of 10\ :sup:`-21` erg s\ :sup:`-1` cm\ :sup:`-2` Hz\ :sup:`-1` sr\ :sup:`-1`. Default: 0.
-
-``LWbackground_sawtooth_suppression`` (int)
- Flag to enable suppression of Lyman-Werner flux due to Lyman-series absorption (giving a sawtooth pattern), taken from `Haiman & Abel, & Rees (2000) <
http://adsabs.harvard.edu/abs/2000ApJ...534...11H>`_. Default: 0.
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/cosmicrays.rst
--- a/doc/manual/source/parameters/cosmicrays.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-.. _cosmic_ray_parameters:
-
-Cosmic Ray Two-Fluid Model Parameters
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-For details on the cosmic ray solver in Enzo see :ref:`cosmic_rays`.
-
-``CRModel`` (external)
- This parameter turns on the model. Default: 0
-
- 0. Off
- 1. On
-
-``CRgamma``
- For CR equation of state. Default: 4.0/3.0 (relativistic, adiabatic gas)
-
-``CRDiffusion`` (external)
- Switches on diffusion of the cosmic ray energy density. Default: 0
-
- 0. Off
- 1. On with constant coefficient (``CRkappa``)
-
-
-``CRkappa`` (external)
- Cosmic ray diffusion coefficient in CGS units (cm^2/s), Default: 0.0. For MW-like galaxies: 1E28.
-
-``CRCourantSafetyNumber`` (external)
- Multiplies CR diffusion timestep, for stability should be <= 0.5. Default: 0.5
-
-``CRFeedback`` (external)
- Specify fraction of star formation feedback energy should be diverted into the cosmic
- ray energy density. implemented ONLY for star_maker3 (feedback method 2). Default: 0.0
-
-``CRdensFloor`` (external)
- Floor in gas density, can be imposed, for speed purposes (default 0.0 = off). Any value
- larger than 0.0 is on with that value as the floor in code units.
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/cosmology.rst
--- a/doc/manual/source/parameters/cosmology.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-.. _cosmology-parameters:
-
-Cosmology Parameters
-~~~~~~~~~~~~~~~~~~~~
-
-``ComovingCoordinates`` (external)
- Flag (1 - on, 0 - off) that determines if comoving coordinates are
- used or not. In practice this turns on or off the entire cosmology
- machinery. Default: 0
-``CosmologyFinalRedshift`` (external)
- This parameter specifies the redshift when the calculation will
- halt. Default: 0.0
-``CosmologyOmegaMatterNow`` (external)
- This is the contribution of all non-relativistic matter (including
- HDM) to the energy density at the current epoch (z=0), relative to
- the value required to marginally close the universe. It includes
- dark and baryonic matter. Default: 0.279
-``CosmologyOmegaLambdaNow`` (external)
- This is the contribution of the cosmological constant to the energy
- density at the current epoch, in the same units as above. Default:
- 0.721
-``CosmologyOmegaRadiationNow`` (external)
- This is the contribution of all relativistic matter to the energy
- density at the current epoch (z=0), in the same units as above.
- Default: 0.0.
-``CosmologyHubbleConstantNow`` (external)
- The Hubble constant at z=0, in units of 100 km/s/Mpc. Default:
- 0.701
-``CosmologyComovingBoxSize`` (external)
- The size of the volume to be simulated in Mpc/h (at z=0). Default:
- 64.0
-``CosmologyInitialRedshift`` (external)
- The redshift for which the initial conditions are to be generated.
- Default: 20.0
-``CosmologyMaxExpansionRate`` (external)
- This float controls the timestep so that cosmological terms are
- accurate followed. The timestep is constrained so that the relative
- change in the expansion factor in a step is less than this value.
- Default: 0.01
-``CosmologyTableNumberOfBins`` (external)
- Conversions between time and redshift are computed by interpolating
- from a numerically integrated table of log(scale factor) vs. time.
- This parameter sets the number of bins in the table. Default: 1000.
-``CosmologyTableLogaInitial`` (external)
- This sets the lower bound of the table used to convert between time
- and redshift. This is log10 of the lowest value of the scale factor.
- This value will be automatically adjusted if
- ``CosmologyInitialRedshift`` is set to an earlier time.
- Default: -6.0, (i.e., z = 999,999.)
-``CosmologyTableLogaFinal`` (external)
- This sets the upper bound of the table used to convert between time
- and redshift. This is log10 of the highest value of the scale factor.
- This value will be automatically adjusted if
- ``CosmologyFinalRedshift`` is set to a later time.
- Default: 0.0, (i.e., z = 0.)
-``CosmologyCurrentRedshift`` (information only)
- This is not strictly speaking a parameter since it is never
- interpreted and is only meant to provide information to the user.
- Default: n/a
-
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/gravity.rst
--- a/doc/manual/source/parameters/gravity.rst
+++ /dev/null
@@ -1,150 +0,0 @@
-Gravity Parameters
-~~~~~~~~~~~~~~~~~~
-
-General
-^^^^^^^
-
-``TopGridGravityBoundary`` (external)
- A single integer which specified the type of gravitational boundary
- conditions for the top grid. Possible values are 0 for periodic and
- 1 for isolated (for all dimensions). The isolated boundary
- conditions have not been tested recently, so caveat emptor.
- Default: 0
-``SelfGravity`` (external)
- This flag (1 - on, 0 - off) indicates if the baryons and particles
- undergo self-gravity.
-``SelfGravityGasOff`` (external)
- This parameter is used in conjuction with SelfGravity so that only particles contribute to potential, not gas. Default = False (i.e. gas does contribute)
-``GravitationalConstant`` (external)
- This is the gravitational constant to be used in code units. For cgs units it
- should be 4\*pi\*G. For cosmology, this value must be 1 for the
- standard units to hold. A more detailed decription can be found at :ref:`EnzoInternalUnits`. Default: 4\*pi.
-``PotentialIterations`` (external)
- Number of iterations to solve the potential on the subgrids. Values
- less than 4 sometimes will result in slight overdensities on grid
- boundaries. Default: 4.
-``MaximumGravityRefinementLevel`` (external)
- This is the lowest (most refined) depth that a gravitational
- acceleration field is computed. More refined levels interpolate
- from this level, providing a mechanism for instituting a minimum
- gravitational smoothing length. Default: ``MaximumRefinementLevel``
-``MaximumParticleRefinementLevel`` (external)
- This is the level at which the dark matter particle contribution to
- the gravity is smoothed. This works in an inefficient way (it
- actually smoothes the particle density onto the grid), and so is
- only intended for highly refined regions which are nearly
- completely baryon dominated. It is used to remove the discreteness
- effects of the few remaining dark matter particles. Not used if set
- to a value less than 0. Default: -1
-``ParticleSubgridDepositMode`` (external)
- This parameter controls how particles stored in subgrid are deposited
- into the current grid. Options are:
-
- 0. (CIC_DEPOSIT) - This is a second-order, cloud-in-cell deposition
- method in which the cloud size is equal to the cell size in
- the target grid (particles are in source grid, deposited into
- target grid). This method preserves the correct center-of-mass
- for a single particle but smears out boundaries and can result
- in small artifacts for smooth particle distributions (e.g.
- nested cosmological simulations with low perturbations).
- 1. (CIC_DEPOSIT_SMALL) - This is also a CIC method, but the cloud
- size is taken to be the cell size in the source grid, so for
- subgrids, the cloud is smaller than the grid size. This
- is an attempt to compromise between the other two methods.
- 2. (NGP_DEPOSIT) - This uses a first order, nearest-grid-point
- method to deposit particle mass. It does not preserve center-
- of mass position and so for single particle results in noisy
- accelerations. However, it does correctly treat nested
- cosmology simulations with low initial perturbations.
-
- Default: 1
-``BaryonSelfGravityApproximation`` (external)
- This flag indicates if baryon density is derived in a strange,
- expensive but self-consistent way (0 - off), or by a completely
- reasonable and much faster approximation (1 - on). This is an
- experiment gone wrong; leave on. Well, actually, it's important for
- very dense structures as when radiative cooling is turned on, so
- set to 0 if using many levels and radiative cooling is on [ignored
- in current version]. Default: 1
-
-External Gravity Source
-^^^^^^^^^^^^^^^^^^^^^^^
-
-These parameters set up an external static background gravity source that is
-added to the acceleration field for the baryons and particles.
-
-``PointSourceGravity`` (external)
- This parameter indicates that there is to be a
- (constant) gravitational field with a point source profile (``PointSourceGravity`` =
- 1) or NFW profile (``PointSourceGravity`` = 2). Default: 0
-``PointSourceGravityConstant`` (external)
- If ``PointSourceGravity`` = 1, this is the magnitude of the point
- source acceleration at a distance of 1
- length unit (i.e. GM in code units). If ``PointSourceGravity`` =
- 2, then it takes the mass of the dark matter halo in CGS
- units. ``ProblemType`` = 31 (galaxy disk simulation) automatically calculates
- values for ``PointSourceGravityConstant`` and
- ``PointSourceGravityCoreRadius``. ``ProblemType`` = 108 (elliptical galaxy and galaxy cluster) also includes the gravity from the stellar component and the SMBH. Default: 1
-``PointSourceGravityCoreRadius`` (external)
- For ``PointSourceGravity`` = 1, this is the radius inside which
- the acceleration field is smoothed in code units. With ``PointSourceGravity`` =
- 2, it is the scale radius, rs, in CGS units (see Navarro, Frank & White,
- 1997). Default: 0
-``PointSourceGravityPosition`` (external)
- If the ``PointSourceGravity`` flag is turned on, this parameter
- specifies the center of the point-source gravitational field in
- code units. Default: 0 0 0
-``ExternalGravity`` (external)
- This fulfills the same purpose as ``PointSourceGravity`` but is
- more aptly named. ``ExternalGravity = 1`` turns on an alternative
- implementation of the NFW profile with properties
- defined via the parameters ``HaloCentralDensity``, ``HaloConcentration`` and ``HaloVirialRadius``. Boxsize is assumed to be 1.0 in this case. ``ExternalGravity = 10`` gives a gravitational field defined by the logarithmic potential in Binney & Tremaine, corresponding to a disk with constant circular velocity. Default: 0
-``ExternalGravityConstant`` (external)
- If ``ExternalGravity = 10``, this is the circular velocity of the disk in code units. Default: 0.0
-``ExternalGravityDensity``
- Reserved for future use.
-``ExternalGravityPosition`` (external)
- If ``ExternalGravity = 10``, this parameter specifies the center of the gravitational field in code units. Default: 0 0 0
-``ExternalGravityOrientation`` (external)
- For ``ExternalGravity = 10``, this is the unit vector of the disk's angular momentum (e.g. a disk whose face-on view is oriented in the x-y plane would have ``ExternalGravityOrientation = 0 0 1``). Default: 0 0 0
-``ExternalGravityRadius`` (external)
- If ``ExternalGravity = 10``, this marks the inner radius of the disk in code units within which the velocity drops to zero. Default: 0.0
-``UniformGravity`` (external)
- This flag (1 - on, 0 - off) indicates if there is to be a uniform
- gravitational field. Default: 0
-``UniformGravityDirection`` (external)
- This integer is the direction of the uniform gravitational field: 0
- - along the x axis, 1 - y axis, 2 - z axis. Default: 0
-``UniformGravityConstant`` (external)
- Magnitude (and sign) of the uniform gravitational acceleration.
- Default: 1
-``DiskGravity`` (external)
- This flag (1 - on, 0 - off) indicates if there is to be a
- disk-like gravity field (Berkert 1995; Mori & Burkert 2000). Default: 0
-``DiskGravityPosition`` (external)
- This indicates the position of the center of the disk gravity.
- Default: 0 0 0
-``DiskGravityAngularMomentum`` (external)
- Specifies the unit vector of the disk angular momentum.
- Default: 0 0 1
-``DiskGravityStellarDiskMass`` (external)
- Total mass of stellar disk (in solar masses)
- Default: 1e11
-``DiskGravityDiskScaleHeightR`` (external)
- Disk scale length in radius (in Mpc)
- Default: 4.0e-3
-``DiskGravityDiskScaleHeightz`` (external)
- Disk scale height in z (in Mpc)
- Default: 2.5e-4
-``DiskGravityStellarBulgeMass`` (external)
- Disk stellar bulge mass (in solar masses)
- Default: 1.0e10
-``DiskGravityStellarBulgeR`` (external)
- Disk stellar bulge scalue radius (in Mpc)
- Default: 1.0e-4
-``DiskGravityDarkMatterR`` (external)
- Dark matter halo scale radius (in Mpc)
- Default: 2.3e-2
-``DiskGravityDarkMatterDensity`` (external)
- Dark matter effective density (in cgs)
- Default: 3.81323e-25
diff -r bef34d11b136 -r e7aed1e0cbfd doc/manual/source/parameters/hierarchy.rst
--- a/doc/manual/source/parameters/hierarchy.rst
+++ /dev/null
@@ -1,399 +0,0 @@
-Hierarchy Control Parameters
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-``StaticHierarchy`` (external)
- A flag which indicates if the hierarchy is static (1) or dynamic
- (0). In other words, a value of 1 takes the A out of AMR. Default:
- 1
-``RefineBy`` (external)
- This is the refinement factor between a grid and its subgrid. For
- cosmology simulations, we have found a ratio of 2 to be most useful.
- Default: 4
-``MaximumRefinementLevel`` (external)
- This is the lowest (most refined) depth that the code will produce.
- It is zero based, so the total number of levels (including the root
- grid) is one more than this value. Default: 2
-``CellFlaggingMethod`` (external)
- The method(s) used to specify when a cell should be refined. This
- is a list of integers, up to 9, as described by the following
- table. The methods combine in an "OR" fashion: if any of them
- indicate that a cell should be refined, then it is flagged. For
- cosmology simulations, methods 2 and 4 are probably most useful.
- Note that some methods have additional parameters which are
- described below. For more information about specific methods, see the
- method paper. Default: 1
-
- ================== ==========================================================
- CellFlaggingMethod Description
- ================== ==========================================================
- 1 Refine by slope
- 2 Refine by baryon mass
- 3 Refine by shocks
- 4 Refine by particle mass
- 5 Refine by baryon overdensity
- 6 Refine by Jeans length
- 7 Refine if (cooling time < cell width/sound speed)
- 8 Refine by must-refine particles
- 9 Refine by shear
- 10 Refine by optical depth (in RT calculation)
- 11 Refine by resistive length (in MHD calculation)
- 12 Refine by defined region "MustRefineRegion"
- 13 Refine by metallicity
- 14 Refine by shockwaves (found w/shock finder)
- 15 Refine by normalized second derivative
- 16 Refine by Jeans length from the inertial tensor
- 19 Refine by metal mass
- 100 Avoid refinement based on ForbiddenRefinement field
- 101 Avoid refinement in regions defined in "AvoidRefineRegion"
- ================== ==========================================================
-
-``RefineRegionLeftEdge``, ``RefineRegionRightEdge`` (external)
- These two parameters control the region in which refinement is
- permitted. Each is a vector of floats (of length given by the
- problem rank) and they specify the two corners of a volume.
- Default: set equal to ``DomainLeftEdge`` and ``DomainRightEdge``.
-``RefineRegionAutoAdjust`` (external)
- This is useful for multiresolution simulations with particles in
- which the particles have varying mass. Set to 1 to automatically
- adjust the refine region at root grid timesteps to only contain
- high-resolution particles. This makes sure that the fine regions do
- not contain more massive particles which may lead to small
- particles orbiting them or other undesired outcomes. Setting to any
- integer (for example, 3) will make AdjustRefineRegion to work at
- (RefineRegionAutoAdjust-1)th level timesteps because sometimes the
- heavy particles are coming into the fine regions too fast that you
- need more frequent protection. Default: 0.
-``RefineRegionTimeType`` (external)
- If set, this controls how the first column of a refinement region
- evolution file (see below) is interpreted, 0 for code time, 1 for
- redshift. Default: -1, which is equivalent to 'off'.
-``RefineRegionFile`` (external)
- The name of a text file containing the corners of the time-evolving
- refinement region. The lines in the file change the values of
- ``RefineRegionLeft/RightEdge`` during the course of the simulation, and
- the lines are ordered in the file from early times to late times.
- The first column of data is the time index (in code units or
- redshift, see the parameter above) for the next six columns, which
- are the values of ``RefineRegionLeft/RightEdge``. For example, this
- might be two lines from the text file when time is indexed by
- redshift:
- ::
-
- 0.60 0.530 0.612 0.185 0.591 0.667 0.208
- 0.55 0.520 0.607 0.181 0.584 0.653 0.201
-
- In this case, the refinement region stays at the z=0.60 value
- until z=0.55, when the box moves slightly closer to the (0,0,0)
- corner. There is a maximum of 300 lines in the file and there is no
- comment header line. Default: None.
-``MinimumOverDensityForRefinement`` (external)
- These float values (up to 9) are used if the
- ``CellFlaggingMethod`` is 2, 4 or 5. For method 2 and 4, the value is the density (baryon or particle), in code units, above which refinement occurs. When using method 5, it becomes rho [code] - 1. The elements in this array must match those in ``CellFlaggingMethod``. Therefore, if ``CellFlaggingMethod`` = 1 4 9 10, ``MinimumOverDensityForRefinement`` = 0 8.0 0 0.
-
- In practice, this value is converted into a mass by
- multiplying it by the volume of the top grid cell. The result is
- then stored in the next parameter (unless that is set directly in
- which case this parameter is ignored), and this defines the mass
- resolution of the simulation. Note that the volume is of a top grid
- cell, so if you are doing a multi-grid initialization, you must
- divide this number by r\ :sup:`(d\*l)`\ where r is the refinement
- factor, d is the dimensionality and l is the (zero-based) lowest
- level. For example, for a two grid cosmology setup where a cell should be
- refined whenever the mass exceeds 4 times the mean density of the
- subgrid, this value should be 4 / (2\ :sup:`(3\*1)`\ ) = 4 / 8 =
- 0.5. Keep in mind that this parameter has no effect if it is
- changed in a restart output; if you want to change the refinement
- mid-run you will have to modify the next parameter. Up to 9
- numbers may be specified here, each corresponding to the respective
- ``CellFlaggingMethod``. Default: 1.5
-``MinimumMassForRefinement`` (internal)
- This float is usually set by the parameter above and so is labeled
- internal, but it can be set by hand. For non-cosmological simulations, it can be the easier refinement criteria to specify. It is the mass above
- which a refinement occurs if the ``CellFlaggingMethod`` is
- appropriately set. For cosmological simulations, it is specified in units such
- that the entire mass in the computational volume is 1.0, otherwise it is in code units. There are 9 numbers here again, as per the
- above parameter. Default: none
-``MinimumMassForRefinementLevelExponent`` (external).
- This parameter modifies the behaviour of the above parameter. As it
- stands, the refinement based on the ``MinimumMassForRefinement``
- (hereafter Mmin) parameter is complete Lagrangian. However, this
- can be modified. The actual mass used is
- Mmin\*r\ :sup:`(l\*alpha)`\ where r is the refinement factor, l is
- the level and alpha is the value of this parameter
- (``MinimumMassForRefinementLevelExponent``). Therefore a negative value
- makes the refinement super-Lagrangian, while positive values are
- sub-Lagrangian. There are up to 9 values specified here, as per
- the above two parameters. Default: 0.0
-``SlopeFlaggingFields`` (external)
- If ``CellFlaggingMethod`` is 1, and you only want to refine on the
- slopes of certain fields then you can enter the
- :ref:`Field Type IDs <Field_List_Reference>` of the fields you want,
- separating the IDs with a space. Up to 7 Field Type IDs can be
- specified. Default: Refine on slopes of all fields.
-``MinimumSlopeForRefinement`` (external)
- If ``CellFlaggingMethod`` is 1, then local gradients are used as the
- refinement criteria. All variables are examined and the relative
- slope is computed: abs(q(i+1)-q(i-1))/q(i). Where this value
- exceeds this parameter, the cell is marked for refinement. This
- causes problems if q(i) is near zero. This is a single integer (as
- opposed to the list of five for the above parameters). Entering
- multiple numbers here correspond to the fields listed in
- ``SlopeFlaggingFields``. Default: 0.3
-``MinimumPressureJumpForRefinement`` (external)
- If refinement is done by shocks, then this is the minimum
- (relative) pressure jump in one-dimension to qualify for a shock.
- The definition is rather standard (see Colella and Woodward's PPM
- paper for example) Default: 0.33
-``MinimumEnergyRatioForRefinement`` (external)
- For the dual energy formalism, and cell flagging by
- shock-detection, this is an extra filter which removes weak shocks
- (or noise in the dual energy fields) from triggering the shock
- detection. Default: 0.1
-``MinimumShearForRefinement`` (external)
- It is the minimum shear above which a refinement occurs if the CellFlaggingMethod is appropriately set. Default: 0
-``OldShearMethod`` (external)
- If using the shear refinement criterion, setting this variable to 1 enables
- the old method for calculating the shear criterion, which actually
- calculates it based on shear and vorticity and makes some assumptions
- about the simulations (c_s=1, etc.). However, this is necessary
- if you want to reproduce some of the old enzo results
- (e.g. Kritsuk et al. 2006). Default: 0
-``MetallicityRefinementMinMetallicity`` (external)
- For method 13 (metallicity refinement), this is the threshold
- metallicity (in units of solar metallicity) above which cells must
- be refined to a minimum level of
- ``MetallicityRefinementMinLevel``. For method 19 (metal mass),
- this flags cells for refinement when the metal mass is above the
- necessary baryon mass (method 2) for refinement multiplied by this
- parameter. Behaves similarly to refinement by baryon mass but
- focuses on metal-enriched regions. In units of solar metallicity.
- Default: 1.0e-5
-``MetallicityRefinementMinLevel`` (external)
- Sets the minimum level (maximum cell size) to which a cell enriched
- with metal above a level set by ``MetallicityRefinementMinMetallicity``
- will be refined. This can be set to any level up to and including
- ``MaximumRefinementLevel``. (No default setting)
-``MetallicityRefinementMinDensity`` (external)
- It is the minimum density above which a refinement occurs when the cells are refined on metallicity. Default: FLOAT_UNDEFINED
-``ShockwaveRefinementMinMach`` (external)
- The minimum Mach number required to refine a level when using ShockwaveRefinement. Default: 1.3
-``ShockwaveRefinementMinVelocity`` (external)
- The minimum shock velocity required to refine a level when using ShockwaveRefinement. Default: 1.0e7 (cm/s)
-``ShockwaveRefinementMaxLevel`` (external)
- The maximum level to refine to using the ShockwaveRefinement criteria. Default: 0 (not used)
-``SecondDerivativeFlaggingFields`` (external)
- The field indices (list of up to 7) that are used for the normalized second
- derivative refinement criteria. Default: INT_UNDEFINED
-``MinimumSecondDerivativeForRefinement`` (external)
- The value of the second derivative above which a cell will be flagged for
- refinement. Each value in this list (of up to 7 values) should be between
- 0.0 and 1.0. Values between 0.3-0.8 are recommended. Default: 0.3
-``SecondDerivativeEpsilon`` (external)
- Used to avoid refining around oscillations/fluctuations in the normalized
- second derivative refinement method. The higher the value, the more it
- will filter out. For fluid instability simulations, a value of ~0.01 is
- good. For full-physics simulations, values around ~0.2 are recommended. Be
- aware that fluctuations on this scale in initial conditions may cause
- immediate refinement to the maximum level. Default: 1.0e-2
-``RefineByJeansLengthSafetyFactor`` (external)
- If the Jeans length refinement criterion (see ``CellFlaggingMethod``)
- is being used, then this parameter specifies the number of cells
- which must cover one Jeans length. Default: 4
-``JeansRefinementColdTemperature`` (external)
- If the Jeans length refinement criterion (see ``CellFlaggingMethod``)
- is being used, and this parameter is greater than zero, this
- temperature will be used in all cells when calculating the Jeans
- length. If it is less than or equal to zero, it will be used as a
- temperature floor when calculating the Jeans length. Default: -1.0
-``RefineByResistiveLengthSafetyFactor`` (external)
- Resistive length is defined as the curl of the magnetic field over
- the magnitude of the magnetic field. We make sure this length is
- covered by this number of cells. i.w. The resistive length in a MHD simulation should not be smaller than CellWidth * RefineByResistiveLengthSafetyFactor. Default: 2.0
-``MustRefineParticlesCreateParticles`` (external)
- This parameter will flag dark matter particles in cosmological
- initial conditions as ``MustRefineParticles``. If ``CellFlaggingMethod``
- 8 is set, AMR will be restricted to cells surrounding
- ``MustRefineParticles``. There are several different modes for creating
- ``MustRefineParticles`` with this parameter described below. Further
- information on how to use dark matter ``MustRefineParticles`` in
- cosmological simulations can be found here (link). Default: 0
-
- 1. If the user specifies ``MustRefineParticlesLeftEdge`` and
- ``MustRefineParticlesRightEdge``, dark matter particles within the
- specified region are flagged. Otherwise, the code looks for an ascii
- input file called MustRefineParticlesFlaggingList.in that contains a list
- of particle ids to be flagged. The ids in this list must be sorted in
- acending order.
- 2. For use with ellipsodial masking in MUSIC inititial conditions. This
- setting uses traditional static grids for intermediate resolution levels
- MUSIC will generate RefinementMask files and the ``ParticleTypeName``
- parameter should be set to the name of these files.
- 3. Same as setting 2, except refinement on intermediate levels is not
- constrained by static grids. Instead, refinement around dark matter
- particles is allowed down to the level of a particle's generation level.
- Refinement beyond this level is allowed around particles within the MUSIC
- ellipsoidal making region.
-
-``MustRefineParticlesRefineToLevel`` (external)
- The maximum level on which ``MustRefineParticles`` are required to
- refine to. Currently sink particles and MBH particles are required
- to be sitting at this level at all times. Default: 0
-``MustRefineParticlesRefineToLevelAutoAdjust`` (external)
- The parameter above might not be handy in cosmological simulations
- if you want your ``MustRefineParticles`` to be refined to a certain
- physical length, not to a level whose cell size keeps changing.
- This parameter (positive integer in pc) allows you to do just that.
- For example, if you set ``MustRefineParticlesRefineToLevelAutoAdjust``
- = 128 (pc), then the code will automatically calculate
- ``MustRefineParticlesRefineToLevel`` using the boxsize and redshift
- information. Default: 0 (FALSE)
-``MustRefineParticlesMinimumMass`` (external)
- This was an experimental parameter to set a minimum for ``MustRefineParticles``. Default: 0.0
-``MustRefineParticlesRegionLeftEdge`` (external)
- Bottom-left corner of a region in which dark matter particles are flagged
- as ``MustRefineParticles`` in nested cosmological simulations. To be used with
- ``MustRefineParticlesCreateParticles`` = 1. Default: 0.0 0.0 0.0
-``MustRefineParticlesRegionRightEdge`` (external)
- Top-right corner of a region in which dark matter particles are flagged
- as ``MustRefineParticles`` in nested cosmological simulations. To be used with
- ``MustRefineParticlesCreateParticles`` = 1. Default: 0.0 0.0 0.0
-``MustRefineRegionMinRefinementLevel`` (external)
- Minimum level to which the rectangular solid volume defined by
- ``MustRefineRegionLeftEdge`` and ``MustRefineRegionRightEdge`` will be
- refined to at all times. (No default setting)
-``MustRefineRegionLeftEdge`` (external)
- Bottom-left corner of refinement region. Must be within the overall
- refinement region. Default: 0.0 0.0 0.0
-``MustRefineRegionRightEdge`` (external)
- Top-right corner of refinement region. Must be within the overall
- refinement region. Default: 1.0 1.0 1.0
-``StaticRefineRegionLevel[#]`` (external)
- This parameter is used to specify regions of the problem that are
- to be statically refined, regardless of other parameters. This is mostly
- used as an internal mechanism to keep the initial grid hierarchy in
- place, but can be specified by the user. Up to 20 static regions
- may be defined (this number set in ``macros_and_parameters.h``), and
- each static region is labeled starting from zero. For each static
- refined region, two pieces of information are required: (1) the
- region (see the next two parameters), and (2) the level at which
- the refinement is to occurs (0 implies a level 1 region will always
- exist). Default: none
-``StaticRefineRegionLeftEdge[#]``, ``StaticRefineRegionRightEdge[#]`` (external)
- These two parameters specify the two corners of a statically
- refined region (see the previous parameter). Default: none
-``AvoidRefineRegionLevel[#]`` (external)
- This parameter is used to limit the refinement to this level in a
- rectangular region. Up to MAX_STATIC_REGIONS regions can be used.
- Default: IND_UNDEFINED
-``AvoidRefineRegionLeftEdge[#]``, ``AvoidRefineRegionRightEdge[#]`` (external)
- These two parameters specify the two corners of a region that
- limits refinement to a certain level (see the previous
- parameter). Default: none
-``MultiRefineRegionGeometry[#]`` (external)
- This parameter (and the ones following) describe a physical region of the simulation box for which an
- independent refinement maximum and minimum (separate from ``MaximumRefinementLevel``) can be specified.
-``MultiRefineRegionGeometry[#]`` controls the geometry of the refined volume. Currently implemented
- geometries are: (0) a rectangular region, (1) a ring of infinite height and (2) a cylinder of infinite
- height. Up to 20 multi-refined regions may be defined (number the same as for ``StaticRefineRegion``)
- and each multi-refined region is labelled starting from zero. Default: -1 (no multi-regions)
-``MultiRefineRegionLeftEdge[#]``, ``MultiRefineRegionRightEdge[#]`` (external)
- Used when ``MultiRefineRegionGeometry[#] = 0`` and specifies the two corners in code units of a
- rectagular multi-region with a given maximum and minimum refinement level. Default: none.
-``MultiRefineRegionCenter[#]`` (external)
- Used when ``MultiRefineRegionGeometry[#] = 1 or 2`` and specifies the center of the ring or cylinder
- in code units. Default: none
-``MultiRefineRegionRadius[#]`` (external)
- Used when ``MultiRefineRegionGeometry[#] = 1 or 2`` and specifies the radius of the ring or cylinder
- in code units. In the case of the ring, this marks the distance to the middle of the ring's thickness.
- The thickness is specified with ``MultiRefineRegionWidth``. Default: none
-``MultiRefineRegionWidth[#]`` (external)
- Used when ``MultiRefineRegionGeometry[#] = 1`` and specifies the width (thickness) of the ring in
- code units. Default: none
-``MultiRefineRegionOrientation[#]`` (external)
- Used when ``MultiRefineRegionGeometry[#] = 1 or 2`` and is a unit vector pointing along the vertical
- direction of the ring or cylinder. Default: none.
-``MultiRefineRegionStaggeredRefinement[#]`` (external)
- Used when ``MultiRefineRegionGeometry[#] = 1 or 2``. To avoid a sharp change in refinement at the edge of
- the ring or cylinder, the allowed refinement is staggered from the maximum allowed value outside the
- region, ``MultiRefineRegionOuterMaximumLevel``, to the maximum allowed refinement inside the region,
- ``MultiRefineRegionMaximumLevel``. This parameter is the length over which that staggering occurs in
- code units. Default: 0.0 (no staggering)
-``MultiRefineRegionMaximumLevel[#]``, ``MultiRefineRegionMinimumLevel[#]`` (external)
- Maximum and minimum allowed refinement inside the region. Default: ``MaximumRefinementLevel``, 0
-``MultiRefineRegionMaximumOuterLevel``, ``MultiRefineRegionMinimumOuterLevel`` (external)
- Maximum and minimum allowed refinement outside all regions. Default: ``MaximumRefinementLevel``, 0
-``MinimumEfficiency`` (external)
- When new grids are created during the rebuilding process, each grid
- is split up by a recursive bisection process that continues until a
- subgrid is either of a minimum size or has an efficiency higher
- than this value. The efficiency is the ratio of flagged zones
- (those requiring refinement) to the total number of zones in the
- grid. This is a number between 0 and 1 and should probably by
- around 0.4 for standard three-dimensional runs. Default: 0.2
-``NumberOfBufferZones`` (external)
- Each flagged cell, during the regridding process, is surrounded by
- a number of zones to prevent the phenomenon of interest from
- leaving the refined region before the next regrid. This integer
- parameter controls the number required, which should almost always
- be one. Default: 1
-``MinimumSubgridEdge`` (external)
- The minimum length of the edge of a subgrid. See :ref:`running_large_simulations`. Default: 6
-``MaximumSubgridSize`` (external)
- The maximum size (volume) of a subgrid. See :ref:`running_large_simulations`. Default: 32768
-``CriticalGridRatio`` (external)
- Critical grid ratio above which subgrids will be split in half along their
- long axis prior to being split by the second derivative of their
- signature. Default: 3.0
-``SubgridSizeAutoAdjust`` (external)
- See :ref:`running_large_simulations`. Default: 1 (TRUE)
-``OptimalSubgridsPerProcessor`` (external)
- See :ref:`running_large_simulations`. Default: 16
-``LoadBalancing`` (external)
- Set to 0 to keep child grids on the same processor as their
- parents. Set to 1 to balance the work on one level over all
- processors. Set to 2 or 3 to load balance the grids but keep them
- on the same node. Option 2 assumes grouped scheduling, i.e. proc #
- = (01234567) reside on node (00112233) if there are 4 nodes. Option
- 3 assumes round-robin scheduling (proc = (01234567) -> node =
- (01230123)). Set to 4 for load balancing along a Hilbert
- space-filling curve on each level. See :ref:`running_large_simulations`. Default: 1
-``LoadBalancingCycleSkip`` (external)
- This sets how many cycles pass before we load balance the root
- grids. Only works with LoadBalancing set to 2 or 3. NOT RECOMMENDED
- for nested grid calculations. Default: 10
-``LoadBalancingMinLevel`` (external)
- Load balance the grids in levels greater than this parameter. Default: 0
-``LoadBalancingMaxLevel`` (external)
- Load balance the grids in levels less than this parameter. Default: MAX_DEPTH_OF_HIERARCHY
-``ResetLoadBalancing`` (external)
- When restarting a simulation, this parameter resets the processor number of each root grid to be sequential. All child grids are assigned to the processor of their parent grid. Only implemented for LoadBalancing = 1. Default = 0
-``NumberOfRootGridTilesPerDimensionPerProcessor`` (external)
- Splits the root grid into 2^(dimensions*this parameter) grids per MPI process. Default: 1
-``UserDefinedRootGridLayout`` (external)
- A three element array. Splits the root grid into ``N`` subgrids where ``N``
- is the product of the supplied values. The first entry corresponds to the
- number of root grid decompositions along the x axis of the simulation, the
- second element the number of decompositions along the y axis, and the third
- the number of decompositions along the z axis.
-
- This parameter is only used if all three elements of the array are set to a
- value different from the dummy default value. If that is the case the root
- grid will be *manually* decomposed and the value supplied for
- ``NumberOfRootGridTilesPerDimensionPerProcessor`` will be ignored. This is
- most useful when an automatic root grid decomposition is inefficient (for
- example, in a deeply nested isolated galaxy simulation).
-
- This parameter should be used with caution since it is possible to get into
- a situation where there are fewer grids than CPU cores. Normally this can
- never happen since there will always be at least one root grid tile for every
- CPU. Most simulations assume you will be running with as many root grid
- tiles as CPUs - if you instead opt to reduce the number of root grid tiles
- per CPU to a number less than one, Enzo might break in unpredictable ways.
- Default: -99999 -99999 -99999
-
-``FastSiblingLocatorEntireDomain`` (external)
- In zoom-in calculations, the fast sibling locator doesn't need to search the entire domain. Turning this parameter on restricts the finder to the inner nested grid. Currently broken. Default: 0
-``MoveParticlesBetweenSiblings`` (external)
- During RebuildHierarchy, particles that have moved beyond the grid boundaries are moved to the correct grid. Default: 1
-``RebuildHierarchyCycleSkip`` (external)
- Set the number of cycles at a given level before rebuilding the hierarchy. Example: RebuildHierarchyCycleSkip[1] = 4
This diff is so big that we needed to truncate the remainder.
https://bitbucket.org/enzo/enzo-dev/commits/a4fbcb7b3a26/
Changeset: a4fbcb7b3a26
Branch: week-of-code
User: jwise77
Date: 2018-10-12 20:48:11+00:00
Summary: Changes to the test runner to download the cosmological test ICs,
given a key to the yt hub. I've also changed the .enzotest files to
have the appropriate keys.
Affected #: 4 files
diff -r e7aed1e0cbfd -r a4fbcb7b3a26 run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
--- a/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
@@ -12,3 +12,4 @@
fullsuite = True
pushsuite = True
quicksuite = True
+hub_download = '5afb0040ec1bd30001fcd002'
\ No newline at end of file
diff -r e7aed1e0cbfd -r a4fbcb7b3a26 run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
--- a/run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
+++ b/run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
@@ -12,3 +12,4 @@
fullsuite = True
pushsuite = True
quicksuite = True
+hub_download = '5afef79bec1bd30001fcd07e'
\ No newline at end of file
diff -r e7aed1e0cbfd -r a4fbcb7b3a26 run/CosmologySimulation/dm_only/dm_only.enzotest
--- a/run/CosmologySimulation/dm_only/dm_only.enzotest
+++ b/run/CosmologySimulation/dm_only/dm_only.enzotest
@@ -12,3 +12,4 @@
fullsuite = True
pushsuite = True
quicksuite = True
+hub_download = '5afb0145ec1bd30001fcd024'
\ No newline at end of file
diff -r e7aed1e0cbfd -r a4fbcb7b3a26 run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -84,7 +84,8 @@
quicksuite = (bool, False),
pushsuite = (bool, False),
fullsuite = (bool, False),
- problematic = (bool, False)
+ problematic = (bool, False),
+ hub_download = (str, None)
)
known_variables = dict( [(k, v[0]) for k, v in varspec.items()] )
@@ -109,6 +110,7 @@
results_filename = 'test_results.txt'
version_filename = 'version.txt'
+hub_url = '
https://girder.hub.yt/api/v1'
# Files to be included when gathering results.
results_gather = ['results', version_filename]
@@ -295,7 +297,7 @@
shutil.copy(exe_path, output_dir)
exe_path = os.path.join(output_dir, os.path.basename(exe_path))
results_path = os.path.join(self.output_dir, results_filename)
-
+
if interleaved:
for i, my_test in enumerate(self.tests):
print("Preparing test: %s." % my_test['name'])
@@ -499,6 +501,11 @@
return True
os.chdir(self.run_dir)
+ # Download data if requested
+ command = "girder-cli --api-url %s download %s" % \
+ (hub_url, self.test_data['hub_download'])
+ os.system(command)
+
command = "%s %s" % (machines[self.machine]['command'],
machines[self.machine]['script'])
sim_start_time = time.time()
@@ -576,6 +583,8 @@
default=False, help="Drop into debugger on errors")
parser.add_option("--changeset", dest="changeset", default=None, metavar='str',
help="Changeset to use in simulation repo. If supplied, make clean && make is also run")
+ parser.add_option("--jcompile", dest="jcompile", default=1, metavar='int',
+ help="Number of cores to use when recompiling")
parser.add_option("--run-suffix", dest="run_suffix", default=None, metavar='str',
help="An optional suffix to append to the test run directory. Useful to distinguish multiple runs of a given changeset.")
parser.add_option("", "--bitwise",
https://bitbucket.org/enzo/enzo-dev/commits/7be58108a43a/
Changeset: 7be58108a43a
Branch: week-of-code
User: jwise77
Date: 2019-02-01 17:49:46+00:00
Summary: Forgot to add check whether hub_download url exists before downloading
Affected #: 1 file
diff -r a4fbcb7b3a26 -r 7be58108a43a run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -502,9 +502,10 @@
os.chdir(self.run_dir)
# Download data if requested
- command = "girder-cli --api-url %s download %s" % \
- (hub_url, self.test_data['hub_download'])
- os.system(command)
+ if 'hub_download' in self.test_data:
+ command = "girder-cli --api-url %s download %s" % \
+ (hub_url, self.test_data['hub_download'])
+ os.system(command)
command = "%s %s" % (machines[self.machine]['command'],
machines[self.machine]['script'])
https://bitbucket.org/enzo/enzo-dev/commits/03bb7751c11a/
Changeset: 03bb7751c11a
Branch: week-of-code
User: jwise77
Date: 2019-02-01 18:51:24+00:00
Summary: hub_download key always exists. Check if not None instead
Affected #: 1 file
diff -r 7be58108a43a -r 03bb7751c11a run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -502,7 +502,7 @@
os.chdir(self.run_dir)
# Download data if requested
- if 'hub_download' in self.test_data:
+ if self.test_data['hub_download'] is not None:
command = "girder-cli --api-url %s download %s" % \
(hub_url, self.test_data['hub_download'])
os.system(command)
https://bitbucket.org/enzo/enzo-dev/commits/0d7a2b9d82db/
Changeset: 0d7a2b9d82db
Branch: week-of-code
User: jwise77
Date: 2019-02-01 19:48:21+00:00
Summary: jcompile in the test runner options should be an int
Affected #: 1 file
diff -r 03bb7751c11a -r 0d7a2b9d82db run/test_runner.py
--- a/run/test_runner.py
+++ b/run/test_runner.py
@@ -584,7 +584,7 @@
default=False, help="Drop into debugger on errors")
parser.add_option("--changeset", dest="changeset", default=None, metavar='str',
help="Changeset to use in simulation repo. If supplied, make clean && make is also run")
- parser.add_option("--jcompile", dest="jcompile", default=1, metavar='int',
+ parser.add_option("--jcompile", dest="jcompile", default=1, metavar='int', type=int,
help="Number of cores to use when recompiling")
parser.add_option("--run-suffix", dest="run_suffix", default=None, metavar='str',
help="An optional suffix to append to the test run directory. Useful to distinguish multiple runs of a given changeset.")
https://bitbucket.org/enzo/enzo-dev/commits/d4cee1981c1f/
Changeset: d4cee1981c1f
Branch: week-of-code
User: gbryan
Date: 2019-02-06 03:26:33+00:00
Summary: Merged in brittonsmith/enzo-dev-cosmotest (pull request #419)
Add Cosmology Simulation to test suite
Approved-by: John Regan <
johnanth...@gmail.com>
Approved-by: Brian O'Shea <
os...@msu.edu>
Approved-by: John Wise <
jw...@physics.gatech.edu>
Affected #: 30 files
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology/AMRCosmology.enzo
--- a/run/CosmologySimulation/AMRCosmology/AMRCosmology.enzo
+++ /dev/null
@@ -1,118 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
-# This is a small cosmology simulation that runs to z = 0.
-# The redshift outputs can be used to create a light-cone out to z = 0.1.
-#
-# define problem
-#
-ProblemType = 30 // cosmology simulation
-TopGridRank = 3
-TopGridDimensions = 32 32 32
-SelfGravity = 1 // gravity on
-TopGridGravityBoundary = 0 // Periodic BC for gravity
-LeftFaceBoundaryCondition = 3 3 3 // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.0441
-CosmologySimulationOmegaCDMNow = 0.2239
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities
-CosmologySimulationVelocity2Name = GridVelocities
-CosmologySimulationVelocity3Name = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 1
-CosmologySimulationUseMetallicityField = 1
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyHubbleConstantNow = 0.704
-CosmologyComovingBoxSize = 32.0
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 50
-CosmologyFinalRedshift = 0
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-dtDataDump = 5
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-CosmologyOutputRedshift[0] = 0.100
-CosmologyOutputRedshift[1] = 0.089
-CosmologyOutputRedshift[2] = 0.078
-CosmologyOutputRedshift[3] = 0.067
-CosmologyOutputRedshift[4] = 0.057
-CosmologyOutputRedshift[5] = 0.047
-CosmologyOutputRedshift[6] = 0.037
-CosmologyOutputRedshift[7] = 0.027
-CosmologyOutputRedshift[8] = 0.017
-CosmologyOutputRedshift[9] = 0.007
-
-#
-# hydro parameters
-#
-HydroMethod = 0 // PPM
-Gamma = 1.6667
-PPMDiffusionParameter = 0 // diffusion off
-DualEnergyFormalism = 1 // use total & internal energy
-InterpolationMethod = 1 // SecondOrderA
-FluxCorrection = 1
-ConservativeInterpolation = 1
-CourantSafetyNumber = 0.5
-ParticleCourantSafetyNumber = 0.8
-UseMinimumPressureSupport = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 5
-MaximumGravityRefinementLevel = 5
-MaximumParticleRefinementLevel = 5
-RefineBy = 2
-CellFlaggingMethod = 2 4
-MinimumOverDensityForRefinement = 8.0 8.0
-MinimumMassForRefinementLevelExponent = 0.0 0.0
-MinimumEfficiency = 0.35
-
-#
-# microphysics parameters
-#
-MultiSpecies = 0
-RadiativeCooling = 1
-RadiationFieldType = 0
-
-#
-# star formation parameters
-#
-StarParticleCreation = 1
-StarParticleFeedback = 1
-StarMakerOverDensityThreshold = 100
-StarMakerMinimumMass = 1e6
-StarMakerMinimumDynamicalTime = 1e6
-StarMakerMassEfficiency = 0.1
-StarMassEjectionFraction = 0.25
-StarMetalYield = 0.1
-StarEnergyToThermalFeedback = 1e-5
-StarFeedbackDistRadius = 1
-StarFeedbackDistCellStep = 3
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-ParallelRootGridIO = 1
-ParallelParticleIO = 1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology/AMRCosmology.enzotest
--- a/run/CosmologySimulation/AMRCosmology/AMRCosmology.enzotest
+++ /dev/null
@@ -1,14 +0,0 @@
-name = 'AMRCosmology'
-answer_testing_script = None
-nprocs = 2
-runtime = 'long'
-AMR = True
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 3
-author = 'Uncle Enzo'
-max_time_minutes = 120
-fullsuite = False
-pushsuite = False
-quicksuite = False
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology/AMRCosmology.inits
--- a/run/CosmologySimulation/AMRCosmology/AMRCosmology.inits
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyOmegaBaryonNow = 0.0441
-CosmologyComovingBoxSize = 32.0 // in Mpc/h
-CosmologyHubbleConstantNow = 0.704 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 50
-
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.807
-PowerSpectrumPrimordialIndex = 0.961
-PowerSpectrumRandomSeed = -312367047
-
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 1
-GridDims = 32 32 32
-
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 1
-ParticleDims = 32 32 32
-
-#
-# Names
-#
-ParticlePositionName = ParticlePositions
-ParticleVelocityName = ParticleVelocities
-GridDensityName = GridDensity
-GridVelocityName = GridVelocities
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology/notes.txt
--- a/run/CosmologySimulation/AMRCosmology/notes.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-This is a cosmology simulation that runs to z = 0 with tabulated
-radiative cooling and conventional, non-radiative star formation and
-feedback. It will run on 2 processors in about 40 minutes.
-
-note: you'll need a
cool_rates.in file, which can be found in the inputs
-directory
-
-Usage:
-./inits.exe -d AMRCosmology.inits
-mpirun -np 2 ./ring.exe pv ParticlePositions ParticleVelocities
-mpirun -np 2 ./enzo.exe -d AMRCosmology.enzo
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzo
--- a/run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzo
+++ /dev/null
@@ -1,122 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
-# This is a small cosmology simulation that runs to z = 0.
-# The redshift outputs can be used to create a light-cone out to z = 0.1.
-#
-# define problem
-#
-ProblemType = 30 // cosmology simulation
-TopGridRank = 3
-TopGridDimensions = 32 32 32
-SelfGravity = 1 // gravity on
-TopGridGravityBoundary = 0 // Periodic BC for gravity
-LeftFaceBoundaryCondition = 3 3 3 // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.0441
-CosmologySimulationOmegaCDMNow = 0.2239
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities
-CosmologySimulationVelocity2Name = GridVelocities
-CosmologySimulationVelocity3Name = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 1
-CosmologySimulationUseMetallicityField = 1
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyHubbleConstantNow = 0.704
-CosmologyComovingBoxSize = 32.0
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 50
-CosmologyFinalRedshift = 0
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-dtDataDump = 5
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-CosmologyOutputRedshift[0] = 0.100
-CosmologyOutputRedshift[1] = 0.089
-CosmologyOutputRedshift[2] = 0.078
-CosmologyOutputRedshift[3] = 0.067
-CosmologyOutputRedshift[4] = 0.057
-CosmologyOutputRedshift[5] = 0.047
-CosmologyOutputRedshift[6] = 0.037
-CosmologyOutputRedshift[7] = 0.027
-CosmologyOutputRedshift[8] = 0.017
-CosmologyOutputRedshift[9] = 0.007
-
-#
-# hydro parameters
-#
-HydroMethod = 0 // PPM
-Gamma = 1.6667
-PPMDiffusionParameter = 0 // diffusion off
-DualEnergyFormalism = 1 // use total & internal energy
-InterpolationMethod = 1 // SecondOrderA
-FluxCorrection = 1
-ConservativeInterpolation = 1
-CourantSafetyNumber = 0.5
-ParticleCourantSafetyNumber = 0.8
-UseMinimumPressureSupport = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 5
-MaximumGravityRefinementLevel = 5
-MaximumParticleRefinementLevel = 5
-RefineBy = 2
-CellFlaggingMethod = 2 4
-MinimumOverDensityForRefinement = 8.0 8.0
-MinimumMassForRefinementLevelExponent = 0.0 0.0
-MinimumEfficiency = 0.35
-
-#
-# microphysics parameters
-#
-RadiativeCooling = 1
-use_grackle = 1
-MultiSpecies = 0 // sets grackle.primordial_chemistry
-MetalCooling = 1 // sets grackle.metal_cooling
-grackle_data_file = CloudyData_UVB=HM2012.h5
-UVbackground = 1
-CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
-
-#
-# star formation parameters
-#
-StarParticleCreation = 1
-StarParticleFeedback = 1
-StarMakerOverDensityThreshold = 100
-StarMakerMinimumMass = 1e6
-StarMakerMinimumDynamicalTime = 1e6
-StarMakerMassEfficiency = 0.1
-StarMassEjectionFraction = 0.25
-StarMetalYield = 0.1
-StarEnergyToThermalFeedback = 1e-5
-StarFeedbackDistRadius = 1
-StarFeedbackDistCellStep = 3
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-ParallelRootGridIO = 1
-ParallelParticleIO = 1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzotest
--- a/run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.enzotest
+++ /dev/null
@@ -1,14 +0,0 @@
-name = 'AMRCosmology_Grackle'
-answer_testing_script = None
-nprocs = 2
-runtime = 'long'
-AMR = True
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 3
-author = 'Uncle Enzo'
-max_time_minutes = 120
-fullsuite = False
-pushsuite = False
-quicksuite = False
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.inits
--- a/run/CosmologySimulation/AMRCosmology_Grackle/AMRCosmology_Grackle.inits
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.268
-CosmologyOmegaLambdaNow = 0.732
-CosmologyOmegaBaryonNow = 0.0441
-CosmologyComovingBoxSize = 32.0 // in Mpc/h
-CosmologyHubbleConstantNow = 0.704 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 50
-
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.807
-PowerSpectrumPrimordialIndex = 0.961
-PowerSpectrumRandomSeed = -312367047
-
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 1
-GridDims = 32 32 32
-
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 1
-ParticleDims = 32 32 32
-
-#
-# Names
-#
-ParticlePositionName = ParticlePositions
-ParticleVelocityName = ParticleVelocities
-GridDensityName = GridDensity
-GridVelocityName = GridVelocities
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRCosmology_Grackle/notes.txt
--- a/run/CosmologySimulation/AMRCosmology_Grackle/notes.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This is a cosmology simulation identical to AMRCosmology, except using
-the Grackle to solve the cooling. See the documentation
-for more information on running with Grackle.
-
-This simulation runs to z = 0 with tabulated primordial and metal
-cooling from Grackle and conventional, non-radiative star formation and
-feedback. It will run on 2 processors in about 40 minutes.
-
-To run this, you will need to copy the file, CloudyData_UVB=HM2012.h5,
-from the input directory of your Grackle source, to the run directory
-of the simulation.
-
-Usage:
-./inits.exe -d AMRCosmology_Grackle.inits
-mpirun -np 2 ./ring.exe pv ParticlePositions ParticleVelocities
-mpirun -np 2 ./enzo.exe -d AMRCosmology_Grackle.enzo
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzo
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzo
+++ /dev/null
@@ -1,121 +0,0 @@
-#;-*-C-*-
-
-# AMR PROBLEM DEFINITION FILE: Nested Cosmology Simulation
-# This is a cosmology simulation that runs until a dense object collapses.
-#
-# define problem
-#
-ProblemType = 30
-TopGridRank = 3
-SelfGravity = 1
-TopGridGravityBoundary = 0
-LeftFaceBoundaryCondition = 3 3 3
-RightFaceBoundaryCondition = 3 3 3
-BaryonSelfGravityApproximation = 1
-TopGridDimensions = 32 32 32
-
-#
-# problem parameters
-#
-CosmologySimulationOmegaBaryonNow = 0.04
-CosmologySimulationOmegaCDMNow = 0.26
-CosmologySimulationInitialTemperature = 140.0
-CosmologySimulationDensityName = GridDensity
-CosmologySimulationVelocity1Name = GridVelocities
-CosmologySimulationVelocity2Name = GridVelocities
-CosmologySimulationVelocity3Name = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 3
-CosmologySimulationGridDimension[1] = 32 32 32
-CosmologySimulationGridLeftEdge[1] = 0.25 0.25 0.25
-CosmologySimulationGridRightEdge[1] = 0.75 0.75 0.75
-CosmologySimulationGridLevel[1] = 1
-CosmologySimulationGridDimension[2] = 32 32 32
-CosmologySimulationGridLeftEdge[2] = 0.375 0.375 0.375
-CosmologySimulationGridRightEdge[2] = 0.625 0.625 0.625
-CosmologySimulationGridLevel[2] = 2
-
-#
-# cosmology parameters
-#
-ComovingCoordinates = 1
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyHubbleConstantNow = 0.70
-CosmologyComovingBoxSize = 0.3
-CosmologyMaxExpansionRate = 0.02
-CosmologyInitialRedshift = 99
-CosmologyFinalRedshift = 15
-GravitationalConstant = 1
-
-#
-# I/O and stop/start parameters
-#
-
-dtDataDump = 1.0
-RedshiftDumpName = RD
-RedshiftDumpDir = RD
-DataDumpName = DD
-DataDumpDir = DD
-
-CosmologyOutputRedshift[0] = 99
-CosmologyOutputRedshift[1] = 40
-CosmologyOutputRedshift[2] = 35
-CosmologyOutputRedshift[3] = 30
-CosmologyOutputRedshift[4] = 25
-CosmologyOutputRedshift[5] = 24
-CosmologyOutputRedshift[6] = 23
-CosmologyOutputRedshift[7] = 22
-CosmologyOutputRedshift[8] = 21
-CosmologyOutputRedshift[9] = 20
-CosmologyOutputRedshift[10] = 19
-CosmologyOutputRedshift[11] = 18
-CosmologyOutputRedshift[12] = 17
-CosmologyOutputRedshift[13] = 16
-CosmologyOutputRedshift[14] = 15
-
-#
-# hydro parameters
-#
-Gamma = 1.6667
-PPMDiffusionParameter = 0
-DualEnergyFormalism = 1
-HydroMethod = 0
-InterpolationMethod = 1
-CourantSafetyNumber = 0.4
-ParticleCourantSafetyNumber = 0.6
-UseMinimumPressureSupport = 0
-FluxCorrection = 1
-ConservativeInterpolation = 0
-
-#
-# microphysics parameters
-#
-RadiativeCooling = 1
-MultiSpecies = 2
-RadiationFieldType = 0
-
-#
-# grid refinement parameters
-#
-StaticHierarchy = 0
-MaximumRefinementLevel = 12
-MaximumGravityRefinementLevel = 12
-OutputFirstTimeAtLevel = 6
-StopFirstTimeAtLevel = 12
-RefineBy = 2
-CellFlaggingMethod = 2 4 7
-MinimumEfficiency = 0.35
-MinimumOverDensityForRefinement = 0.125 0.125
-RefineRegionLeftEdge = 0.375 0.375 0.375
-RefineRegionRightEdge = 0.625 0.625 0.625
-MinimumMassForRefinementLevelExponent = -0.3
-MinimumEnergyRatioForRefinement = 0.4
-
-#
-# some global parameters
-#
-GreensFunctionMaxNumber = 40
-#ParallelRootGridIO = 1
-#ParallelParticleIO = 1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzotest
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzotest
+++ /dev/null
@@ -1,14 +0,0 @@
-name = 'AMRNestedCosmology'
-answer_testing_script = None
-nprocs = 1
-runtime = 'medium'
-AMR = True
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 3
-author = 'Uncle Enzo'
-max_time_minutes = 10
-fullsuite = False
-pushsuite = False
-quicksuite = False
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubGrid.inits
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubGrid.inits
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyOmegaBaryonNow = 0.04
-CosmologyComovingBoxSize = 0.3 // in Mpc/h
-CosmologyHubbleConstantNow = 0.70 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 99
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed = -267478895
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 2
-GridDims = 32 32 32
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 2
-ParticleDims = 32 32 32
-
-#
-# Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndexInNewCenterTopGridSystem = 8 8 8
-EndIndexInNewCenterTopGridSystem = 23 23 23
-RootGridDims = 32 32 32
-#
-# Names
-#
-ParticlePositionName = ParticlePositions.1
-ParticleVelocityName = ParticleVelocities.1
-GridDensityName = GridDensity.1
-GridVelocityName = GridVelocities.1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubSubGrid.inits
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_SubSubGrid.inits
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyOmegaBaryonNow = 0.04
-CosmologyComovingBoxSize = 0.3 // in Mpc/h
-CosmologyHubbleConstantNow = 0.70 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 99
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed = -267478895
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 1
-GridDims = 32 32 32
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 1
-ParticleDims = 32 32 32
-
-#
-# Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndexInNewCenterTopGridSystem = 12 12 12
-EndIndexInNewCenterTopGridSystem = 19 19 19
-RootGridDims = 32 32 32
-#
-# Names
-#
-ParticlePositionName = ParticlePositions.2
-ParticleVelocityName = ParticleVelocities.2
-GridDensityName = GridDensity.2
-GridVelocityName = GridVelocities.2
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_TopGrid.inits
--- a/run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology_TopGrid.inits
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Cosmology Parameters
-#
-CosmologyOmegaMatterNow = 0.3
-CosmologyOmegaLambdaNow = 0.7
-CosmologyOmegaBaryonNow = 0.04
-CosmologyComovingBoxSize = 0.3 // in Mpc/h
-CosmologyHubbleConstantNow = 0.70 // in units of 100 km/s/Mpc
-CosmologyInitialRedshift = 99
-
-#
-# Power spectrum Parameters
-#
-PowerSpectrumType = 11 // Eisenstein & Hu
-PowerSpectrumSigma8 = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed = -267478895
-
-#
-# Grid info
-#
-Rank = 3
-InitializeGrids = 1
-GridRefinement = 4
-GridDims = 32 32 32
-
-#
-# Particle info
-#
-InitializeParticles = 1
-ParticleRefinement = 4
-ParticleDims = 32 32 32
-
-#
-# Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndex = 0 0 0
-RootGridDims = 32 32 32
-
-#
-# Names
-#
-ParticlePositionName = ParticlePositions.0
-ParticleVelocityName = ParticleVelocities.0
-GridDensityName = GridDensity.0
-GridVelocityName = GridVelocities.0
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/AMRNestedCosmology/notes.txt
--- a/run/CosmologySimulation/AMRNestedCosmology/notes.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-This is a cosmological simulation that simulates the collapse of a
-metal-free object at z ~ 20. It uses the primordial chemistry with H2
-cooling. The simulation stops when the maximum refinement level
-reaches 12. It will run on a single processor in about 5 minutes.
-
-Usage:
-./inits.exe -d -s AMRNestedCosmology_SubGrid.inits AMRNestedCosmology_TopGrid.init
-./inits.exe -d -s AMRNestedCosmology_SubSubGrid.inits AMRNestedCosmology_SubGrid.inits
-./inits.exe -d AMRNestedCosmology_SubSubGrid.inits
-./enzo.exe -d AMRNestedCosmology.enzo
-
-To run in parallel with parallel i/o:
-Uncomment the following lines in AMRNestedCosmology.enzo:
-#ParallelRootGridIO = 1
-#ParallelParticleIO = 1
-
-After running inits, and before running enzo, do:
-mpirun -np NPROCS ./ring.exe pv ParticlePositions.0 ParticleVelocities.0
-mpirun -np NPROCS ./ring.exe pv ParticlePositions.1 ParticleVelocities.1
-mpirun -np NPROCS ./ring.exe pv ParticlePositions.2 ParticleVelocities.2
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_cosmology/amr_cosmology.conf
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = yes
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_cosmology/amr_cosmology.enzo
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzo
@@ -0,0 +1,129 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0441
+CosmologySimulationOmegaCDMNow = 0.2239
+CosmologySimulationDensityName = GridDensity
+CosmologySimulationVelocity1Name = GridVelocities_x
+CosmologySimulationVelocity2Name = GridVelocities_y
+CosmologySimulationVelocity3Name = GridVelocities_z
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+CosmologySimulationUseMetallicityField = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 25
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+OutputCoolingTime = 1
+OutputTemperature = 1
+
+CosmologyOutputRedshift[0] = 0.100
+CosmologyOutputRedshift[1] = 0.089
+CosmologyOutputRedshift[2] = 0.078
+CosmologyOutputRedshift[3] = 0.067
+CosmologyOutputRedshift[4] = 0.057
+CosmologyOutputRedshift[5] = 0.047
+CosmologyOutputRedshift[6] = 0.037
+CosmologyOutputRedshift[7] = 0.027
+CosmologyOutputRedshift[8] = 0.017
+CosmologyOutputRedshift[9] = 0.007
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# microphysics parameters
+#
+RadiativeCooling = 1
+use_grackle = 1
+MultiSpecies = 0 // sets grackle.primordial_chemistry
+MetalCooling = 1 // sets grackle.metal_cooling
+grackle_data_file = CloudyData_UVB=HM2012.h5
+UVbackground = 1
+CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
+
+#
+# star formation parameters
+#
+StarParticleCreation = 1
+StarParticleFeedback = 1
+StarMakerOverDensityThreshold = 100
+StarMakerMinimumMass = 1e6
+StarMakerMinimumDynamicalTime = 1e6
+StarMakerMassEfficiency = 0.1
+StarMassEjectionFraction = 0.25
+StarMetalYield = 0.1
+StarEnergyToThermalFeedback = 1e-5
+StarFeedbackDistRadius = 1
+StarFeedbackDistCellStep = 3
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/amr_cosmology.enzotest
@@ -0,0 +1,15 @@
+name = 'amr_cosmology'
+answer_testing_script = 'test_amr_cosmology.py'
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+cosmology_simulation = True
+dimensionality = 3
+max_time_minutes = 20
+fullsuite = True
+pushsuite = True
+quicksuite = True
+hub_download = '5afb0040ec1bd30001fcd002'
\ No newline at end of file
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_cosmology/notes.txt
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/notes.txt
@@ -0,0 +1,20 @@
+This is a cosmology simulation with Cen & Ostriker star
+formation/feedback, cooling with Grackle, and initial conditions made
+with MUSIC. It consists of a 32 Mpc/h box with 32^3 root grid cells
+and dark matter particles and 5 levels of AMR.
+
+This simulation will run to z = 0 in about 10 minutes on a single
+core. To run this, you will need to copy the file,
+CloudyData_UVB=HM2012.h5, from the input directory of your Grackle
+source, to the run directory of the simulation.
+
+To generate the ICs with MUSIC:
+./MUSIC amr_cosmology.conf
+
+Initial conditions can also be downloaded from the "Enzo test data"
+collection on the yt Hub (
hub.yt), or do:
+pip install girder-client
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afb0040ec1bd30001fcd002
+
+To run the simulation:
+./enzo.exe -d amr_cosmology.enzo
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_cosmology/test_amr_cosmology.py
@@ -0,0 +1,260 @@
+import glob
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+from numpy.testing import assert_equal
+
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE", 8)
+
+def test_hmf():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
+def test_max_density_halo_quantities():
+ ds = yt.load(os.path.join(_dir_name, 'RD0009/RD0009'))
+
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # Save the quantities to be compared
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+def test_dark_matter_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+def test_individual_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_total_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_output_number():
+ ds = yt.load(os.path.join(_dir_name, 'DD0000/DD0000'))
+
+ DDnum = len(glob.glob(os.path.join(_dir_name, 'DD????/DD????')))
+ RDnum = len(glob.glob(os.path.join(_dir_name, 'RD????/RD????')))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['number_of_files'],
+ ds_comp.data['number_of_files'])
+
+def test_phase():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series(redshifts=[0])
+ ds = es[-1]
+ ad = ds.all_data()
+ profile = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cell_mass")])
+ profile1 = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cooling_time")],
+ weight_field=('gas', 'cell_mass'))
+ density = profile.x
+ temperature = profile['gas', 'temperature']
+ cooling_time = profile1['gas', 'cooling_time']
+ cell_mass = profile['gas', 'cell_mass']
+
+ filename = 'phase_data.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'density': density, 'temperature': temperature,
+ 'cooling_time': cooling_time, 'cell_mass': cell_mass}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
+ pp.set_unit('cell_mass', 'Msun')
+ pp.save(_dir_name)
+ pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time',
+ weight_field='cell_mass')
+ pp1.save(_dir_name)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['density'], ds_comp.data['density'], 8)
+ assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
+ assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
+ assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzo
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzo
@@ -0,0 +1,126 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0441
+CosmologySimulationOmegaCDMNow = 0.2239
+CosmologySimulationDensityName = GridDensity
+CosmologySimulationVelocity1Name = GridVelocities_x
+CosmologySimulationVelocity2Name = GridVelocities_y
+CosmologySimulationVelocity3Name = GridVelocities_z
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 2
+CosmologySimulationGridDimension[1] = 10 14 14
+CosmologySimulationGridLeftEdge[1] = 0.40625 0.375 0.34375
+CosmologySimulationGridRightEdge[1] = 0.5625 0.59375 0.5625
+CosmologySimulationGridLevel[1] = 1
+CosmologySimulationUseMetallicityField = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaDarkMatterNow = 0.2239
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 1.8
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 5
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+OutputCoolingTime = 1
+OutputTemperature = 1
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4 8
+MinimumOverDensityForRefinement = 1.0 1.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+MustRefineParticlesCreateParticles = 3
+MustRefineParticlesRefineToLevel = 1
+CosmologySimulationParticleTypeName = RefinementMask
+
+#
+# microphysics parameters
+#
+RadiativeCooling = 1
+use_grackle = 1
+MultiSpecies = 0 // sets grackle.primordial_chemistry
+MetalCooling = 1 // sets grackle.metal_cooling
+grackle_data_file = CloudyData_UVB=HM2012.h5
+UVbackground = 1
+CMBTemperatureFloor = 1 // sets grackle.cmb_temperature_floor
+
+#
+# star formation parameters
+#
+StarParticleCreation = 1
+StarParticleFeedback = 1
+StarMakerOverDensityThreshold = 100
+StarMakerMinimumMass = 1e6
+StarMakerMinimumDynamicalTime = 1e6
+StarMakerMassEfficiency = 0.1
+StarMassEjectionFraction = 0.25
+StarMetalYield = 0.1
+StarEnergyToThermalFeedback = 1e-5
+StarFeedbackDistRadius = 1
+StarFeedbackDistCellStep = 3
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/amr_nested_cosmology.enzotest
@@ -0,0 +1,15 @@
+name = 'amr_nested_cosmology'
+answer_testing_script = 'test_amr_cosmology.py'
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+cosmology_simulation = True
+dimensionality = 3
+max_time_minutes = 20
+fullsuite = True
+pushsuite = True
+quicksuite = True
+hub_download = '5afef79bec1bd30001fcd07e'
\ No newline at end of file
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_nested_cosmology/notes.txt
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/notes.txt
@@ -0,0 +1,20 @@
+This is a variation of the amr_cosmology simulation with 1 level of
+initial refinement and must-refine-particles. The simulation uses Cen
+& Ostriker star formation/feedback, cooling with Grackle, and initial
+conditions made with MUSIC. The nested refinement zooms in on the most
+massive halo in the box at z = 1.8. Must-refine-particles are used to
+allow AMR only for particles that end up within 3 virial radii of the
+most massive halo at z = 1.8. The simulation will run in about 1
+minute on a single core.
+
+The zoom initial conditions with must-refine-particle flagging was
+created using the method outlined in
+
https://bitbucket.org/jwise77/enzo-mrp-music
+
+Initial conditions can be downloaded from the "Enzo test data"
+collection on the yt Hub (
hub.yt), or do:
+pip install girder-client
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afef79bec1bd30001fcd07e
+
+To run the simulation:
+./enzo.exe -d amr_nested_cosmology.enzo
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/amr_nested_cosmology/test_amr_nested_cosmology.py
--- /dev/null
+++ b/run/CosmologySimulation/amr_nested_cosmology/test_amr_nested_cosmology.py
@@ -0,0 +1,260 @@
+import glob
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+from numpy.testing import assert_equal
+
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE", 8)
+
+def test_hmf():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
+def test_max_density_halo_quantities():
+ ds = yt.load(os.path.join(_dir_name, 'DD0013/DD0013'))
+
+ # Find the point of maximum density, center a sphere of radius
+ # 1 Mpc around it, and sum the masses inside
+ val,pos = ds.find_max('Density')
+ sp = ds.sphere(pos,(1000.,'kpc'))
+ ct = sp['creation_time']
+ dm = (ct < 0)
+ dm_mass = np.sum(sp['particle_mass'][dm]).in_units('Msun')
+ gas_mass = np.sum(sp['cell_mass'].in_units('Msun'))
+
+ # Also look at the radial profiles of density and temperature
+ # within these spheres. The bin size is chosen to make the profiles
+ # smooth and for each bin to be larger than the cell size.
+ ptest0 = yt.create_profile(sp,"radius","density",n_bins=[20])
+ ptest1 = yt.create_profile(sp,"radius","temperature",n_bins=[20])
+
+ # Save the quantities to be compared
+ data = {"dm_mass": dm_mass,
+ "gas_mass": gas_mass,
+ "max_position": pos,
+ "density_profile": ptest0['density'],
+ "temperature_profile": ptest1['temperature']}
+
+ # save your results file
+ filename = "max_density_halo_quantities.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(data["dm_mass"], ds_comp.data["dm_mass"], tolerance)
+ assert_rel_equal(data["gas_mass"], ds_comp.data["gas_mass"], tolerance)
+ assert_rel_equal(data["max_position"], ds_comp.data["max_position"], tolerance)
+ assert_rel_equal(data["density_profile"], ds_comp.data["density_profile"], tolerance)
+ assert_rel_equal(data["temperature_profile"], ds_comp.data["temperature_profile"], tolerance)
+
+def test_dark_matter_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+def test_individual_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : np.array([Mstar, Mgas])}
+
+ # save
+ filename = "gas_stars_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_total_baryon_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+
+ if (sim.parameters['CosmologySimulationOmegaBaryonNow'] == 0.0):
+ return
+
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ Mstar = np.sum(data['particle_mass'][ data['particle_type'] == 2 ].to('Msun'))
+ Mgas = np.sum(data['cell_mass'].to('Msun'))
+
+ output_data = {'masses' : Mstar + Mgas}
+
+ # save
+ filename = "baryon_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['masses'], ds_comp.data['masses'], tolerance)
+
+def test_output_number():
+ ds = yt.load(os.path.join(_dir_name, 'DD0000/DD0000'))
+
+ DDnum = len(glob.glob(os.path.join(_dir_name, 'DD????/DD????')))
+ RDnum = len(glob.glob(os.path.join(_dir_name, 'RD????/RD????')))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['number_of_files'],
+ ds_comp.data['number_of_files'])
+
+def test_phase():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series(redshifts=[0])
+ ds = es[-1]
+ ad = ds.all_data()
+ profile = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cell_mass")])
+ profile1 = ad.profile([("gas", "density")],
+ [("gas", "temperature"),
+ ("gas", "cooling_time")],
+ weight_field=('gas', 'cell_mass'))
+ density = profile.x
+ temperature = profile['gas', 'temperature']
+ cooling_time = profile1['gas', 'cooling_time']
+ cell_mass = profile['gas', 'cell_mass']
+
+ filename = 'phase_data.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'density': density, 'temperature': temperature,
+ 'cooling_time': cooling_time, 'cell_mass': cell_mass}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ pp = yt.PhasePlot(ad, 'density', 'temperature', 'cell_mass')
+ pp.set_unit('cell_mass', 'Msun')
+ pp.save(_dir_name)
+ pp1 = yt.PhasePlot(ad, 'density', 'temperature', 'cooling_time',
+ weight_field='cell_mass')
+ pp1.save(_dir_name)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['density'], ds_comp.data['density'], 8)
+ assert_rel_equal(data['temperature'], ds_comp.data['temperature'], 8)
+ assert_rel_equal(data['cooling_time'], ds_comp.data['cooling_time'], 8)
+ assert_rel_equal(data['cell_mass'], ds_comp.data['cell_mass'], 8)
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/dm_only/dm_only.conf
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/dm_only.conf
@@ -0,0 +1,43 @@
+[setup]
+boxlength = 32.
+zstart = 50
+levelmin = 5
+levelmin_TF = 5
+levelmax = 5
+padding = 4
+overlap = 8
+# For zoom-in ICs, set these two parameters
+#ref_dims = 512,512,512
+#ref_center = 0.5,0.5,0.5
+align_top = no
+baryons = no
+use_2LPT = yes
+use_LLA = yes
+periodic_TF = yes
+center_vel = no
+
+[cosmology]
+Omega_m = 0.268
+Omega_L = 0.732
+Omega_b = 0.0441
+H0 = 70.4
+sigma_8 = 0.828
+nspec = 0.9632
+transfer = eisenstein
+
+[random]
+cubesize = 256
+seed[5] = 8675309
+
+[output]
+format = enzo
+filename = IC
+
+[poisson]
+fft_fine = no
+accuracy = 1e-5
+pre_smooth = 3
+post_smooth = 3
+smoother = gs
+laplace_order = 6
+grad_order = 6
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/dm_only/dm_only.enzo
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/dm_only.enzo
@@ -0,0 +1,85 @@
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType = 30 // cosmology simulation
+TopGridRank = 3
+TopGridDimensions = 32 32 32
+SelfGravity = 1 // gravity on
+TopGridGravityBoundary = 0 // Periodic BC for gravity
+LeftFaceBoundaryCondition = 3 3 3 // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow = 0.0
+CosmologySimulationOmegaCDMNow = 0.268
+CosmologySimulationParticleVelocity1Name = ParticleVelocities_x
+CosmologySimulationParticleVelocity2Name = ParticleVelocities_y
+CosmologySimulationParticleVelocity3Name = ParticleVelocities_z
+CosmologySimulationParticleDisplacement1Name = ParticleDisplacements_x
+CosmologySimulationParticleDisplacement2Name = ParticleDisplacements_y
+CosmologySimulationParticleDisplacement3Name = ParticleDisplacements_z
+CosmologySimulationCalculatePositions = 1
+CosmologySimulationNumberOfInitialGrids = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates = 1
+CosmologyOmegaMatterNow = 0.268
+CosmologyOmegaLambdaNow = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize = 32.0
+CosmologyMaxExpansionRate = 0.02
+CosmologyInitialRedshift = 50
+CosmologyFinalRedshift = 0
+GravitationalConstant = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump = 25
+RedshiftDumpName = RD
+RedshiftDumpDir = RD
+DataDumpName = DD
+DataDumpDir = DD
+
+#
+# hydro parameters
+#
+HydroMethod = 0 // PPM
+Gamma = 1.6667
+PPMDiffusionParameter = 0 // diffusion off
+DualEnergyFormalism = 1 // use total & internal energy
+InterpolationMethod = 1 // SecondOrderA
+FluxCorrection = 1
+ConservativeInterpolation = 1
+CourantSafetyNumber = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy = 0
+MaximumRefinementLevel = 5
+MaximumGravityRefinementLevel = 5
+MaximumParticleRefinementLevel = 5
+RefineBy = 2
+CellFlaggingMethod = 2 4
+MinimumOverDensityForRefinement = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency = 0.35
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO = 1
+ParallelParticleIO = 1
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/dm_only/dm_only.enzotest
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/dm_only.enzotest
@@ -0,0 +1,15 @@
+name = 'dm_only'
+answer_testing_script = 'test_dm_only.py'
+nprocs = 1
+runtime = 'short'
+hydro = False
+gravity = True
+AMR = True
+cosmology = True
+cosmology_simulation = True
+dimensionality = 3
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = True
+hub_download = '5afb0145ec1bd30001fcd024'
\ No newline at end of file
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/dm_only/notes.txt
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/notes.txt
@@ -0,0 +1,15 @@
+This is a dark-matter-only version of the amr_cosmology simulation. It
+consists of a 32 Mpc/h box with 32^3 dark matter particles and 5
+levels of AMR. This simulation will run to z = 0 in less than a minute
+on a single core.
+
+To generate the ICs with MUSIC:
+./MUSIC dm_only.conf
+
+Initial conditions can also be downloaded from the "Enzo test data"
+collection on the yt Hub (
hub.yt), or do:
+pip install girder-client
+girder-cli --api-url
https://girder.hub.yt/api/v1 download 5afb0145ec1bd30001fcd024
+
+To run the simulation:
+./enzo.exe -d dm_only.enzo
diff -r e58dbfd476cb -r d4cee1981c1f run/CosmologySimulation/dm_only/test_dm_only.py
--- /dev/null
+++ b/run/CosmologySimulation/dm_only/test_dm_only.py
@@ -0,0 +1,112 @@
+import glob
+import yt
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from yt.analysis_modules.halo_mass_function.api import *
+from yt.analysis_modules.halo_analysis.api import HaloCatalog
+from yt.testing import assert_rel_equal
+from numpy.testing import assert_equal
+
+from yt.utilities.answer_testing.framework import \
+ sim_dir_load
+
+_pf_name = os.path.basename(os.path.dirname(__file__)) + ".enzo"
+_dir_name = os.path.dirname(__file__)
+
+sim_dir = os.path.basename(_dir_name)
+test_data_dir = os.path.join(
+ os.environ.get("COSMO_TEST_DATA_DIR", "."), sim_dir)
+if not os.path.exists(test_data_dir):
+ os.makedirs(test_data_dir)
+generate_answers = int(os.environ.get("COSMO_TEST_GENERATE", 1))
+tolerance = os.environ.get("COSMO_TEST_MASS_TOLERANCE", 8)
+
+def test_hmf():
+ es = sim_dir_load(_pf_name, path=_dir_name)
+ es.get_time_series()
+ ds = es[-1]
+ hc = HaloCatalog(
+ data_ds=ds, finder_method='fof',
+ output_dir=os.path.join(_dir_name, "halo_catalogs/catalog"))
+ hc.create()
+ masses = hc.data_source['particle_mass'].in_units('Msun')
+ h = ds.hubble_constant
+ mtot = np.log10(masses*1.2) - np.log10(h)
+ masses_sim = np.sort(mtot)
+ sim_volume = ds.domain_width.in_units('Mpccm').prod()
+ n_cumulative_sim = np.arange(len(mtot),0,-1)
+ masses_sim,unique_indices = np.unique(masses_sim,return_index=True)
+
+ n_cumulative_sim = n_cumulative_sim[unique_indices]/sim_volume
+ filename = 'hmf.h5'
+ save_filename = os.path.join(_dir_name, filename)
+ data = {'masses': masses_sim, 'n_sim': n_cumulative_sim}
+ yt.save_as_dataset(ds, save_filename, data)
+
+ # make a plot
+ fig = plt.figure(figsize=(8,8))
+ plt.semilogy(masses_sim,n_cumulative_sim,'-')
+ plt.ylabel('Cumulative Halo Number Density $\mathrm{Mpc}^{-3}$',fontsize=16)
+ plt.xlabel('log Mass/$\mathrm{M}_{\odot}$',fontsize=16)
+ plt.tick_params(labelsize=16)
+ plt.savefig(os.path.join(_dir_name, 'hmf.png'),format='png')
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ # do the comparison
+ ds_comp = yt.load(compare_filename)
+
+ # assert quality to 8 decimals
+ assert_rel_equal(data['masses'], ds_comp.data['masses'], 8)
+ assert_rel_equal(data['n_sim'], ds_comp.data['n_sim'], 8)
+
+def test_dark_matter_mass():
+ # gather most recent data set
+ sim = sim_dir_load(_pf_name, path=_dir_name,
+ find_outputs=True)
+ sim.get_time_series()
+ ds = sim[-1]
+ data = ds.all_data()
+
+ # sum masses
+ MDM = np.sum(data['particle_mass'][ data['particle_type'] == 1 ].to('Msun'))
+
+ output_data = {'mass' : MDM}
+
+ # save
+ filename = "DM_mass_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_rel_equal(output_data['mass'], ds_comp.data['mass'], tolerance)
+
+def test_output_number():
+ ds = yt.load(os.path.join(_dir_name, 'DD0000/DD0000'))
+
+ DDnum = len(glob.glob(os.path.join(_dir_name, 'DD????/DD????')))
+ RDnum = len(glob.glob(os.path.join(_dir_name, 'RD????/RD????')))
+
+ output_data = {'number_of_files' : np.array([DDnum,RDnum])}
+
+ filename = "outputnum_results.h5"
+ save_filename = os.path.join(_dir_name, filename)
+ yt.save_as_dataset(ds, save_filename, output_data)
+
+ compare_filename = os.path.join(test_data_dir, filename)
+ if generate_answers:
+ os.rename(save_filename, compare_filename)
+ return
+
+ ds_comp = yt.load(compare_filename)
+ assert_equal(output_data['number_of_files'],
+ ds_comp.data['number_of_files'])
This diff is so big that we needed to truncate the remainder.
Repository URL:
https://bitbucket.org/enzo/enzo-dev/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.