callHooks generalizes some of the hook calling code in Optimize and Inversion

This commit is contained in:
Rowan Cockett
2013-11-21 16:56:01 -08:00
parent 0bd971c22f
commit dbaea1fda9
5 changed files with 28 additions and 34 deletions
+2 -4
View File
@@ -318,8 +318,7 @@ class DiffOperators(object):
def cellGrady():
doc = "Cell centered Gradient in the x dimension. Has neumann boundary conditions."
def fget(self):
if self.dim < 2:
return None
if self.dim < 2: return None
if getattr(self, '_cellGrady', None) is None:
BC = ['neumann', 'neumann']
n = self.n
@@ -338,8 +337,7 @@ class DiffOperators(object):
def cellGradz():
doc = "Cell centered Gradient in the x dimension. Has neumann boundary conditions."
def fget(self):
if self.dim < 3:
return None
if self.dim < 3: return None
if getattr(self, '_cellGradz', None) is None:
BC = ['neumann', 'neumann']
n = self.n