Testing of LOM (comparing against Tensor Mesh)

This commit is contained in:
Rowan Cockett
2013-08-03 16:08:54 -07:00
parent 1acb1a4b84
commit cc66eaf9fd
3 changed files with 64 additions and 3 deletions
+10 -1
View File
@@ -1,6 +1,6 @@
import sys
sys.path.append('../../')
from SimPEG import TensorMesh
from SimPEG import TensorMesh, utils, LogicallyOrthogonalMesh
import numpy as np
import unittest
@@ -90,6 +90,15 @@ class OrderTest(unittest.TestCase):
max_h = max([np.max(hi) for hi in self.M.h])
return max_h
elif 'LOM' in self.meshType:
if 'uniform' in self.meshType:
xx = np.ones(nc)/nc
X, Y, Z = utils.ndgrid(xx, xx, xx, vector=False)
else:
raise Exception('Unexpected meshType')
self.M = LogicallyOrthogonalMesh([X, Y, Z])
return 1./nc
def getError(self):
"""For given h, generate A[h], f and A(f) and return norm of error."""
return 1.