FaceInnerProducts for TreeMesh

This commit is contained in:
rowanc1
2014-02-10 22:35:28 -08:00
parent 61e86c2dd9
commit a808aa5774
3 changed files with 58 additions and 12 deletions
+5 -3
View File
@@ -489,13 +489,15 @@ class SimpleOctreeOperatorTests(unittest.TestCase):
h1 = np.random.rand(5)
h2 = np.random.rand(7)
h3 = np.random.rand(3)
self.tM = TensorMesh([h1,h2,1])
self.oM = TreeMesh([h1,h2,1])
self.tM = TensorMesh([h1,h2,h3])
self.oM = TreeMesh([h1,h2,h3])
def test_faceDiv(self):
print (self.tM.faceDiv - self.oM.faceDiv)
self.assertTrue((self.tM.faceDiv - self.oM.faceDiv).toarray().sum() == 0)
def test_InnerProducts(self):
self.assertTrue((self.tM.getFaceInnerProduct() - self.oM.getFaceInnerProduct()).toarray().sum() == 0)
if __name__ == '__main__':
unittest.main()