29 use,
intrinsic :: iso_fortran_env
63 integer,
public,
parameter :: &
64 POISSON_FFT_KERNEL_NONE = -1, &
74 type(fourier_space_op_t) :: coulb
76 real(real64) :: soft_coulb_param
79 real(real64),
parameter :: TOL_VANISHING_Q = 1e-6_real64
82 subroutine poisson_fft_init(this, namespace, space, cube, kernel, soft_coulb_param, fullcube)
83 type(poisson_fft_t),
intent(out) :: this
84 type(namespace_t),
intent(in) :: namespace
85 class(space_t),
intent(in) :: space
86 type(cube_t),
intent(inout) :: cube
87 integer,
intent(in) :: kernel
88 real(real64),
optional,
intent(in) :: soft_coulb_param
89 type(cube_t),
optional,
intent(in) :: fullcube
91 real(real64) :: qvector(1:space%dim)
98 call this%coulb%init(space, qvector,
cam_null)
106 type(namespace_t),
intent(in) :: namespace
107 class(space_t),
intent(in) :: space
108 type(cube_t),
intent(in) :: cube
109 type(fourier_space_op_t),
intent(inout) :: coulb
110 integer,
intent(in) :: kernel
111 real(real64),
optional,
intent(in) :: soft_coulb_param
112 type(cube_t),
optional,
intent(in) :: fullcube
118 message(1) =
"The screened Coulomb potential is only implemented in 3D for PoissonFFTKernel=fft_nocut."
125 if (.not.
present(fullcube))
then
126 message(1) =
"Hockney's FFT-kernel needs cube of full unit cell "
129 if (.not.
allocated(fullcube%fft))
then
130 message(1) =
"Hockney's FFT-kernel needs PoissonSolver=fft"
137 select case (space%dim)
139 assert(
present(soft_coulb_param))
146 message(1) =
"Invalid Poisson FFT kernel for 1D."
159 message(1) =
"Invalid Poisson FFT kernel for 2D."
181 message(1) =
"Invalid Poisson FFT kernel for 3D."
191 subroutine get_cutoff(namespace, default_r_c, r_c)
193 real(real64),
intent(in) :: default_r_c
194 real(real64),
intent(out) :: r_c
205 call messages_write(
'Poisson cutoff radius is larger than cell size.', new_line = .
true.)
206 call messages_write(
'You can see electrons in neighboring cell(s).')
218 real(real64) :: singularity_term
220 real(real64) :: inv_four_mu2
233 singularity_term =
m_four *
m_pi * inv_four_mu2 * coulb%beta
237 singularity_term = coulb%singularity*coulb%alpha +
m_four *
m_pi * inv_four_mu2 * coulb%beta
239 singularity_term = coulb%singularity
273 type(
cube_t),
intent(in) :: cube
276 integer :: n1, n2, n3, lx, ly, lz, i
277 real(real64) :: modg2, modgyz, beta, modg2_cutoff, inv_four_mu2, ecut
278 real(real64) :: temp(3), diag_temp(3, 3), metric(3, 3), a(3, 3)
279 real(real64) :: q1, q2, q3, ux, uy, uz, a11, two_a12, two_a13, a22, two_a23, a33, four_a11
280 real(real64) :: singularity_term
281 real(real64),
allocatable :: fft_coulb_fs(:,:,:)
291 n1 = max(1, cube%fs_n(1))
292 n2 = max(1, cube%fs_n(2))
293 n3 = max(1, cube%fs_n(3))
299 safe_allocate(fft_coulb_fs(1:n1, 1:n2, 1:n3))
306 metric = matmul(transpose(cube%latt%klattice_primitive), cube%latt%klattice_primitive)
311 diag_temp(i, i) = temp(i)
313 a = matmul(diag_temp, matmul(metric, diag_temp))
317 two_a12 =
m_two * a(1, 2)
318 two_a13 =
m_two * a(1, 3)
319 two_a23 =
m_two * a(2, 3)
326 modg2_cutoff =
m_two * ecut * 1.001_real64
330 uz = real(cube%fs_ifz(lz), real64) + q3
333 uy = real(cube%fs_ify(ly), real64) + q2
334 modgyz = a22*uy*uy + two_a23*uy*uz + a33*uz*uz
335 beta = two_a12*uy + two_a13*uz
336 if (modgyz - beta * beta / four_a11 > modg2_cutoff)
then
337 fft_coulb_fs(1:n1, ly, lz) =
m_zero
342 ux = real(cube%fs_ifx(lx), real64) + q1
344 modg2 = (a11*ux + beta)*ux + modgyz
346 if (modg2 > modg2_cutoff)
then
347 fft_coulb_fs(lx, ly, lz) =
m_zero
348 else if (modg2 > tol_vanishing_q)
then
352 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2 * (coulb%alpha - coulb%beta *
expm1(-modg2*inv_four_mu2))
354 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2 * coulb%beta * (-
expm1(-modg2 * inv_four_mu2))
358 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2 * coulb%alpha
360 fft_coulb_fs(lx, ly, lz) =
m_four *
m_pi / modg2
364 fft_coulb_fs(lx, ly, lz) = singularity_term
371 call coulb%dset_op(cube, op_move = fft_coulb_fs)
373 safe_deallocate_a(fft_coulb_fs)
385 type(
cube_t),
intent(in) :: cube
387 type(
cube_t),
intent(in) :: fullcube
389 integer :: ix, iy, iz, ixx(3), db(3), nfs(3), nrs(3), nfs_s(3), nrs_s(3), dnrs(3)
390 real(real64) :: temp(3), modg2, weight
391 real(real64) :: gg(3)
392 real(real64),
allocatable :: fft_Coulb_small_RS(:,:,:,:)
393 real(real64),
allocatable :: fft_Coulb_RS(:,:,:,:)
394 complex(real64),
allocatable :: fft_Coulb_small_FS(:,:,:,:)
395 complex(real64),
allocatable :: fft_Coulb_FS(:,:,:,:)
396 integer,
parameter :: howmany = 1
401 assert(cube%batch_capacity == 1)
402 assert(fullcube%batch_capacity == 1)
405 nfs(1:3) = fullcube%fs_n_global(1:3)
406 nrs(1:3) = fullcube%rs_n_global(1:3)
408 safe_allocate(fft_coulb_fs(1:nfs(1),1:nfs(2),1:nfs(3), 1:howmany))
409 safe_allocate(fft_coulb_rs(1:nrs(1),1:nrs(2),1:nrs(3), 1:howmany))
412 nfs_s(1:3) = cube%fs_n_global(1:3)
413 nrs_s(1:3) = cube%rs_n_global(1:3)
415 safe_allocate(fft_coulb_small_fs(1:nfs_s(1),1:nfs_s(2),1:nfs_s(3), 1:howmany))
416 safe_allocate(fft_coulb_small_rs(1:nrs_s(1),1:nrs_s(2),1:nrs_s(3), 1:howmany))
421 db(1:3) = fullcube%rs_n_global(1:3)
422 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
433 if (abs(modg2) > tol_vanishing_q)
then
434 fft_coulb_fs(ix, iy, iz, 1) =
m_one/modg2
436 fft_coulb_fs(ix, iy, iz, 1) =
m_zero
444 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
449 fft_coulb_fs(ix, iy, iz, 1) = weight*fft_coulb_fs(ix, iy, iz, 1)
464 if (iz > nrs_s(3)/2+1) ixx(3) = ixx(3) + dnrs(3)
467 if (iy > nrs_s(2)/2+1) ixx(2) = ixx(2) + dnrs(2)
470 if (ix > nrs_s(1)/2+1) ixx(1) = ixx(1) + dnrs(1)
471 fft_coulb_small_rs(ix, iy, iz, 1) = fft_coulb_rs(ixx(1),ixx(2),ixx(3), 1)
476 call dfft_forward(cube%fft, fft_coulb_small_rs, fft_coulb_small_fs)
478 fft_coulb_small_rs(1:nfs_s(1),1:nfs_s(2),1:nfs_s(3),1:howmany) = &
479 real( fft_Coulb_small_FS(1:nfs_s(1),1:nfs_s(2),1:nfs_s(3),1:howmany), real64)
484 call coulb%dset_op(cube, &
485 fft_coulb_small_rs(cube%fs_istart(1):cube%fs_istart(1)+cube%fs_n(1), &
486 cube%fs_istart(2):cube%fs_istart(2)+cube%fs_n(2), &
487 cube%fs_istart(3):cube%fs_istart(3)+cube%fs_n(3), 1))
489 safe_deallocate_a(fft_coulb_fs)
490 safe_deallocate_a(fft_coulb_rs)
491 safe_deallocate_a(fft_coulb_small_fs)
492 safe_deallocate_a(fft_coulb_small_rs)
502 type(
cube_t),
intent(in) :: cube
505 integer :: ix, iy, iz, ixx(3), db(3)
506 integer :: lx, ly, lz, n1, n2, n3
507 real(real64) :: temp(3), modg2, ecut, weight
508 real(real64) :: gpar, gz, r_c, gg(3), default_r_c
509 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
513 db(1:3) = cube%rs_n_global(1:3)
518 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
532 default_r_c = db(3)*cube%spacing(3)/
m_two
535 n1 = max(1, cube%fs_n(1))
536 n2 = max(1, cube%fs_n(2))
537 n3 = max(1, cube%fs_n(3))
539 safe_allocate(fft_coulb_fs(1:n1, 1:n2, 1:n3))
542 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
547 iz = cube%fs_istart(3) + lz - 1
550 iy = cube%fs_istart(2) + ly - 1
553 ix = cube%fs_istart(1) + lx - 1
558 if(sum(gg(1:2)**2) >
m_two*ecut*1.001_real64) cycle
560 if (abs(modg2) > tol_vanishing_q)
then
562 gpar =
hypot(gg(1), gg(2))
566 fft_coulb_fs(lx, ly, lz) = -
m_half*r_c**2
568 fft_coulb_fs(lx, ly, lz) = weight*fft_coulb_fs(lx, ly, lz)
574 call coulb%dset_op(cube, op_move = fft_coulb_fs)
576 safe_deallocate_a(fft_coulb_fs)
586 class(
space_t),
intent(in) :: space
587 type(
cube_t),
intent(in) :: cube
591 real(real64),
allocatable :: x(:), y(:)
592 integer :: ix, iy, iz, ixx(3), db(3), k, ngp
593 integer :: lx, ly, lz, n1, n2, n3, lxx(3)
594 real(real64) :: temp(3), modg2, xmax, weight
595 real(real64) :: gperp, gx, gy, gz, r_c, gg(3), default_r_c
596 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
603 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
606 db(1:3) = cube%rs_n_global(1:3)
608 default_r_c = maxval(db(2:3)*cube%spacing(2:3)/
m_two)
611 n1 = max(1, cube%fs_n(1))
612 n2 = max(1, cube%fs_n(2))
613 n3 = max(1, cube%fs_n(3))
615 safe_allocate(fft_coulb_fs(1:n1, 1:n2, 1:n3))
618 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
620 if (.not. space%is_periodic())
then
622 safe_allocate(x(1:ngp))
623 safe_allocate(y(1:ngp))
629 ix = cube%fs_istart(1) + lx - 1
631 lxx(1) = ixx(1) - cube%fs_istart(1) + 1
634 if (.not. space%is_periodic())
then
636 xmax = norm2(temp(2:3)*db(2:3))/2
638 x(k) = (k-1)*(xmax/(ngp-1))
640 maxval(norm2(cube%latt%rlattice_primitive(:, 2:3), dim=1)))
646 iy = cube%fs_istart(2) + ly - 1
648 lxx(2) = ixx(2) - cube%fs_istart(2) + 1
650 iz = cube%fs_istart(3) + lz - 1
652 lxx(3) = ixx(3) - cube%fs_istart(3) + 1
656 if (abs(modg2) > tol_vanishing_q)
then
657 gperp =
hypot(gg(2), gg(3))
658 if (space%periodic_dim == 1)
then
659 if (gperp > r_c)
then
660 fft_coulb_fs(lx, ly, lz) =
m_zero
664 else if (.not. space%is_periodic())
then
668 fft_coulb_fs(lx, ly, lz) =
spline_eval(cylinder_cutoff_f, gperp)
671 fft_coulb_fs(lx, ly, lz) = fft_coulb_fs(lx, -lxx(2) + 1, lz)
674 fft_coulb_fs(lx, ly, lz) = fft_coulb_fs(lx, ly, -lxx(3) + 1)
677 fft_coulb_fs(lx, ly, lz) = fft_coulb_fs(lx, -lxx(2) + 1, -lxx(3) + 1)
682 if (space%periodic_dim == 1)
then
684 else if (.not. space%is_periodic())
then
686 norm2(cube%latt%rlattice_primitive(:, 1)), maxval(norm2(cube%latt%rlattice_primitive(:, 2:3), dim=1)))
690 fft_coulb_fs(lx, ly, lz) = weight*fft_coulb_fs(lx, ly, lz)
694 if (.not. space%is_periodic())
then
699 call coulb%dset_op(cube, op_move = fft_coulb_fs)
701 safe_deallocate_a(fft_coulb_fs)
713 type(
cube_t),
intent(in) :: cube
714 integer,
intent(in) :: kernel
716 logical,
intent(in) :: is_periodic
718 integer :: ix, iy, iz, ixx(3), db(3), lx, ly, lz, n1, n2, n3
719 real(real64) :: temp(3), modg2, ecut, weight
720 real(real64) :: r_c, gg(3), default_r_c
721 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
722 real(real64) :: axis(3,3)
729 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
732 db(1:3) = cube%rs_n_global(1:3)
738 axis(:,ix) = cube%latt%rlattice_primitive(:, ix) * cube%spacing(ix) * db(ix) /
m_two
747 if (.not. cube%latt%nonorthogonal)
then
748 temp(1:3) = axis(:, ix)
749 default_r_c = min(default_r_c, norm2(temp(1:3)))
758 temp = temp / norm2(temp)
759 default_r_c = min(default_r_c, dot_product(temp, axis(:, ix)-axis(:, iy)))
765 n1 = max(1, cube%fs_n(1))
766 n2 = max(1, cube%fs_n(2))
767 n3 = max(1, cube%fs_n(3))
771 safe_allocate(fft_coulb_fs(1:n1,1:n2,1:n3))
774 temp(1:3) =
m_two*
m_pi/(db(1:3)*cube%spacing(1:3))
779 iz = cube%fs_istart(3) + lz - 1
782 iy = cube%fs_istart(2) + ly - 1
785 ix = cube%fs_istart(1) + lx - 1
791 if(modg2 >
m_two*ecut*1.001_real64 .and. is_periodic) cycle
793 if (abs(modg2) > tol_vanishing_q)
then
798 fft_coulb_fs(lx, ly, lz) = weight/modg2
803 fft_coulb_fs(lx, ly, lz) = weight*r_c**2/
m_two
805 fft_coulb_fs(lx, ly, lz) =
m_zero
814 safe_deallocate_a(fft_coulb_fs)
824 type(
cube_t),
intent(in) :: cube
828 integer :: i, ix, iy, ixx(2), db(2), npoints
829 real(real64) :: temp(2), vec, r_c, maxf, dk, default_r_c, weight
830 real(real64),
allocatable :: x(:), y(:)
831 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
838 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
840 db(1:2) = cube%rs_n_global(1:2)
842 default_r_c = maxval(db(1:2)*cube%spacing(1:2)/
m_two)
848 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
850 temp(1:2) =
m_two*
m_pi/(db(1:2)*cube%spacing(1:2))
852 maxf = r_c * norm2(temp(1:2)*db(1:2))/2
854 npoints = nint(maxf/dk)
855 safe_allocate(x(1:npoints))
856 safe_allocate(y(1:npoints))
860 x(i) = (i-1) * maxf / (npoints-1)
865 do iy = 1, cube%fs_n_global(2)
867 do ix = 1, cube%fs_n_global(1)
869 vec = norm2(temp(1:2)*ixx(1:2))
871 if (vec*r_c >= x(npoints))
then
872 fft_coulb_fs(ix, iy, 1) = weight * y(npoints)
873 else if (vec >
m_zero)
then
876 fft_coulb_fs(ix, iy, 1) = weight *
m_two *
m_pi * r_c
881 call coulb%dset_op(cube, op_move = fft_coulb_fs)
883 safe_deallocate_a(fft_coulb_fs)
896 type(
cube_t),
intent(in) :: cube
899 integer :: ix, iy, ixx(2), db(2)
900 real(real64) :: temp(2), r_c, gx, gy, default_r_c, weight
901 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
908 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
911 db(1:2) = cube%rs_n_global(1:2)
913 default_r_c = db(2)*cube%spacing(2)/
m_two
917 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
919 temp(1:2) =
m_two*
m_pi/(db(1:2)*cube%spacing(1:2))
923 do iy = 2, cube%fs_n_global(2)
929 do ix = 2, cube%fs_n_global(1)
932 do iy = 1, cube%fs_n_global(2)
939 call coulb%dset_op(cube, op_move = fft_coulb_fs)
941 safe_deallocate_a(fft_coulb_fs)
951 type(
cube_t),
intent(in) :: cube
954 integer :: ix, iy, ixx(2), db(2)
955 real(real64) :: temp(2), vec, weight
956 real(real64),
allocatable :: fft_coulb_FS(:,:,:)
963 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
965 db(1:2) = cube%rs_n_global(1:2)
968 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
970 temp(1:2) =
m_two*
m_pi/(db(1:2)*cube%spacing(1:2))
972 do iy = 1, cube%fs_n_global(2)
974 do ix = 1, cube%fs_n_global(1)
976 vec =
sqrt((temp(1) * ixx(1))**2 + (temp(2) * ixx(2))**2)
977 if (vec >
m_zero) fft_coulb_fs(ix, iy, 1) =
m_two *
m_pi / vec * weight
981 call coulb%dset_op(cube, op_move = fft_coulb_fs)
983 safe_deallocate_a(fft_coulb_fs)
991 type(
cube_t),
intent(in) :: cube
993 real(real64),
intent(in) :: poisson_soft_coulomb_param
996 real(real64) :: g, weight
997 real(real64),
allocatable :: fft_coulb_fs(:, :, :)
1004 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
1006 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
1010 do ix = 1, cube%fs_n_global(1)
1012 g = (ixx + coulb%qq(1))*
m_two*
m_pi/abs(cube%latt%rlattice(1,1))
1013 if (abs(g) > tol_vanishing_q)
then
1014 fft_coulb_fs(ix, 1, 1) =
m_two *
loct_bessel_k0(poisson_soft_coulomb_param*abs(g)) * weight
1016 fft_coulb_fs(ix, 1, 1) = coulb%singularity *
m_two * weight
1020 call coulb%dset_op(cube, op_move = fft_coulb_fs)
1021 safe_deallocate_a(fft_coulb_fs)
1031 type(
cube_t),
intent(in) :: cube
1033 real(real64),
intent(in) :: poisson_soft_coulomb_param
1035 integer :: box(1), ixx(1), ix
1036 real(real64) :: temp(1), g, r_c, default_r_c, weight
1037 real(real64),
allocatable :: fft_coulb_fs(:, :, :)
1044 if(coulb%alpha >
m_epsilon) weight = weight * coulb%alpha
1046 box(1:1) = cube%rs_n_global(1:1)
1048 default_r_c = box(1)*cube%spacing(1)/
m_two
1051 safe_allocate(fft_coulb_fs(1:cube%fs_n_global(1), 1:cube%fs_n_global(2), 1:cube%fs_n_global(3)))
1053 temp(1:1) =
m_two*
m_pi/(box(1:1)*cube%spacing(1:1))
1056 do ix = 1, cube%fs_n_global(1)
1062 call coulb%dset_op(cube, op_move = fft_coulb_fs)
1063 safe_deallocate_a(fft_coulb_fs)
1076 call this%coulb%end()
1083#include "poisson_fft_inc.F90"
1085#include "complex.F90"
1086#include "poisson_fft_inc.F90"
1089#include "real32.F90"
1090#include "poisson_fft_inc.F90"
1092#include "complex32.F90"
1093#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__
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 .
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.
real(real64) function poisson_fft_singularity_3d(coulb)
Define the singularity correction for |q+G| = 0, for the 3D Coulomb kernel.
integer, parameter, public poisson_fft_kernel_nocut
subroutine, public spoisson_fft_solve_batch(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm, pot_buffer, rho_buffer, count)
subroutine, public spoisson_fft_solve(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm)
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, public cpoisson_fft_solve_batch(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm, pot_buffer, rho_buffer, count)
subroutine, public cpoisson_fft_solve(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm)
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
type(xc_cam_t), parameter, public cam_null
All CAM parameters set to zero.
Definition of a Fourier Space Coulomb Kernel.
the basic spline datatype