mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-10 12:37:30 +08:00
changes to CC at middle of first h_r
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user