modify ubcmeshutils

This commit is contained in:
seogi
2014-04-28 10:07:14 -07:00
parent ded7a3967c
commit 96e45ea3b0
+7 -3
View File
@@ -1,9 +1,13 @@
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"
@@ -130,9 +134,9 @@ def readUBCTensorMesh(fileName):
x0 = mesh[1][0]
y0 = mesh[1][1]
z0 = -mesh[1][2]
z0 = -(hz.sum()-mesh[1][2])
mesh3D = Mesh.TensorMesh([hx, hy, hz], np.r_[x0, y0, z0])
mesh3D = SimPEG.Mesh.TensorMesh([hx, hy, hz], np.r_[x0, y0, z0])
return mesh3D
@@ -147,7 +151,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 = Utils.mkvc(model)
model = SimPEG.Utils.mkvc(model)
return model