def wendland(cls, d, k, **kwargs): """ Return the output of :meth:`mvpoly.cube.MVPolyCube.wendland` converted to other polynomial subclasess. """ from mvpoly.cube import MVPolyCube return cls(MVPolyCube.wendland(d, k, **kwargs), **kwargs)
def wendland(self): return MVPolyCube.wendland(self.dim, self.n)
def test_wendland_dim5_order2(self) : r = self.r expected = (16*r*r + 7*r + 1) * (1 - r)**7 obtained = MVPolyCube.wendland(5, 2) self.assertEqualUpToConstant(expected, obtained)
def test_wendland_dim5_order1(self) : r = self.r expected = (5*r + 1) * (1 - r)**5 obtained = MVPolyCube.wendland(5, 1) self.assertEqualUpToConstant(expected, obtained)
def test_wendland_dim3_order3(self) : r = self.r expected = (32*r*r*r + 25*r*r + 8*r + 1) * (1 - r)**8 obtained = MVPolyCube.wendland(3, 3) self.assertEqualUpToConstant(expected, obtained)
def test_wendland_dim3_order2(self) : r = self.r expected = (35*r*r + 18*r + 3) * (1 - r)**6 obtained = MVPolyCube.wendland(3, 2) self.assertEqualUpToConstant(expected, obtained)
def test_wendland_dim1_order2(self) : r = self.r expected = (8*r*r + 5*r + 1) * (1 - r)**5 obtained = MVPolyCube.wendland(1, 2) self.assertEqualUpToConstant(expected, obtained)
def test_wendland_dim5_order0(self) : r = self.r expected = (1 - r)**3 obtained = MVPolyCube.wendland(5, 0) self.assertTrue(expected == obtained, "{0!s}".format((obtained)))