Exemple #1
0
 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)
Exemple #2
0
 def wendland(self):
     return MVPolyCube.wendland(self.dim, self.n)
Exemple #3
0
 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)
Exemple #4
0
 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)
Exemple #5
0
 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)
Exemple #6
0
 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)
Exemple #7
0
 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)
Exemple #8
0
 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)))