Helmholtz Neumann wrappers

Iterative solver

Solve neumann boundary value problem for the Helmholtz equation using the right preconditioned combined field integral equation

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

This subroutine solves the interior or exterior Neumann boundary value problem using the right preconditioned combined field integral representation

\[u = \mathcal{S}_{k}[\sigma] + i\alpha D_{k}[S_{i|k|}[\sigma]]\]

The integral equation on the boundary is given by

\[f = \frac{(-i\alpha \mp 2)\sigma}{4} + \mathcal{S}_{k}'[\sigma] + i \alpha (D_{k}' - D_{i|k|}')S_{i|k|}[\sigma] + i \alpha (S_{i|k|}')^2[\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

  • zpars: double complex(2)

    kernel parameters, zpars(1)=k, zpars(2)=\(\alpha\)

  • 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 complex(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 complex(npts)

    solution of integral equation

  • siksigma: double complex(npts)

    returns \(\mathcal{S}_{i|k|}[\sigma]\) required for post-processing

Neumann problem post-processor

Evaluate potential for the Helmholtz equation using right preconditioned combined field integral equation

subroutine lpcomp_helm_rpcomb_dir(npatches,norders,ixyzs,iptype,npts,
srccoefs,srcvals,ndtarg,targs,ipatch_id,uvs_targ,eps,zpars,sigma,
siksigma,pot)

This subroutine evaluates the layer potential for the representation

\[u = \mathcal{S}_{k}[\sigma] + i\alpha D_{k}[S_{i|k|}[\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

  • zpars: double complex (2)

    kernel parameters (Referring to formula above) zpars(1) = k zpars(2) = \(\alpha\)

  • sigma: double complex(npts)

    density for layer potential

  • siksigma: double complex(npts)

    \(\mathcal{S}_{i|k|}[\sigma]\) returned by solver

Output arguments
  • pot: double complex(ntarg)

    layer potential evaluated at the target points