Skip to content

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 ​

NameTypeAttributesDescription
LGF_RADIUSinteger(kind=I4P)parameterHalf side of the tabulated cube.
LGF_COUNTinteger(kind=I4P)parameterTabulated values (the wedge n1 >= n2 >= n3 >= 0).
PIreal(kind=R8P)parameterPi.
G2_Creal(kind=R8P)parameterG2 = P8 / r^13 coefficients.
G3_Creal(kind=R8P)parameterG3 = P12 / r^19 coefficients.
LGF_TABLEreal(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

NameTypeIntentAttributesDescription
ninteger(kind=I4P)inLattice offset.

Call graph