Commits

Britton Smith committed 632ca58

Fixing a number of things:
1. Changing all tests from assert_rel_equal to assert_allclose to
avoid failures due to divide by zero errors.
2. Gave the MHD ZeldovichPancake test a unique name because it was
over-writing the regular ZeldovichPancake in the test storage.
3. Upped the tolerance of the GravityTest to 10% to avoid faliures
from using unseeded random numbers for the particles.

Comments (0)

Files changed (16)

run/Cosmology/MHD/MHDZeldovichPancake/MHDZeldovichPancake.enzo

+#
+# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (one grid version)
+#
+#
+#  define problem
+#
+ProblemType                = 20      // Zeldovich pancake
+TopGridRank                = 1
+TopGridDimensions          = 500 64 2
+SelfGravity                = 1       // gravity on
+TopGridGravityBoundary     = 0       // Periodic BC for gravity
+LeftFaceBoundaryCondition  = 3       // same for fluid
+RightFaceBoundaryCondition = 3
+#
+#  problem parameters
+#
+ZeldovichPancakeCentralOffset    = 0
+ZeldovichPancakeCollapseRedshift = 4
+#ZeldovichPancakeCollapseRedshift = -0.9
+
+#ZeldovichPancakeInitialTemperature = 2800
+ZeldovichPancakeInitialTemperature = 1000
+ZeldovichPancakeInitialUniformBField = 0 1e-4 0 0 # in proper Gauss 
+#
+#  define cosmology parameters
+#
+ComovingCoordinates        = 1       // Expansion ON
+CosmologyHubbleConstantNow = 0.5
+CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
+CosmologyOmegaMatterNow    = 1
+CosmologyOmegaLambdaNow    = 0
+CosmologyMaxExpansionRate  = 0.003    //
+CosmologyInitialRedshift   = 20      // start at z=20
+CosmologyFinalRedshift     = 0
+GravitationalConstant      = 1       // this must be true for cosmology
+#
+#  set I/O and stop/start parameters
+#
+#CycleSkipDataDump      = 50  
+dtDataDump             = 4.0    // 
+#
+#  set hydro parameters
+#
+HydroMethod            = 4
+Gamma                  = 1.6667
+CourantSafetyNumber    = 0.2
+PPMDiffusionParameter  = 0       // diffusion off
+DualEnergyFormalism    = 1      // use total & internal energy
+ConservativeReconstruction = 0
+ReconstructionMethod   = 0
+RiemannSolver          = 3
+Theta_Limiter          = 1.1
+Mu = 0.6
+#
+#  set grid refinement parameters
+#
+StaticHierarchy           = 0
+MaximumRefinementLevel    = 1
+RefineBy                  = 2
+CellFlaggingMethod        = 2
+MinimumOverDensityForRefinement = 2.
+FluxCorrection            = 0
+InterpolationMethod       = 1
+ConservativeInterpolation = 0
+#
+#  set some global parameters
+#
+Debug1 = 1

run/Cosmology/MHD/MHDZeldovichPancake/MHDZeldovichPancake.enzotest

+name = 'MHDZeldovichPancake'
+answer_testing_script = None
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 1
+author = 'John Wise'
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = True

run/Cosmology/MHD/ZeldovichPancake/ZeldovichPancake.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (one grid version)
-#
-#
-#  define problem
-#
-ProblemType                = 20      // Zeldovich pancake
-TopGridRank                = 1
-TopGridDimensions          = 500 64 2
-SelfGravity                = 1       // gravity on
-TopGridGravityBoundary     = 0       // Periodic BC for gravity
-LeftFaceBoundaryCondition  = 3       // same for fluid
-RightFaceBoundaryCondition = 3
-#
-#  problem parameters
-#
-ZeldovichPancakeCentralOffset    = 0
-ZeldovichPancakeCollapseRedshift = 4
-#ZeldovichPancakeCollapseRedshift = -0.9
-
-#ZeldovichPancakeInitialTemperature = 2800
-ZeldovichPancakeInitialTemperature = 1000
-ZeldovichPancakeInitialUniformBField = 0 1e-4 0 0 # in proper Gauss 
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyHubbleConstantNow = 0.5
-CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
-CosmologyOmegaMatterNow    = 1
-CosmologyOmegaLambdaNow    = 0
-CosmologyMaxExpansionRate  = 0.003    //
-CosmologyInitialRedshift   = 20      // start at z=20
-CosmologyFinalRedshift     = 0
-GravitationalConstant      = 1       // this must be true for cosmology
-#
-#  set I/O and stop/start parameters
-#
-#CycleSkipDataDump      = 50  
-dtDataDump             = 4.0    // 
-#
-#  set hydro parameters
-#
-HydroMethod            = 4
-Gamma                  = 1.6667
-CourantSafetyNumber    = 0.2
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1      // use total & internal energy
-ConservativeReconstruction = 0
-ReconstructionMethod   = 0
-RiemannSolver          = 3
-Theta_Limiter          = 1.1
-Mu = 0.6
-#
-#  set grid refinement parameters
-#
-StaticHierarchy           = 0
-MaximumRefinementLevel    = 1
-RefineBy                  = 2
-CellFlaggingMethod        = 2
-MinimumOverDensityForRefinement = 2.
-FluxCorrection            = 0
-InterpolationMethod       = 1
-ConservativeInterpolation = 0
-#
-#  set some global parameters
-#
-Debug1 = 1

run/Cosmology/MHD/ZeldovichPancake/ZeldovichPancake.enzotest

-name = 'ZeldovichPancake'
-answer_testing_script = None
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 1
-author = 'John Wise'
-max_time_minutes = 1
-fullsuite = True
-pushsuite = True
-quicksuite = True

run/GravitySolver/GravityTest/test_gravity.py

         return rmsError
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 2)
+        assert_allclose(new_result, old_result, rtol=1e-1, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_gravity_test():

run/Hydro/Hydro-2D/NohProblem2D/test_noh2d.py

         return frb["Density"]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 class TestRadialDensity(AnswerTestingTest):
     _type_name = "noh2d_radial"
         return na.array(diag_den)
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
     def plot(self):
         dd = self.pf.h.all_data()

run/Hydro/Hydro-2D/NohProblem2DAMR/test_noh2damr.py

         return frb["Density"]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 class TestRadialDensity(AnswerTestingTest):
     _type_name = "noh2damr_radial"
         return na.array(diag_den)
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
     def plot(self):
         dd = self.pf.h.all_data()

run/Hydro/Hydro-3D/NohProblem3D/test_noh3d.py

         return frb["Density"]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
     
 class TestRadialDensity(AnswerTestingTest):
     _type_name = "noh3d_radial"
         return na.array(diag_den)
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
     def plot(self):
         dd = self.pf.h.all_data()

run/Hydro/Hydro-3D/NohProblem3DAMR/test_noh3damr.py

         return frb["Density"]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 class TestRadialDensity(AnswerTestingTest):
     _type_name = "noh3damr_radial"
         return na.array(diag_den)
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
     def plot(self):
         dd = self.pf.h.all_data()

run/Hydro/Hydro-3D/RotatingCylinder/test_rotating_cylinder.py

         return max(AngMomPercentageChange)
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_rotating_cylinder():

run/MHD/2D/MHD2DRotorTest/test_rotor.py

         return frb[self.field]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_rotor():

run/MHD/2D/SedovBlast-MHD-2D-Fryxell/test_fryxell.py

         return frb[self.field]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_fryxell():

run/MHD/2D/SedovBlast-MHD-2D-Gardiner/test_gardiner.py

         return frb[self.field]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_gardiner():

run/RadiationTransport/PhotonShadowing/test_photonshadowing.py

         return frb[self.field]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_photon_shadowing():

run/RadiationTransport/PhotonTest/test_photontest.py

         return frb[self.field]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_photon_test():

run/RadiationTransport/PhotonTestAMR/test_amrphotontest.py

         return frb[self.field]
 
     def compare(self, new_result, old_result):
-        assert_rel_equal(new_result, old_result, 3)
+        assert_allclose(new_result, old_result, rtol=1e-3, atol=0)
 
 @requires_outputlog(_dir_name, _pf_name)
 def test_amr_photon_test():