Changed CylModel --> Vertical1DModel (not tested on Cyl1DMesh)

This commit is contained in:
rowanc1
2014-02-05 21:29:35 -08:00
parent c128be8af3
commit aa1faa9505
2 changed files with 47 additions and 13 deletions
+6 -7
View File
@@ -11,17 +11,16 @@ class ModelTests(unittest.TestCase):
a = np.array([1, 1, 1])
b = np.array([1, 2])
c = np.array([1, 4])
self.mesh2 = Mesh.TensorMesh([a, b], np.array([3, 5]))
def test_modelTransforms(self):
print 'SimPEG.Model.BaseModel: Testing Model Transform'
for M in dir(Model):
if 'Model' not in M: continue
model = getattr(Model, M)(self.mesh2)
m = model.example()
passed = checkDerivative(lambda m : [model.transform(m), model.transformDeriv(m)], m, plotIt=False)
self.assertTrue(passed)
try:
model = getattr(Model, M)(self.mesh2)
assert isinstance(model, Model.BaseModel)
except Exception, e:
continue
self.assertTrue(model.test())
if __name__ == '__main__':
unittest.main()