Allow using tanh-sinh quadrature for table building
This PR adds two options special_radial_brick_quadrature
and nradial_brick_quad_points
to the Droste
class of table builders that enable using tanh-sinh quadrature in the radial direction.
Example usage:
from sumpy.kernel import LaplaceKernel
import numpy as np
import pyopencl as cl
import volumential.nearfield_potential_table as nft
knl = LaplaceKernel(2)
ctx = cl._csc()
queue = cl.CommandQueue(ctx)
q_order = 5
table = nft.NearFieldInteractionTable(q_order, sumpy_kernel=knl)
table.build_table_via_droste_bricks(
n_brick_quad_points=200, alpha=0., use_symmetry=True,
nlevels=1, queue=queue, adaptive_quadrature=True,
special_radial_brick_quadrature=True, nradial_brick_quad_points=200)
One direct improvement using tanh-sinh quadrature is to be able to attain high accuracy for non-1/r
type (e.g. logarithmic) kernels. In the case of 2D Laplacian kernel, it roughly improves the accuracy from 7
decimal places to 14
.