mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-27 21:08:35 +08:00
Fix commit issues in MeshUtils.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user