Fix commit issues in MeshUtils.

This commit is contained in:
rowanc1
2014-04-28 10:41:28 -07:00
parent 96e45ea3b0
commit c814029d89
+3 -7
View File
@@ -1,14 +1,9 @@
import numpy as np
from scipy import sparse as sp
from matutils import mkvc, ndgrid, sub2ind, sdiag
<<<<<<< ded7a3967c9ae8420a13a8f7372f6a12bbf8e0fd
from codeutils import asArray_N_x_Dim
from codeutils import isScalar
=======
import SimPEG
>>>>>>> 6e4308fea2b6ca5756fbf45ec4ebb801125345ad
def exampleLrmGrid(nC, exType):
assert type(nC) == list, "nC must be a list containing the number of nodes"
assert len(nC) == 2 or len(nC) == 3, "nC must either two or three dimensions"
@@ -136,7 +131,8 @@ def readUBCTensorMesh(fileName):
y0 = mesh[1][1]
z0 = -(hz.sum()-mesh[1][2])
mesh3D = SimPEG.Mesh.TensorMesh([hx, hy, hz], np.r_[x0, y0, z0])
from SimPEG import Mesh
mesh3D = Mesh.TensorMesh([hx, hy, hz], np.r_[x0, y0, z0])
return mesh3D
@@ -151,7 +147,7 @@ def readUBCTensorModel(fileName, mesh):
model = np.reshape(model, (mesh.nCz, mesh.nCx, mesh.nCy), order = 'F')
model = model[::-1,:,:]
model = np.transpose(model, (1, 2, 0))
model = SimPEG.Utils.mkvc(model)
model = mkvc(model)
return model