Green's functions¶
sies.greens ¶
Green's function of the 2D Laplacian and its derivatives.
The fundamental solution of the Laplace equation in two dimensions is
All functions in this module are vectorized: point clouds are given as
arrays of shape (2, n) and the result is a matrix indexed by the two
point clouds.
green2d ¶
green2d(x, y)
Evaluate the 2D Green's function on two point clouds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
(ndarray, shape(2, m))
|
First point cloud. |
required |
y
|
(ndarray, shape(2, n))
|
Second point cloud. Must be disjoint from |
required |
Returns:
| Type | Description |
|---|---|
(ndarray, shape(m, n))
|
Matrix |
Source code in src/sies/greens.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
green2d_grad ¶
green2d_grad(x, y)
Evaluate the gradient of the 2D Green's function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
(ndarray, shape(2, m))
|
First point cloud. |
required |
y
|
(ndarray, shape(2, n))
|
Second point cloud. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
gx |
(ndarray, shape(m, n))
|
Partial derivative with respect to the first coordinate,
evaluated at |
gy |
(ndarray, shape(m, n))
|
Partial derivative with respect to the second coordinate,
evaluated at |
Source code in src/sies/greens.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
green2d_dn ¶
green2d_dn(x, y, normal)
Evaluate the normal derivative of the Green's function on a boundary.
For each source point \(x_i\) and boundary point \(y_j\) with outward normal \(\nu_j\), compute \(\langle \nabla G(y_j - x_i), \nu_j \rangle\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
(ndarray, shape(2, m))
|
Evaluation (source) points. |
required |
y
|
(ndarray, shape(2, n))
|
Boundary points. |
required |
normal
|
(ndarray, shape(2, n))
|
Outward unit normal vectors at the boundary points. |
required |
Returns:
| Type | Description |
|---|---|
(ndarray, shape(m, n))
|
The normal derivative matrix. |
Source code in src/sies/greens.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |