[yt-svn] commit/yt-3.0: MatthewTurk: Setting a default geometry of Cartesian for all static outputs.
Bitbucket
commits-noreply at bitbucket.org
Tue Aug 21 10:21:41 PDT 2012
1 new commit in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/changeset/9c57c940f2fc/
changeset: 9c57c940f2fc
branch: yt-3.0
user: MatthewTurk
date: 2012-08-21 19:21:27
summary: Setting a default geometry of Cartesian for all static outputs.
affected #: 3 files
diff -r d6d392ef14aa14222fd1a47e654213d38a031378 -r 9c57c940f2fc9106d26ccbf751e7f49589564d75 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -52,6 +52,7 @@
default_fluid_type = "gas"
fluid_types = ("gas",)
particle_types = ("all",)
+ geometry = "cartesian"
class __metaclass__(type):
def __init__(cls, name, b, d):
diff -r d6d392ef14aa14222fd1a47e654213d38a031378 -r 9c57c940f2fc9106d26ccbf751e7f49589564d75 yt/frontends/flash/fields.py
--- a/yt/frontends/flash/fields.py
+++ b/yt/frontends/flash/fields.py
@@ -37,6 +37,7 @@
from yt.utilities.physical_constants import \
kboltz
import numpy as na
+from yt.utilities.exceptions import *
KnownFLASHFields = FieldInfoContainer()
add_flash_field = KnownFLASHFields.add_field
@@ -260,9 +261,11 @@
units=r"\rm{ergs}/\rm{g}")
def _unknown_coord(field, data):
- raise RuntimeError
+ raise YTCoordinateNotImplemented
add_cyl_field("dx", function=_unknown_coord)
add_cyl_field("dy", function=_unknown_coord)
+add_cyl_field("x", function=_unknown_coord)
+add_cyl_field("y", function=_unknown_coord)
def _dr(field, data):
return na.ones(data.ActiveDimensions, dtype='float64') * data.dds[0]
diff -r d6d392ef14aa14222fd1a47e654213d38a031378 -r 9c57c940f2fc9106d26ccbf751e7f49589564d75 yt/utilities/exceptions.py
--- a/yt/utilities/exceptions.py
+++ b/yt/utilities/exceptions.py
@@ -132,3 +132,7 @@
def __str__(self):
return "We don't currently support %s geometry" % self.geom
+
+class YTCoordinateNotImplemented(YTException):
+ def __str__(self):
+ return "This coordinate is not implemented for this geometry type."
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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