def fmm_green_func(x, n, domain_index, result): import exafmm.laplace as _laplace sources = _laplace.init_sources(x_q, q) targets = _laplace.init_targets(x.T) fmm = _laplace.LaplaceFmm(p=10, ncrit=500, filename='.rhs.tmp') tree = _laplace.setup(sources, targets, fmm) values = _laplace.evaluate(tree, fmm) os.remove('.rhs.tmp') result[:] = (-1.0) * values[:, 0] / ep_in
def rhs2_fun(x, n, domain_index, result): import exafmm.laplace as _laplace sources = _laplace.init_sources(x_q, q) targets = _laplace.init_targets(x.T) fmm = _laplace.LaplaceFmm(p=10, ncrit=500, filename='.rhs.tmp') tree = _laplace.setup(sources, targets, fmm) values = _laplace.evaluate(tree, fmm) os.remove('.rhs.tmp') result[:] = (-1.0) * np.sum(values[:, 1:] * n.T, axis=1) / ep_ex