mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-10 12:40:59 +08:00
Testing of LOM (comparing against Tensor Mesh)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user