Octopus
double_grid.F90 File Reference

Go to the source code of this file.

Modules

module  double_grid_oct_m
 The Ono-Hirose double-grid technique [T. Ono and K. Hirose, Phys. Rev. Lett. 82, 5016 (1999); Phys. Rev. B 72, 085115 (2005)].
 

Data Types

type  double_grid_oct_m::double_grid_t
 

Functions/Subroutines

subroutine, public double_grid_oct_m::double_grid_init (this, namespace, dim)
 
subroutine, public double_grid_oct_m::double_grid_end (this)
 
real(real64) function, public double_grid_oct_m::double_grid_margin (this, mesh)
 Submesh radius enlargement needed to contain the effective support of a transformed function: the tensor-product scatter reaches less than interp_max coarse points along each axis beyond the original support, i.e. at most interp_max times the longest cell diagonal. More...
 
subroutine, public double_grid_oct_m::double_grid_transform (this, sm, nf, spl, ll, mm, rcut, feff, cart_dir)
 Evaluate a batch of localized functions f_jf(x) = spl_jf(r) * Y_{ll,mm}(x) (or a purely radial spl_jf(r) when ll(jf) == -1, e.g. local potentials and core densities) at the points of a submesh. When the double grid is disabled this is a plain evaluation at the submesh points; when enabled, the effective (interpolation-transpose folded) values are returned. The functions vanish for r > rcut(jf); the effective support then extends up to rcut(jf) + double_grid_margin, which the submesh radius must contain. If cart_dir(jf) > 0, the function is further multiplied by the Cartesian component cart_dir(jf) of the position relative to the center. More...
 
subroutine double_grid_oct_m::double_grid_transform_kernel (this, sm, nf, spl, ll, mm, rcut, cdir, feff)
 The transpose-interpolation scatter. All arithmetic is done with integer grid keys relative to the first local submesh point: uniform meshes are integer lattices in the primitive (chi) coordinates, so key(ip) = nint(from_cartesian(rel_x(ip) - rel_x(1))/spacing) is exact, and is unique per (mesh point, periodic replica) within the submesh. Fine points are visited per anchor site (a coarse site of the expanded key bounding box) and offset; their analytic values are scattered to the stencil sites, resolved back to submesh points by a dense key lookup. Scatter targets outside the local submesh are dropped (they belong to another domain or lie outside the box); the submesh radius includes double_grid_margin, so no target is lost at the sphere boundary. More...
 
subroutine scatter_anchor (ia1, ia2, ia3, ig1, ig2, accg, fout)
 Scatter the fine points around the anchor site (ia1, ia2, ia3) of the function groups ig1:ig2 (accelerators accg(1:ig2-ig1+1)) into fout. More...
 

Function/Subroutine Documentation

◆ scatter_anchor()

subroutine double_grid_transform_kernel::scatter_anchor ( integer, intent(in)  ia1,
integer, intent(in)  ia2,
integer, intent(in)  ia3,
integer, intent(in)  ig1,
integer, intent(in)  ig2,
type(c_ptr), dimension(:), intent(in)  accg,
real(real64), dimension(:, :), intent(inout)  fout 
)
private

Scatter the fine points around the anchor site (ia1, ia2, ia3) of the function groups ig1:ig2 (accelerators accg(1:ig2-ig1+1)) into fout.

Definition at line 557 of file double_grid.F90.