/ concept-collection / fastandaccurate
Sign in
concept-collection / fastandaccurate
fastandaccurate / src / problems / laplace2d / matlab / laplace2d_bdata.m
13 lines · 520 BCodeBlameHistory
ad5dc23Three new instances, near-field target sets, and an adaptive timing policyJeremy Magland 1function g = laplace2d_bdata(t, r, sx, sy, c)
5127df5fastandaccurate: PDE solver benchmarks, laplace-dirichlet-2d with MFS and Nystrom DLP solversJeremy Magland 2% LAPLACE2D_BDATA Dirichlet data for laplace-dirichlet-2d.
ad5dc23Three new instances, near-field target sets, and an adaptive timing policyJeremy Magland 3% Evaluates u(x(t)) = sum_j c_j log|x(t) - s_j| at boundary parameters t,
4% given the boundary radius r = r(t) at those parameters (which family the
5% radius came from does not matter here). Called through the prob.g handle
6% built in build_problem; solvers see only that handle.
8y = r.*sin(t);
9g = zeros(size(t));
10for j = 1:numel(c)
11 g = g + c(j)*0.5*log((x - sx(j)).^2 + (y - sy(j)).^2);
12end
13end
moveopenescclose