From 354e49622399d0951eba8c3367f384850098773d Mon Sep 17 00:00:00 2001 From: rowanc1 Date: Sat, 26 Apr 2014 13:18:48 -0700 Subject: [PATCH] test simple cylmesh interpolation --- SimPEG/Tests/test_interpolation.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SimPEG/Tests/test_interpolation.py b/SimPEG/Tests/test_interpolation.py index 9370d7bd..a2b58df9 100644 --- a/SimPEG/Tests/test_interpolation.py +++ b/SimPEG/Tests/test_interpolation.py @@ -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"