Code Monkey home page Code Monkey logo

lap2d's Introduction

lap2d

A fast direct dense solver with machine accuracy for 2-D Laplace's equation.

Overview

By classical potential theory, Laplace's equation can be reformulated as Fredholm integral equation of the second kind on the boundary of the domain, which leads to both a reduction of dimensionality and a bounded operator. However, the discretization of the boundary integral equation will result in a dense matrix. Fortunately, the resulting matrix is rank-structured, to be more precise, hierarchical semi-separable, which allows one to implement an O(n) direct solver for the boundary integral equation.

Features

  • Machine precision: Unlike the unbounded Laplacian operator that appeared in the PDE, the formulation of the boundary integral equation will produce a well-conditioned system that is independent of the size of discretization.
  • Direct solver: Useful for problems involving multiple right-hand sides. Allow for rapid and accurate solutions to relatively ill-conditioned problems.
  • Spectral convergence: One can prove that the rate of convergence is determined by the order of quadrature rule used when solving the integral equation. By default, the composite 12-point Gauss-Legendre quadrature rule is used.
  • Reduction of dimensionality: Reduce the problem domain from a two-dimensional one to its boundary (one-dimensional).
  • Fast: Besides low asymptotic cost, the constant of the time complexity is also small.
  • Accurate evaluation of near-boundary potential: The function lapfparam_adap allows one to evaluate near-boundary potential accurately through Legendre expansion and adaptive Gaussian quadrature, given the density of charges/dipoles on the boundary.

Caveats

  • lap2d currently only supports interior Dirichlet problems, although the boundary integral equation will work for both interior/exterior and Dirichlet/Neumann problems.
  • The number of panels in the discretization must be a power of 2. (But one is allowed to adjust the number of Gauss-Legendre nodes on each panel.)
  • lap2d depends on NumericalToolbox written by Serkh et al. The link to the library will be updated here after publication.
  • lap2d uses a binary tree instead of a quadtree to hierarchically partition the boundary, which causes the theoretical asymptotic time complexity to be O(nlogn). However, it turns out that the coefficient of the nlogn term is tiny and for any reasonable size of discretization, the solver exhibits O(n) asymptotic time complexity.

Acknowledgements

I would like to thank my advisor, Professor Kirill Serkh, for both his huge amount of effort devoted and his seemingly infinite amount of patience, support and guidance. I'm also grateful for the opportunity to work on this fun project.

Reference

P.G. Martinsson, Boundary Integral Equations and the Nyström method, CBMS/NSF Conference on Fast Direct Solvers, 2014.

A. Gillman, P. Young, and P.G. Martinsson, A direct solver with O(N) complexity for integral equations on one-dimensional domains, Front. Math. China, 7 (2012), pp. 217–247.

P.G. Martinsson, Direct Solvers for Integral Equations, CBMS/NSF Conference on Fast Direct Solvers, 2014.

J. Levandosky, Notes on potential theory, Stanford University, 2003.

K. L. Ho and L. Greengard, A fast direct solver for structured linear systems by recursive skeletonization, SIAM J. Sci. Comput., vol. 34, no. 5, pp. 2507–2532, 2012.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.