[Yt-svn] yt-commit r813 - trunk/yt/raven
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Oct 2 10:28:35 PDT 2008
Author: mturk
Date: Thu Oct 2 10:28:34 2008
New Revision: 813
URL: http://yt.spacepope.org/changeset/813
Log:
Sign error with periodic BCs in vmplots, and two lines of comments in what has
otherwise been deemed "read-only" code. (And you thought I'd forget you said
that, eh, JS?)
Modified:
trunk/yt/raven/_MPL.c
Modified: trunk/yt/raven/_MPL.c
==============================================================================
--- trunk/yt/raven/_MPL.c (original)
+++ trunk/yt/raven/_MPL.c Thu Oct 2 10:28:34 2008
@@ -130,15 +130,17 @@
*(npy_float64*) PyArray_GETPTR2(my_array, j, i) = 0.0;
for(p=0;p<nx;p++)
{
+ // these are cell-centered
xsp = *((npy_float64 *)PyArray_GETPTR1(x, p));
ysp = *((npy_float64 *)PyArray_GETPTR1(y, p));
+ // half-width
dxsp = *((npy_float64 *)PyArray_GETPTR1(dx, p));
dysp = *((npy_float64 *)PyArray_GETPTR1(dy, p));
dsp = *((npy_float64 *)PyArray_GETPTR1(d, p));
if(xsp + dxsp < x_min) (xsp+=period_x);
- else if (xsp+dxsp > x_max) (xsp-=period_x);
+ else if (xsp-dxsp > x_max) (xsp-=period_x);
if(ysp + dysp < y_min) (ysp+=period_y);
- else if (ysp+dysp > y_max) (ysp-=period_y);
+ else if (ysp-dysp > y_max) (ysp-=period_y);
if(((xsp+dxsp<x_min) ||
(xsp-dxsp>x_max)) ||
((ysp+dysp<y_min) ||
More information about the yt-svn
mailing list