Appearance
adam_lattice_green_library
ADAM, lattice Green's function of the 7-point Laplacian (generated: scripts/lattice_green.py, do not edit).
lattice_green(n) returns G(n) on the unit cubic lattice, L_1 G = delta_(n,0), G -> -1 / (4 pi |n|): the kernel of the isolated FFT Poisson solver (issue #81, M8-P4; on a lattice of spacing h the kernel is h^2 G). For max |n_d| <= 32 it is the table (the Dirichlet problem on the cube, round-off residual inside); beyond, the asymptotic expansion G0 + G1 + G2 + G3, G0 = -1 / (4 pi r), G1 = -5 (n1^4 + n2^4 + n3^4 - 3 r^4 / 5) / (32 pi r^7), G2 = P8(n) / r^13, G3 = P12(n) / r^19 (their lattice coefficients fitted to the table), error O(r^-9). Regenerate and validate with python3 scripts/lattice_green.py (--check compares this file).
Source: src/lib/common/adam_lattice_green_library.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
LGF_RADIUS | integer(kind=I4P) | parameter | Half side of the tabulated cube. |
LGF_COUNT | integer(kind=I4P) | parameter | Tabulated values (the wedge n1 >= n2 >= n3 >= 0). |
PI | real(kind=R8P) | parameter | Pi. |
G2_C | real(kind=R8P) | parameter | G2 = P8 / r^13 coefficients. |
G3_C | real(kind=R8P) | parameter | G3 = P12 / r^19 coefficients. |
LGF_TABLE | real(kind=R8P) | The wedge, index n1 (n1+1) (n1+2) / 6 + n2 (n2+1) / 2 + n3 + 1. |
Functions
lattice_green
Return the lattice Green's function of the 7-point Laplacian at the lattice offset n.
Attributes: pure
Returns: real(kind=R8P)
fortran
function lattice_green(n) result(g)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
n | integer(kind=I4P) | in | Lattice offset. |
Call graph