changes to CC at middle of first h_r

This commit is contained in:
rowanc1
2014-02-21 15:31:31 -08:00
parent 897b43bf80
commit fee512dda3
3 changed files with 24 additions and 29 deletions
+1 -2
View File
@@ -89,8 +89,7 @@ class CylMesh(BaseTensorMesh):
@property
def vectorCCx(self):
"""Cell-centered grid vector (1D) in the x direction."""
firstEl = -self.hx[0]*0.5 if self.nCy == 1 else 0
return np.r_[firstEl, self.hx[:-1].cumsum()] + self.hx*0.5
return np.r_[0, self.hx[:-1].cumsum()] + self.hx*0.5
@property
def vectorCCy(self):
+1 -1
View File
@@ -22,7 +22,7 @@ class BaseTensorMesh(BaseRectangularMesh):
assert type(h_in) is list, 'h_in must be a list'
h = range(len(h_in))
for i, h_i in enumerate(h_in):
if type(h_i) in [int, long, float]:
if type(h_i) in [int, long, float, np.int_]:
# This gives you something over the unit cube.
h_i = self._unitDimensions[i] * np.ones(int(h_i))/int(h_i)
assert type(h_i) == np.ndarray, ("h[%i] is not a numpy array." % i)