From 96e45ea3b0860da2b08d5833d4ad620a125f9395 Mon Sep 17 00:00:00 2001 From: seogi Date: Mon, 28 Apr 2014 10:07:14 -0700 Subject: [PATCH] modify ubcmeshutils --- SimPEG/Utils/meshutils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SimPEG/Utils/meshutils.py b/SimPEG/Utils/meshutils.py index 43efcc33..f893bf2d 100644 --- a/SimPEG/Utils/meshutils.py +++ b/SimPEG/Utils/meshutils.py @@ -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