diff --git a/SimPEG/TensorMesh.py b/SimPEG/TensorMesh.py index acfdfbac..5218aec1 100644 --- a/SimPEG/TensorMesh.py +++ b/SimPEG/TensorMesh.py @@ -133,7 +133,7 @@ class TensorMesh(BaseMesh, TensorView, DiffOperators, InnerProducts): doc = "Face staggered grid in the y direction." def fget(self): - if self._gridFy is None: + if self._gridFy is None and self.dim > 1: self._gridFy = ndgrid([x for x in [self.vectorCCx, self.vectorNy, self.vectorCCz] if not x is None]) return self._gridFy return locals() @@ -144,7 +144,7 @@ class TensorMesh(BaseMesh, TensorView, DiffOperators, InnerProducts): doc = "Face staggered grid in the z direction." def fget(self): - if self._gridFz is None: + if self._gridFz is None and self.dim > 2: self._gridFz = ndgrid([x for x in [self.vectorCCx, self.vectorCCy, self.vectorNz] if not x is None]) return self._gridFz return locals() @@ -166,7 +166,7 @@ class TensorMesh(BaseMesh, TensorView, DiffOperators, InnerProducts): doc = "Edge staggered grid in the y direction." def fget(self): - if self._gridEy is None: + if self._gridEy is None and self.dim > 1: self._gridEy = ndgrid([x for x in [self.vectorNx, self.vectorCCy, self.vectorNz] if not x is None]) return self._gridEy return locals() @@ -177,7 +177,7 @@ class TensorMesh(BaseMesh, TensorView, DiffOperators, InnerProducts): doc = "Edge staggered grid in the z direction." def fget(self): - if self._gridEz is None: + if self._gridEz is None and self.dim > 2: self._gridEz = ndgrid([x for x in [self.vectorNx, self.vectorNy, self.vectorCCz] if not x is None]) return self._gridEz return locals()