Laplace dirichlet wrappers

Iterative solver

Solve the dirichlet boundary value problem for the Laplace equation using combined field integral equation

subroutine lap_comb_dir_solver(npatches,norders,ixyzs,iptype,npts,
srccoefs,srcvals,eps,dpars,numit,ifinout,rhs,eps_gmres,niter,errs,
rres,sigma)

This subroutine solves the interior or exterior Dirichlet boundary value problem using the combined field integral representation

\[u = \alpha \mathcal{S}_{0}[\sigma] + \beta D_{0}[\sigma]\]

The integral equation on the boundary is given by

\[f = \pm \frac{\beta \sigma}{2} + \alpha \mathcal{S}_{0}[\sigma] + \beta D_{0}[\sigma] \, ,\]

where f is the boundary data, and sign of the constant is positive for the exterior problem, and negative for the interior problem.

Input arguments:

  • npatches: integer

    number of patches

  • norders: integer(npatches)

    order of discretization on each patch

  • ixyzs: integer(npatches+1)

    ixyzs(i) denotes the starting location in srccoefs, and srcvals array where information for patch i begins

  • iptype: integer(npatches)

    type of patch

  • npts: integer

    total number of points on the boundary

  • srccoefs: double precision (9,npts)

    koornwinder exapansion coefficients for x, \(\partial_{u} x\), and \(\partial_{v} x\)

  • srcvals: double precision (12,npts)

    x,\(\partial_{u} x\), \(\partial_{v} x\), and \(n\) sampled at discretization nodes

  • eps: double precision

    precision requested for computing quadrature and fmm tolerance

  • dpars: double precision(3)

    kernel parameters, dpars(1)=\(\alpha\), dpars(2)=\(\beta\)

  • ifinout: integer

    flag fpr interior or exterior problems (normals assumed to be pointing in the exertior of the region) - ifinout = 0, interior problem - ifinout = 1, exterior problem

  • rhs: double precision(npts)

    boundary data f

  • eps_gmres: double precision

    gmres tolerance requested

  • numit: integer

    max number of gmres iterations

Output arguments:
  • niter: integer

    number of gmres iterations required for relative residual

  • errs: double precision(1:niter)

    relative residual as a function of iteration number

  • rres: double precision

    relative residual of the computed solution

  • sigma: double precision(npts)

    solution of integral equation

Dirichlet problem post-processor

Evaluate potential for the Laplace equation using combined field integral equation

subroutine lpcomp_lap_comb_dir(npatches,norders,ixyzs,iptype,npts,
srccoefs,srcvals,ndtarg,targs,ipatch_id,uvs_targ,eps,dpars,sigma,pot)

This subroutine evaluates the layer potential for the representation

\[u = \alpha \mathcal{S}_{0}[\sigma] + \beta \mathcal{D}_{0}[\sigma]\]

For targets on the boundary, this routine only computes the principal value part, the identity term corresponding to the jump in the layer potential is not included in the layer potential.

Input arguments:

  • npatches: integer

    number of patches

  • norders: integer(npatches)

    order of discretization on each patch

  • ixyzs: integer(npatches+1)

    ixyzs(i) denotes the starting location in srccoefs, and srcvals array where information for patch i begins

  • iptype: integer(npatches)

    type of patch

  • npts: integer

    total number of discretization points on the boundary

  • srccoefs: double precision (9,npts)

    koornwinder expansion coefficients of x, \(\partial_{u} x\), and \(\partial_{v} x\).

  • srcvals: double precision (12,npts)

    x, \(\partial_{u} x\), \(\partial_{v} x\), and \(n\) sampled at discretization nodes

  • ndtarg: integer

    leading dimension of target array

  • ntarg: integer

    number of targets

  • targs: double precision (ndtarg,ntarg)

    target information

  • ipatch_id: integer(ntarg)

    id of patch of target i, id = -1, if target is off-surface

  • uvs_targ: double precision (2,ntarg)

    local uv coordinates on patch if on surface, otherwise set to 0 by default

  • eps: double precision

    precision requested

  • dpars: double precision (3)

    kernel parameters (Referring to formula above) dpars(1) = \(\alpha\) dpars(2) = \(\beta\)

  • sigma: double precision(npts)

    density for layer potential

Output arguments
  • pot: double precision(ntarg)

    layer potential evaluated at the target points