[Yt-svn] yt-commit r800 - branches/yt-1.0/yt/lagos trunk/yt/lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Sep 25 05:51:43 PDT 2008


Author: mturk
Date: Thu Sep 25 05:51:42 2008
New Revision: 800
URL: http://yt.spacepope.org/changeset/800

Log:
Added syntax error if you ask for too small a sphere



Modified:
   branches/yt-1.0/yt/lagos/BaseDataTypes.py
   trunk/yt/lagos/BaseDataTypes.py

Modified: branches/yt-1.0/yt/lagos/BaseDataTypes.py
==============================================================================
--- branches/yt-1.0/yt/lagos/BaseDataTypes.py	(original)
+++ branches/yt-1.0/yt/lagos/BaseDataTypes.py	Thu Sep 25 05:51:42 2008
@@ -1403,6 +1403,8 @@
         *center* and a *radius*.
         """
         Enzo3DData.__init__(self, center, fields, pf, **kwargs)
+        if radius < self.hierarchy.get_smallest_dx():
+            raise SyntaxError("Your radius is smaller than your finest cell!")
         self.set_field_parameter('radius',radius)
         self.radius = radius
         self._refresh_data()

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Thu Sep 25 05:51:42 2008
@@ -1505,6 +1505,8 @@
         *center* and a *radius*.
         """
         Enzo3DData.__init__(self, center, fields, pf, **kwargs)
+        if radius < self.hierarchy.get_smallest_dx():
+            raise SyntaxError("Your radius is smaller than your finest cell!")
         self.set_field_parameter('radius',radius)
         self.radius = radius
         self._refresh_data()



More information about the yt-svn mailing list