From ac898846d1195b959d29064bbccd7c6a7fd0373c Mon Sep 17 00:00:00 2001 From: rowanc1 Date: Thu, 16 Jan 2014 15:51:16 -0800 Subject: [PATCH] =?UTF-8?q?bug=20Fix=20to=20do=20with=20n=20=E2=80=94>=20n?= =?UTF-8?q?Cv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SimPEG/Mesh/TensorView.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SimPEG/Mesh/TensorView.py b/SimPEG/Mesh/TensorView.py index cbecde0a..7f1cb5e5 100644 --- a/SimPEG/Mesh/TensorView.py +++ b/SimPEG/Mesh/TensorView.py @@ -124,9 +124,9 @@ class TensorView(object): ax.axis('tight') elif self.dim == 2: if imageType == 'CC': - C = I[:].reshape(self.n, order='F') + C = I[:].reshape(self.nCv, order='F') elif imageType == 'N': - C = I[:].reshape(self.n+1, order='F') + C = I[:].reshape(self.nNv, order='F') C = 0.25*(C[:-1, :-1] + C[1:, :-1] + C[:-1, 1:] + C[1:, 1:]) elif imageType == 'Fx': C = I[:].reshape(self.nFx, order='F') @@ -153,9 +153,9 @@ class TensorView(object): # get copy of image and average to cell-centres is necessary if imageType == 'CC': - Ic = I[:].reshape(self.n, order='F') + Ic = I[:].reshape(self.nCv, order='F') elif imageType == 'N': - Ic = I[:].reshape(self.n+1, order='F') + Ic = I[:].reshape(self.nNv, order='F') Ic = .125*(Ic[:-1,:-1,:-1]+Ic[1:,:-1,:-1] + Ic[:-1,1:,:-1]+ Ic[1:,1:,:-1]+ Ic[:-1,:-1,1:]+Ic[1:,:-1,1:] + Ic[:-1,1:,1:]+ Ic[1:,1:,1:] ) elif imageType == 'Fx': Ic = I[:].reshape(self.nFx, order='F')