[yt-svn] commit/yt: chummels: Adding in support for a run-time tolerance (for comparison precision) to be set in the enzo testing suite.

Bitbucket commits-noreply at bitbucket.org
Wed Nov 28 18:12:27 PST 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/608d640f3c68/
changeset:   608d640f3c68
branch:      yt
user:        chummels
date:        2012-11-29 02:02:26
summary:     Adding in support for a run-time tolerance (for comparison precision) to be set in the enzo testing suite.
affected #:  2 files

diff -r 33bfca118708b7f4a2aab2a1fcea7155ed131403 -r 608d640f3c683fc9b456399b86b7fc24aa492c3f yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -59,6 +59,8 @@
     hub_url = 'https://hub.yt-project.org/upload',
     hub_api_key = '',
     ipython_notebook = 'False',
+    answer_testing_tolerance = '3',
+    answer_testing_bitwise = 'False'
     )
 # Here is the upgrade.  We're actually going to parse the file in its entirety
 # here.  Then, if it has any of the Forbidden Sections, it will be rewritten


diff -r 33bfca118708b7f4a2aab2a1fcea7155ed131403 -r 608d640f3c683fc9b456399b86b7fc24aa492c3f yt/frontends/enzo/answer_testing_support.py
--- a/yt/frontends/enzo/answer_testing_support.py
+++ b/yt/frontends/enzo/answer_testing_support.py
@@ -60,17 +60,20 @@
 def standard_small_simulation(pf_fn, fields):
     if not can_run_pf(pf_fn): return
     dso = [None]
+    tolerance = ytcfg.getint("yt", "answer_testing_tolerance")
+    bitwise = ytcfg.getboolean("yt", "answer_testing_bitwise")
     for field in fields:
-        # yield GridValuesTest(pf_fn, field)
+        if bitwise:
+            yield GridValuesTest(pf_fn, field)
         if 'particle' in field: continue
         for ds in dso:
             for axis in [0, 1, 2]:
                 for weight_field in [None, "Density"]:
                     yield ProjectionValuesTest(
                         pf_fn, axis, field, weight_field,
-                        ds, decimals=3)
+                        ds, decimals=tolerance)
             yield FieldValuesTest(
-                    pf_fn, field, ds, decimals=3)
+                    pf_fn, field, ds, decimals=tolerance)
                     
 class ShockTubeTest(object):
     def __init__(self, data_file, solution_file, fields,

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list