[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Thu Nov 15 19:39:27 PST 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/01f461871682/
changeset: 01f461871682
branch: yt
user: ngoldbaum
date: 2012-11-16 04:38:49
summary: Fixing a typo in the text of an error in the FLASH frontend.
affected #: 1 file
diff -r c57187ca13b69862a02b80af7b5b3eb83698a4c6 -r 01f46187168280aef5dd9afa5ae227ca3f08fe8c yt/frontends/flash/fields.py
--- a/yt/frontends/flash/fields.py
+++ b/yt/frontends/flash/fields.py
@@ -271,7 +271,7 @@
if pf['unitsystem'].lower() == "none":
factor = np.sqrt(4*np.pi)
else:
- raise RuntimeError("Runtime parameter unitsystem with"
+ raise RuntimeError("Runtime parameter unitsystem with "
"value %s is unrecognized" % pf['unitsystem'])
return factor
https://bitbucket.org/yt_analysis/yt/changeset/d77c88afbd38/
changeset: d77c88afbd38
branch: yt
user: ngoldbaum
date: 2012-11-16 04:39:10
summary: Merging,
affected #: 4 files
diff -r 01f46187168280aef5dd9afa5ae227ca3f08fe8c -r d77c88afbd38f49246ced0c09d2abfc7973e5ce5 yt/frontends/athena/data_structures.py
--- a/yt/frontends/athena/data_structures.py
+++ b/yt/frontends/athena/data_structures.py
@@ -331,6 +331,8 @@
dimensionality = 2
if grid['dimensions'][1] == 1 :
dimensionality = 1
+ if dimensionality <= 2 : self.domain_dimensions[2] = 1.
+ if dimensionality == 1 : self.domain_dimensions[1] = 1.
self.dimensionality = dimensionality
self.current_time = grid["time"]
self.unique_identifier = self._handle.__hash__()
diff -r 01f46187168280aef5dd9afa5ae227ca3f08fe8c -r d77c88afbd38f49246ced0c09d2abfc7973e5ce5 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -418,7 +418,11 @@
nblockx = self.parameters["iprocs"]
nblocky = self.parameters["jprocs"]
nblockz = self.parameters["kprocs"]
-
+
+ # In case the user wasn't careful
+ if dimensionality <= 2 : nblockz = 1
+ if dimensionality == 1 : nblocky = 1
+
self.dimensionality = dimensionality
self.domain_dimensions = \
np.array([nblockx*nxb,nblocky*nyb,nblockz*nzb])
diff -r 01f46187168280aef5dd9afa5ae227ca3f08fe8c -r d77c88afbd38f49246ced0c09d2abfc7973e5ce5 yt/frontends/flash/fields.py
--- a/yt/frontends/flash/fields.py
+++ b/yt/frontends/flash/fields.py
@@ -266,9 +266,9 @@
def GetMagRescalingFactor(pf):
if pf['unitsystem'].lower() == "cgs":
factor = 1
- if pf['unitsystem'].lower() == "si":
+ elif pf['unitsystem'].lower() == "si":
factor = np.sqrt(4*np.pi/1e7)
- if pf['unitsystem'].lower() == "none":
+ elif pf['unitsystem'].lower() == "none":
factor = np.sqrt(4*np.pi)
else:
raise RuntimeError("Runtime parameter unitsystem with "
diff -r 01f46187168280aef5dd9afa5ae227ca3f08fe8c -r d77c88afbd38f49246ced0c09d2abfc7973e5ce5 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -53,12 +53,12 @@
def options(self, parser, env=os.environ):
super(AnswerTesting, self).options(parser, env=env)
- parser.add_option("--answer-compare", dest="compare_name",
+ parser.add_option("--answer-compare-name", dest="compare_name", metavar='str',
default=_latest, help="The name against which we will compare")
parser.add_option("--answer-big-data", dest="big_data",
default=False, help="Should we run against big data, too?",
action="store_true")
- parser.add_option("--answer-name", dest="this_name",
+ parser.add_option("--answer-store-name", dest="this_name", metavar='str',
default=None,
help="The name we'll call this set of tests")
parser.add_option("--answer-store", dest="store_results",
@@ -93,7 +93,9 @@
options.compare_name = None
elif options.compare_name == "latest":
options.compare_name = _latest
-
+ if options.store_results:
+ options.compare_name = None
+
# Local/Cloud storage
if options.store_local_results:
storage_class = AnswerTestLocalStorage
@@ -216,9 +218,9 @@
def data_dir_load(pf_fn):
path = ytcfg.get("yt", "test_data_dir")
+ if isinstance(pf_fn, StaticOutput): return pf_fn
if not os.path.isdir(path):
return False
- if isinstance(pf_fn, StaticOutput): return pf_fn
with temp_cwd(path):
pf = load(pf_fn)
pf.h
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