[Yt-svn] yt: 4 new changesets

hg at spacepope.org hg at spacepope.org
Tue Aug 10 16:10:16 PDT 2010


hg Repository: yt
details:   yt/rev/79857a9e906b
changeset: 1939:79857a9e906b
user:      mturk
date:
Tue Aug 10 16:02:10 2010 -0700
description:
[svn r1806] Backporting from hg.

This includes support for three new Astrophysical Simulation codes: RAMSES,
FLASH and nascent support for Gadget.  This includes contributions from Chris
Moody, John ZuHone and Oliver Hahn.

John Wise has also added a streamline integrator.

It also includes some bug fixes for volume rendering, grid homogenization and
eps writing, as well as grid reflection for volume rendering.

Documentation for these new codes is forthcoming, as not all features for all
codes are yet supported.

hg Repository: yt
details:   yt/rev/aa8ca8db8943
changeset: 1940:aa8ca8db8943
user:      mturk
date:
Tue Aug 10 16:03:03 2010 -0700
description:
[svn r1807] Re-cythonizing amr_utils and adding ramses_reader.cpp.

hg Repository: yt
details:   yt/rev/6a14fc3b6f4f
changeset: 1941:6a14fc3b6f4f
user:      mturk
date:
Tue Aug 10 16:08:10 2010 -0700
description:
[svn r1808] Fixing OutputTypes's usage of the load command in Gadget

hg Repository: yt
details:   yt/rev/9278bfc82987
changeset: 1942:9278bfc82987
user:      Matthew Turk <matthewturk at gmail.com>
date:
Tue Aug 10 16:10:11 2010 -0700
description:
Merging from trunk

diffstat:

 .hgignore                                          |      3 +
 CREDITS                                            |      7 +-
 yt/_amr_utils/VolumeIntegrator.pyx                 |      8 +-
 yt/amr_utils.c                                     |   2722 ++--
 yt/arraytypes.py                                   |     11 +
 yt/command_line.py                                 |      1 +
 yt/extensions/eps_writer.py                        |     17 +-
 yt/extensions/kdtree/fKD.f90                       |      2 +-
 yt/extensions/light_ray.py                         |    372 +
 yt/extensions/volume_rendering/grid_partitioner.py |     26 +-
 yt/extensions/volume_rendering/multi_texture.py    |    302 +
 yt/fido/share_data.py                              |     83 +
 yt/lagos/BaseDataTypes.py                          |      2 +-
 yt/lagos/BaseGridType.py                           |    170 +-
 yt/lagos/Clump.py                                  |    290 -
 yt/lagos/DataReadingFuncs.py                       |     69 +-
 yt/lagos/FLASHFields.py                            |     97 +
 yt/lagos/HierarchyType.py                          |    384 +-
 yt/lagos/OutputTypes.py                            |    241 +-
 yt/lagos/RAMSESFields.py                           |     52 +
 yt/lagos/__init__.py                               |      2 +
 yt/mods.py                                         |      8 +-
 yt/ramses_headers/FortranUnformatted_IO.hh         |    291 +
 yt/ramses_headers/RAMSES_amr_data.hh               |    970 ++
 yt/ramses_headers/RAMSES_hydro_data.hh             |    666 +
 yt/ramses_headers/RAMSES_info.hh                   |    334 +
 yt/ramses_headers/RAMSES_particle_data.hh          |    650 +
 yt/ramses_headers/RAMSES_poisson_data.hh           |    249 +
 yt/ramses_headers/RAMSES_typedefs.h                |     21 +
 yt/ramses_headers/README                           |      9 +
 yt/ramses_headers/data_iterators.hh                |     74 +
 yt/ramses_reader.cpp                               |  11701 ++++++++++++++++++++++++
 yt/ramses_reader.pyx                               |    804 +
 yt/raven/Callbacks.py                              |     75 +
 yt/reason/plot_editors.py                          |     10 +-
 yt/reason/reason_v2.py                             |      7 +-
 yt/reason/tvtk_interface.py                        |     26 +-
 yt/setup.py                                        |      6 +
 38 files changed, 19022 insertions(+), 1740 deletions(-)

diffs (truncated from 29617 to 300 lines):

diff -r 12cd4b2e070c -r 9278bfc82987 .hgignore
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Tue Aug 10 16:10:11 2010 -0700
@@ -0,0 +1,3 @@
+syntax: glob
+*.pyc
+.*.swp
diff -r 12cd4b2e070c -r 9278bfc82987 CREDITS
--- a/CREDITS	Thu Jul 29 17:18:35 2010 -0700
+++ b/CREDITS	Tue Aug 10 16:10:11 2010 -0700
@@ -8,10 +8,15 @@
                                 Devin Silvia (devin.silvia at gmail.com)
                                 John Wise (jwise at astro.princeton.edu)
                                 David Collins (dcollins at physics.ucsd.edu)
+                                Christopher Moody (cemoody at ucsc.edu)
+                                Oliver Hahn (ohahn at stanford.edu)
+                                John ZuHone (jzuhone at cfa.harvard.edu)
 
 We also include the Delaunay Triangulation module written by Robert Kern of
 Enthought, the cmdln.py module by Trent Mick, and the progressbar module by
 Nilton Volpato.  The PasteBin interface code (as well as the PasteBin itself)
-was written by the Pocoo collective (pocoo.org).
+was written by the Pocoo collective (pocoo.org).  The RamsesRead++ library was
+developed by Oliver Hahn.  Large parts of this code were guided by discussions
+with Tom Abel, Ralf Kaehler, Mike Norman and Greg Bryan.
 
 Thanks to everyone for all your contributions!
diff -r 12cd4b2e070c -r 9278bfc82987 yt/_amr_utils/VolumeIntegrator.pyx
--- a/yt/_amr_utils/VolumeIntegrator.pyx	Thu Jul 29 17:18:35 2010 -0700
+++ b/yt/_amr_utils/VolumeIntegrator.pyx	Tue Aug 10 16:10:11 2010 -0700
@@ -106,9 +106,9 @@
     cdef np.float64_t bv, dy, dd, tf
     cdef int bin_id
     if fit.pass_through == 1: return dvs[fit.field_id]
+    if dvs[fit.field_id] > fit.bounds[1] or dvs[fit.field_id] < fit.bounds[0]: return 0.0
     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
-    if bin_id > fit.nbins - 2 or bin_id < 0: return 0.0
     bv = fit.values[bin_id]
     dy = fit.values[bin_id + 1] - bv
     if fit.weight_field_id != -1:
@@ -411,6 +411,12 @@
         for i in range(3):
             if (v_dir[i] < 0):
                 step[i] = -1
+            elif (v_dir[i] == 0):
+                step[i] = 1
+                tmax[i] = 1e60
+                iv_dir[i] = 1e60
+                tdelta[i] = 1e-60
+                continue
             else:
                 step[i] = 1
             x = (i+1) % 3
diff -r 12cd4b2e070c -r 9278bfc82987 yt/amr_utils.c
--- a/yt/amr_utils.c	Thu Jul 29 17:18:35 2010 -0700
+++ b/yt/amr_utils.c	Tue Aug 10 16:10:11 2010 -0700
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.13.beta0 on Thu Jul 29 17:18:11 2010 */
+/* Generated by Cython 0.13.beta0 on Mon Aug  2 07:18:26 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -376,7 +376,7 @@
 
 typedef npy_cdouble __pyx_t_5numpy_complex_t;
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":76
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":76
  * cdef class VectorPlane
  * 
  * cdef struct FieldInterpolationTable:             # <<<<<<<<<<<<<<
@@ -396,7 +396,7 @@
   int pass_through;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":89
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":89
  *     int pass_through
  * 
  * cdef void FIT_initialize_table(FieldInterpolationTable *fit, int nbins,             # <<<<<<<<<<<<<<
@@ -411,7 +411,7 @@
   int pass_through;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":39
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/QuadTree.pyx":39
  *     void *alloca(int)
  * 
  * cdef struct QuadTreeNode:             # <<<<<<<<<<<<<<
@@ -428,7 +428,7 @@
   struct __pyx_t_2yt_9amr_utils_QuadTreeNode *children[2][2];
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":118
  *     return (bv + dd*dy*fit.idbin)
  * 
  * cdef class TransferFunctionProxy:             # <<<<<<<<<<<<<<
@@ -449,7 +449,7 @@
   PyObject *my_field_tables;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":36
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":36
  *         self.refined_pos = 0
  * 
  * cdef class OctreeGrid:             # <<<<<<<<<<<<<<
@@ -467,7 +467,7 @@
   int level;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":53
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":53
  *         self.level = level
  * 
  * cdef class OctreeGridList:             # <<<<<<<<<<<<<<
@@ -480,7 +480,7 @@
   PyObject *grids;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":569
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":575
  *         return 1
  * 
  * cdef class ProtoPrism:             # <<<<<<<<<<<<<<
@@ -499,7 +499,7 @@
   int parent_grid_id;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":30
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":30
  * cimport cython
  * 
  * cdef class position:             # <<<<<<<<<<<<<<
@@ -513,7 +513,7 @@
   int refined_pos;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":537
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":543
  *             tf.eval_transfer(dt, self.dvs, rgba, grad)
  * 
  * cdef class GridFace:             # <<<<<<<<<<<<<<
@@ -530,7 +530,7 @@
   __pyx_t_5numpy_float64_t right_edge[3];
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":99
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/QuadTree.pyx":99
  *     free(node)
  * 
  * cdef class QuadTree:             # <<<<<<<<<<<<<<
@@ -547,7 +547,7 @@
   __pyx_t_5numpy_int64_t top_grid_dims[2];
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":74
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":74
  *                                        np.float64_t *data, np.float64_t *grad)
  * 
  * cdef class VectorPlane             # <<<<<<<<<<<<<<
@@ -579,7 +579,7 @@
   __pyx_t_5numpy_float64_t *y_vec;
 };
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":299
  *             tv[offset + k] = fv[k]
  * 
  * cdef class PartitionedGrid:             # <<<<<<<<<<<<<<
@@ -605,7 +605,7 @@
 };
 
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":537
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":543
  *             tf.eval_transfer(dt, self.dvs, rgba, grad)
  * 
  * cdef class GridFace:             # <<<<<<<<<<<<<<
@@ -619,7 +619,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *__pyx_vtabptr_2yt_9amr_utils_GridFace;
 
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":118
  *     return (bv + dd*dy*fit.idbin)
  * 
  * cdef class TransferFunctionProxy:             # <<<<<<<<<<<<<<
@@ -633,7 +633,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
 
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":569
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":575
  *         return 1
  * 
  * cdef class ProtoPrism:             # <<<<<<<<<<<<<<
@@ -647,7 +647,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *__pyx_vtabptr_2yt_9amr_utils_ProtoPrism;
 
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":99
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/QuadTree.pyx":99
  *     free(node)
  * 
  * cdef class QuadTree:             # <<<<<<<<<<<<<<
@@ -664,7 +664,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *__pyx_vtabptr_2yt_9amr_utils_QuadTree;
 
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":222
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":222
  *             #rgba[i+3] += trgba[i] * (1.0 - rgba[i+3])*dt*trgba[i+3]
  * 
  * cdef class VectorPlane:             # <<<<<<<<<<<<<<
@@ -680,7 +680,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *__pyx_vtabptr_2yt_9amr_utils_VectorPlane;
 
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":299
  *             tv[offset + k] = fv[k]
  * 
  * cdef class PartitionedGrid:             # <<<<<<<<<<<<<<
@@ -1761,7 +1761,7 @@
 static PyObject *__pyx_int_3;
 static PyObject *__pyx_int_15;
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":31
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":31
  * 
  * cdef class position:
  *     cdef public int output_pos, refined_pos             # <<<<<<<<<<<<<<
@@ -1853,7 +1853,7 @@
   return __pyx_r;
 }
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":32
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":32
  * cdef class position:
  *     cdef public int output_pos, refined_pos
  *     def __cinit__(self):             # <<<<<<<<<<<<<<
@@ -1869,7 +1869,7 @@
     __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
   if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
 
-  /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":33
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":33
  *     cdef public int output_pos, refined_pos
  *     def __cinit__(self):
  *         self.output_pos = 0             # <<<<<<<<<<<<<<
@@ -1878,7 +1878,7 @@
  */
   ((struct __pyx_obj_2yt_9amr_utils_position *)__pyx_v_self)->output_pos = 0;
 
-  /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":34
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":34
  *     def __cinit__(self):
  *         self.output_pos = 0
  *         self.refined_pos = 0             # <<<<<<<<<<<<<<
@@ -1892,7 +1892,7 @@
   return __pyx_r;
 }
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":37
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":37
  * 
  * cdef class OctreeGrid:
  *     cdef public object child_indices, fields, left_edges, dimensions, dx             # <<<<<<<<<<<<<<
@@ -2130,7 +2130,7 @@
   return __pyx_r;
 }
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":38
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":38
  * cdef class OctreeGrid:
  *     cdef public object child_indices, fields, left_edges, dimensions, dx
  *     cdef public int level             # <<<<<<<<<<<<<<
@@ -2180,7 +2180,7 @@
   return __pyx_r;
 }
 
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":39
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":39
  *     cdef public object child_indices, fields, left_edges, dimensions, dx
  *     cdef public int level
  *     def __cinit__(self,             # <<<<<<<<<<<<<<
@@ -2341,7 +2341,7 @@
   __pyx_bstride_0_dx = __pyx_bstruct_dx.strides[0];
   __pyx_bshape_0_dx = __pyx_bstruct_dx.shape[0];
 
-  /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":46
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":46
  *                   np.ndarray[np.float64_t, ndim=1] dx,
  *                   int level):
  *         self.child_indices = child_indices             # <<<<<<<<<<<<<<
@@ -2354,7 +2354,7 @@
   __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices);
   ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices = ((PyObject *)__pyx_v_child_indices);



More information about the yt-svn mailing list