Skip to content

JoshuaTetzner/ExaFMMt.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExaFMMt

Docs-stable Docs-dev MIT license CI codecov

Introduction

This package wraps the exafmm-t library for Julia. Since Julia cannot natively call C++ functions, a C interface was added to exafmm-t in the fork at JoshuaTetzner/exafmm-t. The binary is built and published via Yggdrasil and registered as Exafmmt_jll in JuliaBinaryWrappers.

Since exafmm-t uses Unix-only functions, a Windows build is not available. Recommendations on how to get Windows builds working are always welcome. Please open an issue on this repository.

Fast Multipole Method (FMM)

The FMM improves the complexity of the matrix-vector product

$$Ax = y$$

from $\mathcal{O}(N^2)$ to $\mathcal{O}(N)$, where $A$ is the interaction matrix of points that evaluates the Green's function for a Laplace, Helmholtz, or modified Helmholtz kernel.

A common application of the FMM is the Boundary Element Method (BEM). Further information concerning this topic can be found in the documentation.

The current JLL build expects a BLAS/LAPACK backend to be loaded through Julia's BLAS stack. If your session has no backend configured, load one such as MKL before using ExaFMMt.

Installation

Installing ExaFMMt is done by entering the package manager (enter ] at the julia REPL) and issuing:

pkg> add https://github.com/JoshuaTetzner/ExaFMMt.jl.git

First steps

A simple Laplace FMM of a random distribution of charges is computed by the following code:

using MKL # or another BLAS/LAPACK backend configured for your Julia session
using ExaFMMt

sources = rand(Float64, 120, 3)
targets = rand(Float64, 80, 3)
charges = rand(Float64, 120)

A = setup(sources, targets, LaplaceFMMOptions())
y = A * charges

The variable A represents the FMM matrix and is multiplied by a vector of charges with one entry per source. The result y contains the potential at each target. For more examples and details see the documentation.

References

  • [1] Wang, Tingyu, Christopher D. Cooper, Timo Betcke, and Lorena A. Barba. High-Productivity, High-Performance Workflow for Virus-Scale Electrostatic Simulations with Bempp-Exafmm. arXiv, March 20, 2021. http://arxiv.org/abs/2103.01048.
  • [2] Adelman, Ross, Nail A. Gumerov, and Ramani Duraiswami. FMM/GPU-Accelerated Boundary Element Method for Computational Magnetics and Electrostatics. IEEE Transactions on Magnetics 53, no. 12 (December 2017): 1–11. https://doi.org/10.1109/TMAG.2017.2725951.

About

A Julia wrapper for the exafmm-t C++ package.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages