29 use,
intrinsic :: iso_fortran_env
58 integer,
public,
parameter :: &
59 POISSON_FFT_KERNEL_NONE = -1, &
69 type(fourier_space_op_t) :: coulb
71 real(real64) :: soft_coulb_param
74 real(real64),
parameter :: TOL_VANISHING_Q = 1e-6_real64
77 subroutine poisson_fft_init(this, namespace, space, cube, kernel, soft_coulb_param, fullcube)
78 type(poisson_fft_t),
intent(out) :: this
79 type(namespace_t),
intent(in) :: namespace
80 class(space_t),
intent(in) :: space
81 type(cube_t),
intent(inout) :: cube
82 integer,
intent(in) :: kernel
83 real(real64),
optional,
intent(in) :: soft_coulb_param
84 type(cube_t),
optional,
intent(in) :: fullcube
91 safe_allocate(this%coulb%qq(1:space%dim))
92 this%coulb%qq(1:space%periodic_dim) =
m_zero
93 this%coulb%qq(space%periodic_dim+1:space%dim) = 1e-5_real64
94 this%coulb%singularity =
m_zero
105 type(namespace_t),
intent(in) :: namespace
106 class(space_t),
intent(in) :: space
107 type(cube_t),
intent(in) :: cube
108 type(fourier_space_op_t),
intent(inout) :: coulb
109 integer,
intent(in) :: kernel
110 real(real64),
optional,
intent(in) :: soft_coulb_param
111 type(cube_t),
optional,
intent(in) :: fullcube
117 message(1) =
"The screened Coulomb potential is only implemented in 3D for PoissonFFTKernel=fft_nocut."
124 if (.not.
present(fullcube))
then
125 message(1) =
"Hockney's FFT-kernel needs cube of full unit cell "
128 if (.not.
allocated(fullcube%fft))
then
129 message(1) =
"Hockney's FFT-kernel needs PoissonSolver=fft"
136 select case (space%dim)
138 assert(
present(soft_coulb_param))
145 message(1) =
"Invalid Poisson FFT kernel for 1D."
158 message(1) =
"Invalid Poisson FFT kernel for 2D."
180 message(1) =
"Invalid Poisson FFT kernel for 3D."
190 subroutine get_cutoff(namespace, default_r_c, r_c)
192 real(real64),
intent(in) :: default_r_c
193 real(real64),
intent(out) :: r_c
204 call messages_write(
'Poisson cutoff radius is larger than cell size.', new_line = .
true.)
205 call messages_write(
'You can see electrons in neighboring cell(s).')
238 type(
cube_t),
intent(in) :: cube
241 integer :: n1, n2, n3, lx, ly, lz, i
242 real(real64) :: modg2, modgyz, beta, modg2_cutoff, inv_four_mu2, ecut
243 real(real64) :: temp(3), diag_temp(3, 3), metric(3, 3), a(3, 3)
244 real(real64) :: q1, q2, q3, ux, uy, uz, a11, two_a12, two_a13, a22, two_a23, a33, four_a11
245 real(real64) :: singularity_term
246 real(real64),
allocatable :: fft_coulb_fs(:,:,:)
256 n1 = max(1, cube%fs_n(1))
257 n2 = max(1, cube%fs_n(2))
258 n3 = max(1, cube%fs_n(3))
264 singularity_term =
m_four *
m_pi * inv_four_mu2 * coulb%beta
268 singularity_term = coulb%singularity*coulb%alpha +
m_four*
m_pi*inv_four_mu2 * coulb%beta
270 singularity_term = coulb%singularity
276 safe_allocate(fft_coulb_fs(1:n1, 1:n2, 1:n3))
279 temp(1:3) =
m_two *
m_pi / (cube%rs_n_global(1:3) * cube%spacing(1:3))
283 metric = matmul(transpose(cube%latt%klattice_primitive), cube%latt%klattice_primitive)
288 diag_temp(i, i) = temp(i)
290 a = matmul(diag_temp, matmul(metric, diag_temp))
294 two_a12 =
m_two * a(1, 2)
295 two_a13 =
m_two * a(1, 3)
296 two_a23 =
m_two * a(2, 3)
303 modg2_cutoff =
m_two * ecut * 1.001_real64
307 uz = real(cube%fs_ifz(lz), real64) + q3
310 uy = real(cube%fs_ify(ly), real64) + q2
311 modgyz = a22*uy*uy + two_a23*uy*uz + a33*uz*uz
312 beta = two_a12*uy + two_a13*uz
313 if (modgyz - beta * beta / four_a11 > modg2_cutoff)
then
314 fft_coulb_fs(1:n1, ly, lz) =
m_zero
319 ux = real(cube%fs_ifx(lx), real64) + q1
321 modg2 = (a11*ux + beta)*ux + modgyz
323 if (modg2 > modg2_cutoff)
then
324 fft_coulb_fs(lx, ly, lz) =
m_zero
325 else if (modg2 > tol_vanishing_q)
then
329 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2 * (coulb%alpha + coulb%beta *
exp(-modg2*inv_four_mu2))
331 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2 * coulb%beta * (-
expm1(-modg2 * inv_four_mu2))
335 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2 * coulb%alpha
337 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2
341 fft_coulb_fs(lx, ly, lz) = singularity_term
350 safe_deallocate_a(fft_coulb_fs)
362 type(
cube_t),
intent(in) :: cube
364 type(
cube_t),
intent(in) :: fullcube
366 integer :: ix, iy, iz, ixx(3), db(3), nfs(3), nrs(3), nfs_s(3), nrs_s(3), dnrs(3)
367 real(real64) :: temp(3), modg2, weight
368 real(real64) :: gg(3)
369 real(real64),
allocatable :: fft_Coulb_small_RS(:,:,:,:)
370 real(real64),
allocatable :: fft_Coulb_RS(:,:,:,:)
371 complex(real64),
allocatable :: fft_Coulb_small_FS(:,:,:,:)
372 complex(real64),
allocatable :: fft_Coulb_FS(:,:,:,:)
373 integer,
parameter :: howmany = 1
378 assert(cube%batch_capacity == 1)
379 assert(fullcube%batch_capacity == 1)
382 nfs(1:3) = fullcube%fs_n_global(1:3)
383 nrs(1:3) = fullcube%rs_n_global(1:3)
385 safe_allocate(fft_coulb_fs(1:nfs(1),1:nfs(2),1:nfs(3), 1:howmany))
386 safe_allocate(fft_coulb_rs(1:nrs(1),1:nrs(2),1:nrs(3), 1:howmany))
389 nfs_s(1:3) = cube%fs_n_global(1:3)
390 nrs_s(1:3) = cube%rs_n_global(1:3)
392 safe_allocate(fft_coulb_small_fs(1:nfs_s(1),1:nfs_s(2),1:nfs_s(3), 1:howmany))
393 safe_allocate(fft_coulb_small_rs(1:nrs_s(1),1:nrs_s(2),1:nrs_s(3), 1:howmany))
398 db(1:3) = fullcube%rs_n_global(1:3)
399 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
410 if (abs(modg2) > tol_vanishing_q)
then
411 fft_coulb_fs(ix, iy, iz, 1) =
m_one/modg2
413 fft_coulb_fs(ix, iy, iz, 1) =
m_zero
421 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
426 fft_coulb_fs(ix, iy, iz, 1) = weight*fft_coulb_fs(ix, iy, iz, 1)
441 if (iz > nrs_s(3)/2+1) ixx(3) = ixx(3) + dnrs(3)
444 if (iy > nrs_s(2)/2+1) ixx(2) = ixx(2) + dnrs(2)
447 if (ix > nrs_s(1)/2+1) ixx(1) = ixx(1) + dnrs(1)
448 fft_coulb_small_rs(ix, iy, iz, 1) = fft_coulb_rs(ixx(1),ixx(2),ixx(3), 1)
453 call dfft_forward(cube%fft, fft_coulb_small_rs, fft_coulb_small_fs)
455 fft_coulb_small_rs(1:nfs_s(1),1:nfs_s(2),1:nfs_s(3),1:howmany) = &
456 real( fft_Coulb_small_FS(1:nfs_s(1),1:nfs_s(2),1:nfs_s(3),1:howmany), real64)
462 fft_coulb_small_rs(cube%fs_istart(1):cube%fs_istart(1)+cube%fs_n(1), &
463 cube%fs_istart(2):cube%fs_istart(2)+cube%fs_n(2), &
464 cube%fs_istart(3):cube%fs_istart(3)+cube%fs_n(3), 1))
466 safe_deallocate_a(fft_coulb_fs)
467 safe_deallocate_a(fft_coulb_rs)
468 safe_deallocate_a(fft_coulb_small_fs)
469 safe_deallocate_a(fft_coulb_small_rs)
479 type(
cube_t),
intent(in) :: cube
482 integer :: ix, iy, iz, ixx(3), db(3)
483 integer :: lx, ly, lz, n1, n2, n3
484 real(real64) :: temp(3), modg2, ecut, weight
485 real(real64) :: gpar, gz, r_c, gg(3), default_r_c
486 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
490 db(1:3) = cube%rs_n_global(1:3)
495 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
509 default_r_c = db(3)*cube%spacing(3)/
m_two
512 n1 = max(1, cube%fs_n(1))
513 n2 = max(1, cube%fs_n(2))
514 n3 = max(1, cube%fs_n(3))
516 safe_allocate(fft_coulb_fs(1:n1, 1:n2, 1:n3))
519 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
524 iz = cube%fs_istart(3) + lz - 1
527 iy = cube%fs_istart(2) + ly - 1
530 ix = cube%fs_istart(1) + lx - 1
535 if(sum(gg(1:2)**2) >
m_two*ecut*1.001_real64) cycle
537 if (abs(modg2) > tol_vanishing_q)
then
539 gpar =
hypot(gg(1), gg(2))
543 fft_coulb_fs(lx, ly, lz) = -
m_half*r_c**2
545 fft_coulb_fs(lx, ly, lz) = weight*fft_coulb_fs(lx, ly, lz)
553 safe_deallocate_a(fft_coulb_fs)
563 class(
space_t),
intent(in) :: space
564 type(
cube_t),
intent(in) :: cube
568 real(real64),
allocatable :: x(:), y(:)
569 integer :: ix, iy, iz, ixx(3), db(3), k, ngp
570 integer :: lx, ly, lz, n1, n2, n3, lxx(3)
571 real(real64) :: temp(3), modg2, xmax, weight
572 real(real64) :: gperp, gx, gy, gz, r_c, gg(3), default_r_c
573 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
580 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
583 db(1:3) = cube%rs_n_global(1:3)
585 default_r_c = maxval(db(2:3)*cube%spacing(2:3)/
m_two)
588 n1 = max(1, cube%fs_n(1))
589 n2 = max(1, cube%fs_n(2))
590 n3 = max(1, cube%fs_n(3))
592 safe_allocate(fft_coulb_fs(1:n1, 1:n2, 1:n3))
595 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
597 if (.not. space%is_periodic())
then
599 safe_allocate(x(1:ngp))
600 safe_allocate(y(1:ngp))
606 ix = cube%fs_istart(1) + lx - 1
608 lxx(1) = ixx(1) - cube%fs_istart(1) + 1
611 if (.not. space%is_periodic())
then
613 xmax = norm2(temp(2:3)*db(2:3))/2
615 x(k) = (k-1)*(xmax/(ngp-1))
617 maxval(norm2(cube%latt%rlattice_primitive(:, 2:3), dim=1)))
623 iy = cube%fs_istart(2) + ly - 1
625 lxx(2) = ixx(2) - cube%fs_istart(2) + 1
627 iz = cube%fs_istart(3) + lz - 1
629 lxx(3) = ixx(3) - cube%fs_istart(3) + 1
633 if (abs(modg2) > tol_vanishing_q)
then
634 gperp =
hypot(gg(2), gg(3))
635 if (space%periodic_dim == 1)
then
636 if (gperp > r_c)
then
637 fft_coulb_fs(lx, ly, lz) =
m_zero
641 else if (.not. space%is_periodic())
then
645 fft_coulb_fs(lx, ly, lz) =
spline_eval(cylinder_cutoff_f, gperp)
648 fft_coulb_fs(lx, ly, lz) = fft_coulb_fs(lx, -lxx(2) + 1, lz)
651 fft_coulb_fs(lx, ly, lz) = fft_coulb_fs(lx, ly, -lxx(3) + 1)
654 fft_coulb_fs(lx, ly, lz) = fft_coulb_fs(lx, -lxx(2) + 1, -lxx(3) + 1)
659 if (space%periodic_dim == 1)
then
661 else if (.not. space%is_periodic())
then
663 norm2(cube%latt%rlattice_primitive(:, 1)), maxval(norm2(cube%latt%rlattice_primitive(:, 2:3), dim=1)))
667 fft_coulb_fs(lx, ly, lz) = weight*fft_coulb_fs(lx, ly, lz)
671 if (.not. space%is_periodic())
then
678 safe_deallocate_a(fft_coulb_fs)
690 type(
cube_t),
intent(in) :: cube
691 integer,
intent(in) :: kernel
693 logical,
intent(in) :: is_periodic
695 integer :: ix, iy, iz, ixx(3), db(3), lx, ly, lz, n1, n2, n3
696 real(real64) :: temp(3), modg2, ecut, weight
697 real(real64) :: r_c, gg(3), default_r_c
698 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
699 real(real64) :: axis(3,3)
706 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
709 db(1:3) = cube%rs_n_global(1:3)
715 axis(:,ix) = cube%latt%rlattice_primitive(:, ix) * cube%spacing(ix) * db(ix) /
m_two
724 if (.not. cube%latt%nonorthogonal)
then
725 temp(1:3) = axis(:, ix)
726 default_r_c = min(default_r_c, norm2(temp(1:3)))
735 temp = temp / norm2(temp)
736 default_r_c = min(default_r_c, dot_product(temp, axis(:, ix)-axis(:, iy)))
742 n1 = max(1, cube%fs_n(1))
743 n2 = max(1, cube%fs_n(2))
744 n3 = max(1, cube%fs_n(3))
748 safe_allocate(fft_coulb_fs(1:n1,1:n2,1:n3))
751 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
756 iz = cube%fs_istart(3) + lz - 1
759 iy = cube%fs_istart(2) + ly - 1
762 ix = cube%fs_istart(1) + lx - 1
768 if(modg2 >
m_two*ecut*1.001_real64 .and. is_periodic) cycle
770 if (abs(modg2) > tol_vanishing_q)
then
775 fft_coulb_fs(lx, ly, lz) = weight/modg2
780 fft_coulb_fs(lx, ly, lz) = weight*r_c**2/
m_two
782 fft_coulb_fs(lx, ly, lz) =
m_zero
791 safe_deallocate_a(fft_coulb_fs)
801 type(
cube_t),
intent(in) :: cube
805 integer :: i, ix, iy, ixx(2), db(2), npoints
806 real(real64) :: temp(2), vec, r_c, maxf, dk, default_r_c, weight
807 real(real64),
allocatable :: x(:), y(:)
808 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
815 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
817 db(1:2) = cube%rs_n_global(1:2)
819 default_r_c = maxval(db(1:2)*cube%spacing(1:2)/
m_two)
825 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
827 temp(1:2) =
m_two*
m_pi/(db(1:2)*cube%spacing(1:2))
829 maxf = r_c * norm2(temp(1:2)*db(1:2))/2
831 npoints = nint(maxf/dk)
832 safe_allocate(x(1:npoints))
833 safe_allocate(y(1:npoints))
837 x(i) = (i-1) * maxf / (npoints-1)
842 do iy = 1, cube%fs_n_global(2)
844 do ix = 1, cube%fs_n_global(1)
846 vec = norm2(temp(1:2)*ixx(1:2))
848 if (vec*r_c >= x(npoints))
then
849 fft_coulb_fs(ix, iy, 1) = weight * y(npoints)
850 else if (vec >
m_zero)
then
853 fft_coulb_fs(ix, iy, 1) = weight *
m_two *
m_pi * r_c
860 safe_deallocate_a(fft_coulb_fs)
873 type(
cube_t),
intent(in) :: cube
876 integer :: ix, iy, ixx(2), db(2)
877 real(real64) :: temp(2), r_c, gx, gy, default_r_c, weight
878 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
885 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
888 db(1:2) = cube%rs_n_global(1:2)
890 default_r_c = db(2)*cube%spacing(2)/
m_two
894 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
896 temp(1:2) =
m_two*
m_pi/(db(1:2)*cube%spacing(1:2))
900 do iy = 2, cube%fs_n_global(2)
906 do ix = 2, cube%fs_n_global(1)
909 do iy = 1, cube%fs_n_global(2)
918 safe_deallocate_a(fft_coulb_fs)
928 type(
cube_t),
intent(in) :: cube
931 integer :: ix, iy, ixx(2), db(2)
932 real(real64) :: temp(2), vec, weight
933 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
940 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
942 db(1:2) = cube%rs_n_global(1:2)
945 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
947 temp(1:2) =
m_two*
m_pi/(db(1:2)*cube%spacing(1:2))
949 do iy = 1, cube%fs_n_global(2)
951 do ix = 1, cube%fs_n_global(1)
953 vec =
sqrt((temp(1) * ixx(1))**2 + (temp(2) * ixx(2))**2)
954 if (vec >
m_zero) fft_coulb_fs(ix, iy, 1) =
m_two *
m_pi / vec * weight
960 safe_deallocate_a(fft_coulb_fs)
968 type(
cube_t),
intent(in) :: cube
970 real(real64),
intent(in) :: poisson_soft_coulomb_param
973 real(real64) :: g, weight
974 real(real64),
allocatable :: fft_coulb_fs(:, :, :)
981 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
983 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
987 do ix = 1, cube%fs_n_global(1)
989 g = (ixx + coulb%qq(1))*
m_two*
m_pi/abs(cube%latt%rlattice(1,1))
990 if (abs(g) > tol_vanishing_q)
then
991 fft_coulb_fs(ix, 1, 1) =
m_two *
loct_bessel_k0(poisson_soft_coulomb_param*abs(g)) * weight
993 fft_coulb_fs(ix, 1, 1) = coulb%singularity *
m_two * weight
998 safe_deallocate_a(fft_coulb_fs)
1008 type(
cube_t),
intent(in) :: cube
1010 real(real64),
intent(in) :: poisson_soft_coulomb_param
1012 integer :: box(1), ixx(1), ix
1013 real(real64) :: temp(1), g, r_c, default_r_c, weight
1014 real(real64),
allocatable :: fft_coulb_fs(:, :, :)
1021 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
1023 box(1:1) = cube%rs_n_global(1:1)
1025 default_r_c = box(1)*cube%spacing(1)/
m_two
1028 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
1030 temp(1:1) =
m_two*
m_pi/(box(1:1)*cube%spacing(1:1))
1033 do ix = 1, cube%fs_n_global(1)
1040 safe_deallocate_a(fft_coulb_fs)
1060#include "poisson_fft_inc.F90"
1062#include "complex.F90"
1063#include "poisson_fft_inc.F90"
Some operations may be done for one spline-function, or for an array of them.
double hypot(double __x, double __y) __attribute__((__nothrow__
double log(double __x) __attribute__((__nothrow__
double exp(double __x) __attribute__((__nothrow__
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
real(real64) function, public fft_get_ecut_from_box(box_dim, fs_istart, latt, gspacing, periodic_dim, qq)
Given an fft box (fixed by the real-space grid), it returns the cutoff energy of the sphere that fits...
pure integer function, public pad_feq(ii, nn, mode)
convert between array index and G-vector
pure subroutine, public fft_gg_transform(gg_in, temp, periodic_dim, latt, qq, gg, modg2)
Convert FFT grid index into the Cartesian reciprocal-space vector .
subroutine, public fourier_space_op_end(this)
subroutine, public dfourier_space_op_init(this, cube, op, in_device, op_move)
The operator can be provided either through op (which is copied) or through op_move (an allocatable t...
real(real64), parameter, public m_two
real(real64), parameter, public m_huge
real(real64), parameter, public m_zero
real(real64), parameter, public m_four
real(real64), parameter, public m_pi
some mathematical constants
real(real64), parameter, public m_fourth
real(real64), parameter, public m_epsilon
real(real64), parameter, public m_half
real(real64), parameter, public m_one
This module is intended to contain "only mathematical" functions and procedures.
pure real(real64) function, dimension(1:3), public dcross_product(a, b)
This module defines the meshes, which are used in Octopus.
subroutine, public messages_warning(no_lines, all_nodes, namespace)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
real(real64) function, public poisson_cutoff_3d_2d(p, z, r)
real(real64) function, public poisson_cutoff_3d_1d(x, p, rmax)
real(real64) function, public poisson_cutoff_3d_0d(x, r)
integer, parameter, public poisson_fft_kernel_hockney
subroutine poisson_fft_build_2d_0d(namespace, cube, coulb)
A. Castro et al., Phys. Rev. B 80, 033102 (2009)
subroutine poisson_fft_build_3d_1d(namespace, space, cube, coulb)
C. A. Rozzi et al., Phys. Rev. B 73, 205119 (2006), Table I.
subroutine, public dpoisson_fft_solve_batch(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm, pot_buffer, rho_buffer, count)
subroutine poisson_fft_build_3d_2d(namespace, cube, coulb)
C. A. Rozzi et al., Phys. Rev. B 73, 205119 (2006), Table I.
integer, parameter, public poisson_fft_kernel_nocut
integer, parameter, public poisson_fft_kernel_cyl
subroutine poisson_fft_build_2d_1d(namespace, cube, coulb)
A. Castro et al., Phys. Rev. B 80, 033102 (2009)
subroutine poisson_fft_build_1d_0d(namespace, cube, coulb, poisson_soft_coulomb_param)
subroutine, public zpoisson_fft_solve(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm)
subroutine poisson_fft_build_3d_0d(namespace, cube, kernel, coulb, is_periodic)
C. A. Rozzi et al., Phys. Rev. B 73, 205119 (2006), Table I.
subroutine get_cutoff(namespace, default_r_c, r_c)
subroutine poisson_fft_build_3d_3d(cube, coulb)
Compute the Coulomb kernel in reciprocal space, for a 3D FFT grid.
subroutine poisson_fft_build_1d_1d(cube, coulb, poisson_soft_coulomb_param)
subroutine, public poisson_fft_get_kernel(namespace, space, cube, coulb, kernel, soft_coulb_param, fullcube)
subroutine, public poisson_fft_end(this)
subroutine poisson_fft_build_2d_2d(cube, coulb)
A. Castro et al., Phys. Rev. B 80, 033102 (2009)
subroutine, public poisson_fft_init(this, namespace, space, cube, kernel, soft_coulb_param, fullcube)
integer, parameter, public poisson_fft_kernel_pla
subroutine, public zpoisson_fft_solve_batch(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm, pot_buffer, rho_buffer, count)
integer, parameter, public poisson_fft_kernel_corrected
integer, parameter, public poisson_fft_kernel_sph
subroutine, public dpoisson_fft_solve(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm)
subroutine poisson_fft_build_3d_3d_hockney(cube, coulb, fullcube)
Kernel for Hockneys algorithm that solves the poisson equation in a small box while respecting the pe...
subroutine, public spline_fit(nrc, rofi, ffit, spl, threshold)
real(real64) function, public spline_eval(spl, x)
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
type(unit_system_t), public units_inp
the units systems for reading and writing
the basic spline datatype