[Yt-svn] commit/yt: MatthewTurk: This bit of ugliness fixes comilation with recent GCCs, which also fixed

Bitbucket commits-noreply at bitbucket.org
Thu May 12 11:20:10 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/cef44e3a89ea/
changeset:   r4251:cef44e3a89ea
branch:      yt
user:        MatthewTurk
date:        2011-05-12 20:18:52
summary:     This bit of ugliness fixes comilation with recent GCCs, which also fixed
Franklin compilation.
affected #:  1 file (723 bytes)

--- a/yt/utilities/_amr_utils/VolumeIntegrator.pyx	Thu May 12 01:38:42 2011 -0400
+++ b/yt/utilities/_amr_utils/VolumeIntegrator.pyx	Thu May 12 14:18:52 2011 -0400
@@ -1450,6 +1450,12 @@
         cdef np.float64_t enter_t, dt, offpos[3]
         cdef int found_a_home, hit
         #print "Grid: ", pgi, "has", grid_neighbors[0], "neighbors"
+        # Some compilers throw errors on the passing of the center, v_dir and
+        # value
+        cdef np.float64_t self_center[3], ray_v_dir[3], ray_value[4]
+        self_center[0] = self.center[0]
+        self_center[1] = self.center[1]
+        self_center[2] = self.center[2]
         while ray != NULL:
             # Note that we may end up splitting a ray such that it ends up
             # outside the brick!  This will likely cause them to get lost.
@@ -1461,7 +1467,18 @@
             ray = self.refine_ray(ray, domega, pg.dds[0],
                                   pg.left_edge, pg.right_edge)
             enter_t = ray.t
-            hit = pg.integrate_ray(self.center, ray.v_dir, ray.value, tf, &ray.t)
+            ray_v_dir[0] = ray.v_dir[0]
+            ray_v_dir[1] = ray.v_dir[1]
+            ray_v_dir[2] = ray.v_dir[2]
+            ray_value[0] = ray.value[0]
+            ray_value[1] = ray.value[1]
+            ray_value[2] = ray.value[2]
+            ray_value[3] = ray.value[3]
+            hit = pg.integrate_ray(self_center, ray_v_dir, ray_value, tf, &ray.t)
+            ray.value[0] = ray_value[0]
+            ray.value[1] = ray_value[1]
+            ray.value[2] = ray_value[2]
+            ray.value[3] = ray_value[3]
             if hit == 0: dt = 0.0
             else: dt = (ray.t - enter_t)/hit
             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