mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-12 12:30:37 +08:00
test simple cylmesh interpolation
This commit is contained in:
@@ -135,6 +135,16 @@ class TestInterpolation2d(OrderTest):
|
||||
self.orderTest()
|
||||
|
||||
|
||||
class TestInterpolation2dCyl_Simple(unittest.TestCase):
|
||||
def test_simpleInter(self):
|
||||
M = Mesh.CylMesh([4,1,1])
|
||||
locs = np.r_[0,0,0.5]
|
||||
fx = np.array([[ 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]])
|
||||
self.assertTrue( np.all(fx == M.getInterpolationMat(locs, 'Fx').todense()) )
|
||||
fz = np.array([[ 0., 0., 0., 0., 0.5, 0., 0., 0., 0.5, 0., 0., 0.]])
|
||||
self.assertTrue( np.all(fz == M.getInterpolationMat(locs, 'Fz').todense()) )
|
||||
|
||||
|
||||
|
||||
class TestInterpolation2dCyl(OrderTest):
|
||||
name = "Interpolation 2D"
|
||||
|
||||
Reference in New Issue
Block a user