Skip to content

Commit

Permalink
updating math documentation, and fixing some typos in laplace fmm doc…
Browse files Browse the repository at this point in the history
…umentation
  • Loading branch information
mrachh committed Feb 14, 2024
1 parent 4a76185 commit acd6398
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 3 deletions.
96 changes: 96 additions & 0 deletions docs/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,92 @@ of source locations and let $t_{i} \in \mathbb{R}^{2}$ denote a collection
of target locations.


Laplace FMM
*************
The Laplace FMM comes in three varieties

* rfmm2d: Charges, dipole strengths, potentials, their
gradients, and hessians are all double precision
* lfmm2d: All of the above quantities are double complex
* cfmm2d: Same as lfmm2d except that there are no dipole orientation vectors,
and the dipole kernel is given by $1/(zt_{i} - zx_{j})$ where $zt_{i}, zx_{j}$
are the complex versions of the source and target locations given by
$zt_{i} = t_{i}(1) + i*t_{i}(2)$, and $zx_{j} = x_{j}(1) + i*y_{j}(2)$.
Moreover, the gradients, and hessians
in this case are derivatives with respect to $z$, and in a slight abuse of
notation, we set $d/dz log(|z|) = 1/z$


Laplace FMM (rfmm2d)
---------------------
Let $c_{j} \in \mathbb{R}$,
$j=1,2,\ldots N$,
denote a collection of charge strengths, $v_{j} \in \mathbb{R}$,
$j=1,2,\ldots N$,
denote a collection of dipole strengths, and $d_{j} \in \mathbb{R}^{2}$,
$j=1,2,\ldots N$, denote the corresponding dipole orientation vectors.

The Laplace FMM (rfmm2d) computes
the potential $u(x) \in \mathbb{R}$ and the its gradient $\nabla u(x) \in
\mathbb{R}^{2}$
given by

.. math::
:label: rlap_nbody
u(x) = \sum_{j=1}^{N} c_{j} log(\|x-x_{j}\|) - v_{j} d_{j}\cdot \nabla log(\|x-x_{j}\|) \, ,
at the source and target locations. When $x=x_{j}$, the term
corresponding to $x_{j}$ is dropped from the sum.


Laplace FMM (lfmm2d)
---------------------
Let $c_{j} \in \mathbb{C}$,
$j=1,2,\ldots N$,
denote a collection of charge strengths, $v_{j} \in \mathbb{C}$,
$j=1,2,\ldots N$,
denote a collection of dipole strengths, and $d_{j} \in \mathbb{R}^{2}$,
$j=1,2,\ldots N$, denote the corresponding dipole orientation vectors.

The Laplace FMM (rfmm2d) computes
the potential $u(x) \in \mathbb{C}$ and the its gradient $\nabla u(x) \in
\mathbb{C}^{2}$
given by

.. math::
:label: llap_nbody
u(x) = \sum_{j=1}^{N} c_{j} log(\|x-x_{j}\|) - v_{j} d_{j}\cdot \nabla log(\|x-x_{j}\|) \, ,
at the source and target locations. When $x=x_{j}$, the term
corresponding to $x_{j}$ is dropped from the sum.


Laplace FMM (cfmm2d)
---------------------
Let $c_{j} \in \mathbb{C}$,
$j=1,2,\ldots N$,
denote a collection of charge strengths, and $v_{j} \in \mathbb{C}$,
$j=1,2,\ldots N$,
denote a collection of dipole strengths.

The Laplace FMM (cfmm2d) computes
the potential $u(z) \in \mathbb{C}$ and the its gradient $d/dz u(z) \in
\mathbb{C}$
given by

.. math::
:label: clap_nbody
u(z) = \sum_{j=1}^{N} c_{j} log(\|z-zx_{j}\|) - \frac{v_{j}}{z-zx_{j}} \, ,
at the source and target locations. When $z=zx_{j}$, the term
corresponding to $zx_{j}$ is dropped from the sum. Here
$z = x(1) + i x(2)$, and $zx_{j} = x_{j}(1) + ix_{j}(2)$, are the complex
numbers corresponding to $x$ and $x_{j}$ respectively.


Helmholtz FMM
*************
Let $c_{j} \in \mathbb{C}$,
Expand All @@ -29,6 +115,16 @@ at the source and target locations, where $H_{0}^{(1)}$ is the Hankel function
of the first kind of order $0$. When $x=x_{j}$, the term
corresponding to $x_{j}$ is dropped from the sum.


Biharmonic FMM
***************

Modified Biharmonic FMM
************************

Stokes FMM
************

Vectorized versions
*******************
The vectorized versions of the Helmholtz FMM,
Expand Down
2 changes: 1 addition & 1 deletion src/laplace/cfmm2d.f
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cc Copyright (C) 2018-2019: Le=",nlevelsslie Greengard, Zydrunas Gimbutas,
cc Copyright (C) 2018-2019: Leslie Greengard, Zydrunas Gimbutas,
cc and Manas Rachh
c c Contact: [email protected]
cc
Expand Down
2 changes: 1 addition & 1 deletion src/laplace/cfmm2dwrap.f
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
c
c l2d: charge and dipstr are complex valued, x in \R^2
c
c \phi(x_i) = \sum_{j\ne i} charge_j log|x_i-x_j}
c \phi(x_i) = \sum_{j\ne i} charge_j log|x_i-x_j|
c + dipstr_j/x_i - x_j
c
c
Expand Down
2 changes: 1 addition & 1 deletion src/laplace/rfmm2dwrap.f
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
c
c l2d: charge and dipstr are real valued, x in \R^2
c
c \phi(x_i) = \sum_{j\ne i} charge_j log|x_i-x_j}
c \phi(x_i) = \sum_{j\ne i} charge_j log|x_i-x_j|
c + dipstr_j/x_i - x_j
c
c
Expand Down

0 comments on commit acd6398

Please sign in to comment.