[Yt-svn] commit/yt: 3 new changesets
Bitbucket
commits-noreply at bitbucket.org
Sun Aug 21 07:23:11 PDT 2011
3 new changesets in yt:
http://bitbucket.org/yt_analysis/yt/changeset/6b55fe5c9c20/
changeset: 6b55fe5c9c20
branch: yt
user: MatthewTurk
date: 2011-08-21 13:39:23
summary: Changing initialtime to current_time for sunrise exporter
affected #: 1 file (2 bytes)
--- a/yt/analysis_modules/sunrise_export/sunrise_exporter.py Sun Aug 21 07:26:11 2011 -0400
+++ b/yt/analysis_modules/sunrise_export/sunrise_exporter.py Sun Aug 21 07:39:23 2011 -0400
@@ -109,7 +109,7 @@
for ax in 'xyz']).transpose()
# Velocity is cm/s, we want it to be kpc/yr
vel *= (pf["kpc"]/pf["cm"]) / (365*24*3400.)
- age = pf["years"] * (pf["InitialTime"] - reg["creation_time"][pi])
+ age = pf["years"] * (pf.current_time - reg["creation_time"][pi])
creation_time = reg["creation_time"][pi] * pf["years"]
initial_mass = reg["InitialMassCenOstriker"][pi]
http://bitbucket.org/yt_analysis/yt/changeset/c928b34d260b/
changeset: c928b34d260b
branch: yt
user: MatthewTurk
date: 2011-08-21 13:46:20
summary: Fixing a problem with importing _ramses_reader. Not sure why this suddenly
showed up.
affected #: 1 file (38 bytes)
--- a/yt/frontends/ramses/data_structures.py Sun Aug 21 07:39:23 2011 -0400
+++ b/yt/frontends/ramses/data_structures.py Sun Aug 21 07:46:20 2011 -0400
@@ -34,6 +34,7 @@
AMRHierarchy
from yt.data_objects.static_output import \
StaticOutput
+
try:
import _ramses_reader
except ImportError:
@@ -272,8 +273,8 @@
def __init__(self, filename, data_style='ramses',
storage_filename = None):
- if _ramses_reader is None:
- import _ramses_reader
+ # Here we want to initiate a traceback, if the reader is not built.
+ import _ramses_reader
StaticOutput.__init__(self, filename, data_style)
self.storage_filename = storage_filename
http://bitbucket.org/yt_analysis/yt/changeset/677ae185471f/
changeset: 677ae185471f
branch: yt
user: MatthewTurk
date: 2011-08-21 16:22:51
summary: Fixed a number of small, but very important, bugs with the RAMSES reader. This
includes the lingering segfault hooray!
affected #: 1 file (3 bytes)
--- a/yt/frontends/ramses/_ramses_reader.pyx Sun Aug 21 07:46:20 2011 -0400
+++ b/yt/frontends/ramses/_ramses_reader.pyx Sun Aug 21 10:22:51 2011 -0400
@@ -422,7 +422,7 @@
cdef string *field_name
self.field_names = []
self.field_ind = {}
- self.loaded = <int **> malloc(sizeof(int) * local_hydro_data.m_nvars)
+ self.loaded = <int **> malloc(sizeof(int*) * self.ndomains)
for idomain in range(self.ndomains):
self.loaded[idomain] = <int *> malloc(
sizeof(int) * local_hydro_data.m_nvars)
@@ -436,7 +436,6 @@
# This all needs to be cleaned up in the deallocator
def __dealloc__(self):
- import traceback; traceback.print_stack()
cdef int idomain, ifield
# To ensure that 'delete' is used, not 'free',
# we allocate temporary variables.
@@ -492,9 +491,9 @@
def ensure_loaded(self, char *varname, int domain_index):
# this domain_index must be zero-indexed
cdef int varindex = self.field_ind[varname]
- cdef string *field_name = new string(varname)
if self.loaded[domain_index][varindex] == 1:
return
+ cdef string *field_name = new string(varname)
print "READING FROM DISK", varname, domain_index, varindex
self.hydro_datas[domain_index][varindex].read(deref(field_name))
self.loaded[domain_index][varindex] = 1
@@ -674,6 +673,7 @@
end_index[i] = start_index[i] + grid_dims[i]
for gi in range(component_grid_info.shape[0]):
domain = component_grid_info[gi,0]
+ if domain == 0: continue
self.ensure_loaded(field, domain - 1)
local_tree = self.trees[domain - 1]
local_hydro_data = self.hydro_datas[domain - 1][varindex]
@@ -802,6 +802,7 @@
grid_file_locations[gi,5] = left_edges[gi, 2]
for i in range(6):
gfl[used, i] = grid_file_locations[gi,i]
+ used += 1
self.dd = np.ones(3, dtype='int64')
for i in range(3):
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