def test_scheme(scheme):
# Test integration until we get to a polynomial degree `d` that can no
# longer be integrated exactly. The scheme's degree is `d-1`.
pyra = numpy.array([
[-1, -1, -1],
[+1, -1, -1],
[+1, +1, -1],
[-1, +1, -1],
[0, 0, 1],
])
degree = check_degree(
lambda poly: quadpy.pyramid.integrate(poly, pyra, scheme),
lambda k: _integrate_exact(k, pyra),
3,
scheme.degree + 1
)
assert degree == scheme.degree
return
评论列表
文章目录