From dc07ea02fddebf876c529ff2ab480fdf07e9d4a3 Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Wed, 13 Nov 2013 19:44:27 -0800 Subject: [PATCH] Make BC work in 2D and 3D --- SimPEG/mesh/DiffOperators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SimPEG/mesh/DiffOperators.py b/SimPEG/mesh/DiffOperators.py index 7176b8fd..1f453d58 100644 --- a/SimPEG/mesh/DiffOperators.py +++ b/SimPEG/mesh/DiffOperators.py @@ -287,8 +287,8 @@ class DiffOperators(object): G = sp.vstack((G1, G2, G3), format="csr") # Compute areas of cell faces & volumes S = self.area - V = self.vol - self._cellGradBC = sdiag(S)*G*sdiag(1/V[[0,-1]]) + V = self.aveCC2F*self.vol # Average volume between adjacent cells + self._cellGradBC = sdiag(S/V)*G return self._cellGradBC return locals() _cellGradBC = None