35 use,
intrinsic :: iso_fortran_env
104 integer,
public,
parameter :: &
105 POISSON_DIRECT_SUM = -1, &
118 type(derivatives_t),
pointer,
public :: der
120 integer,
public :: kernel
121 type(cube_t),
public :: cube
122 type(mesh_cube_parallel_map_t),
public :: mesh_cube_map
123 type(poisson_mg_solver_t) :: mg
124 type(poisson_fft_t),
public :: fft_solver
125 real(real64),
public :: poisson_soft_coulomb_param
126 logical :: all_nodes_default
127 type(poisson_corr_t) :: corrector
128 type(poisson_isf_t) :: isf_solver
129 type(poisson_psolver_t) :: psolver_solver
130 type(poisson_no_t) :: no_solver
131 type(poisson_nfft_t) :: nfft_solver
133 logical,
public :: is_dressed = .false.
134 type(photon_mode_t),
public :: photons
136 type(MPI_Comm) :: intercomm
137 type(mpi_grp_t) :: local_grp
142 integer,
parameter :: &
149 subroutine poisson_init(this, namespace, space, der, mc, stencil, qtot, label, solver, verbose, force_serial, &
150 force_cmplx, fft_library, fft_batch_size, single_precision)
151 type(poisson_t),
intent(inout) :: this
152 class(space_t),
intent(in) :: space
153 type(namespace_t),
intent(in) :: namespace
154 type(derivatives_t),
target,
intent(in) :: der
155 type(multicomm_t),
intent(in) :: mc
156 type(stencil_t),
intent(in) :: stencil
157 real(real64),
optional,
intent(in) :: qtot
158 character(len=*),
optional,
intent(in) :: label
159 integer,
optional,
intent(in) :: solver
160 logical,
optional,
intent(in) :: verbose
161 logical,
optional,
intent(in) :: force_serial
162 logical,
optional,
intent(in) :: force_cmplx
163 integer,
optional,
intent(in) :: fft_library
164 integer,
optional,
intent(in) :: fft_batch_size
165 logical,
optional,
intent(in) :: single_precision
167 logical :: need_cube, isf_data_is_parallel, anisotropic_spacing
168 integer :: default_solver, default_kernel, box(space%dim), fft_type, library, fft_bs
169 real(real64) :: fft_alpha
170 character(len=60) :: str
171 real(real64),
parameter :: tol_spacing = 1e-10_real64
180 if (
present(label)) str = trim(label)
204 if (this%is_dressed)
then
205 assert(
present(qtot))
210 if(.not.
allocated(this%photons%pol_dipole))
then
213 if (this%photons%nmodes > 1)
then
218 this%all_nodes_default = .false.
231 call parse_variable(namespace,
'ParallelizationPoissonAllNodes', .
true., this%all_nodes_default)
278 if (space%dim == 3 .and. .not. space%is_periodic()) default_solver =
poisson_isf
284 anisotropic_spacing = any(abs(der%mesh%spacing(1:space%dim) - der%mesh%spacing(1)) > tol_spacing)
291 if (space%dim > 3) default_solver =
poisson_no
293 if (der%mesh%use_curvilinear)
then
294 select case (space%dim)
296 default_solver = poisson_direct_sum
298 default_solver = poisson_direct_sum
304 if (this%is_dressed) default_solver = poisson_direct_sum
306 if (.not.
present(solver))
then
307 call parse_variable(namespace,
'PoissonSolver', default_solver, this%method)
313 select case (this%method)
314 case (poisson_direct_sum)
317 str =
"fast Fourier transform"
319 str =
"conjugate gradients"
321 str =
"conjugate gradients, corrected"
325 str =
"interpolating scaling functions"
327 str =
"interpolating scaling functions (from BigDFT)"
329 str =
"non-equispaced fast Fourier transform"
331 str =
"no Poisson solver - Hartree set to 0"
333 write(
message(1),
'(a,a,a)')
"The chosen Poisson solver is '", trim(str),
"'"
337 if (space%dim > 3 .and. this%method /=
poisson_no)
then
338 call messages_input_error(namespace,
'PoissonSolver',
'Currently no Poisson solver is available for Dimensions > 3')
350 if (
present(fft_library)) library = fft_library
379 select case (space%dim)
381 if (.not. space%is_periodic())
then
387 if (space%periodic_dim == 2)
then
389 else if (space%is_periodic())
then
390 default_kernel = space%periodic_dim
395 default_kernel = space%periodic_dim
398 call parse_variable(namespace,
'PoissonFFTKernel', default_kernel, this%kernel)
408 message(1) =
'PoissonFFTKernel=multipole_correction is not supported on GPUs'
409 message(2) =
'Using FFTW to compute the FFTs on the CPU'
416 if (.not.
present(solver))
then
417 if (space%is_periodic() .and. this%method == poisson_direct_sum)
then
418 message(1) =
'A periodic system may not use the direct_sum Poisson solver.'
423 message(1) =
'A periodic system may not use the cg_corrected Poisson solver.'
427 select case (space%dim)
430 select case (space%periodic_dim)
432 if ((this%method /=
poisson_fft) .and. (this%method /= poisson_direct_sum))
then
433 message(1) =
'A finite 1D system may only use fft or direct_sum Poisson solvers.'
438 message(1) =
'A periodic 1D system may only use the fft Poisson solver.'
443 if (der%mesh%use_curvilinear .and. this%method /= poisson_direct_sum)
then
444 message(1) =
'If curvilinear coordinates are used in 1D, then the only working'
445 message(2) =
'Poisson solver is direct_sum.'
451 if ((this%method /=
poisson_fft) .and. (this%method /= poisson_direct_sum))
then
452 message(1) =
'A 2D system may only use fft or direct_sum solvers.'
456 if (der%mesh%use_curvilinear .and. (this%method /= poisson_direct_sum))
then
457 message(1) =
'If curvilinear coordinates are used in 2D, then the only working'
458 message(2) =
'Poisson solver is direct_sum.'
464 if (space%is_periodic() .and. this%method ==
poisson_isf)
then
465 call messages_write(
'The ISF solver can only be used for finite systems.')
472 message(1) =
'The ISF/PSolver Poisson solver requires a uniform (cubic) grid spacing,'
473 message(2) =
'but the grid has anisotropic spacing. Use PoissonSolver = fft instead.'
477 if (space%is_periodic() .and. this%method ==
poisson_fft .and. &
478 this%kernel /= space%periodic_dim .and. this%kernel >= 0 .and. this%kernel <= 3)
then
479 write(
message(1),
'(a,i1,a)')
'The system is periodic in ', space%periodic_dim ,
' dimension(s),'
480 write(
message(2),
'(a,i1,a)')
'but Poisson solver is set for ', this%kernel,
' dimensions.'
485 write(
message(1),
'(a,i1,a)')
'PoissonFFTKernel = multipole_correction cannot be used for periodic systems.'
491 if (space%dim /= 3 .or. space%is_periodic())
then
492 message(1) =
'The nfft Poisson solver is only available for finite 3D systems.'
497 if (der%mesh%use_curvilinear .and. &
499 message(1) =
'If curvilinear coordinates are used, then the only working'
500 message(2) =
'Poisson solvers are cg_corrected, multigrid and nfft.'
507 select type (box => der%mesh%box)
510 message(1) =
'When using the "minimum" box shape and the "cg_corrected"'
511 message(2) =
'Poisson solver, we have observed "sometimes" some non-'
512 message(3) =
'negligible error. You may want to check that the "fft" or "cg"'
513 message(4) =
'solver are providing, in your case, the same results.'
522#if !(defined HAVE_PSOLVER)
523 message(1) =
"The PSolver Poisson solver cannot be used since the code was not compiled with the PSolver library."
539 box(:) = der%mesh%idx%ll(:)
549 call parse_variable(namespace,
'PoissonSolverPSolverParallelData', .
true., isf_data_is_parallel)
577 write(
message(1),
'(a,f12.5,a)')
"Input: '", fft_alpha, &
578 "' is not a valid DoubleFFTParameter"
579 message(2) =
'1.0 <= DoubleFFTParameter <= 3.0'
583 if (space%dim /= 3 .and. library ==
fftlib_pfft)
then
587 select case (space%dim)
590 select case (this%kernel)
594 box = der%mesh%idx%ll
598 select case (this%kernel)
601 box(1:2) = maxval(box)
605 box(:) = der%mesh%idx%ll(:)
609 select case (this%kernel)
615 box(2) = maxval(box(2:3))
616 box(3) = maxval(box(2:3))
618 box(:) = der%mesh%idx%ll(:)
633 call cube_init(this%cube, box, namespace, space, der%mesh%spacing, &
634 der%mesh%coord_system, fft_type = fft_type, fft_library = fft_library, &
635 need_partition=.not.der%mesh%parallel_in_domains, &
636 batch_size=fft_bs, single=single_precision)
638 if (this%cube%parallel_in_domains .and. this%method ==
poisson_fft)
then
643 if (this%is_dressed .and. .not. this%method == poisson_direct_sum)
then
644 write(
message(1),
'(a)')
'Dressed Orbital calculation currently only working with direct sum Poisson solver.'
663 select case (this%method)
694 if (this%cube%parallel_in_domains)
then
700 if (this%is_dressed)
then
703 this%is_dressed = .false.
710 subroutine zpoisson_solve(this, namespace, pot, rho, all_nodes, kernel, reset)
713 complex(real64),
contiguous,
intent(inout) :: pot(:)
714 complex(real64),
contiguous,
intent(in) :: rho(:)
715 logical,
optional,
intent(in) :: all_nodes
717 logical,
optional,
intent(in) :: reset
719 logical :: all_nodes_value
725 assert(ubound(pot, dim = 1) == this%der%mesh%np_part .or. ubound(pot, dim = 1) == this%der%mesh%np)
726 assert(ubound(rho, dim = 1) == this%der%mesh%np_part .or. ubound(rho, dim = 1) == this%der%mesh%np)
731 pot(1:this%der%mesh%np) =
m_zero
737 select case (this%method)
739 call zpoisson_fft_solve(this%fft_solver, this%der%mesh, this%cube, pot, rho, this%mesh_cube_map, kernel=kernel)
741 assert(.not.
present(kernel))
758 type(
batch_t),
intent(inout) :: potb
759 type(
batch_t),
intent(inout) :: rhob
760 logical,
optional,
intent(in) :: all_nodes
767 assert(potb%nst_linear == rhob%nst_linear)
768 assert(potb%type() == rhob%type())
771 do ii = 1, potb%nst_linear
772 call dpoisson_solve(this, namespace, potb%dff_linear(:, ii), rhob%dff_linear(:, ii), all_nodes, kernel=kernel)
775 do ii = 1, potb%nst_linear
776 call zpoisson_solve(this, namespace, potb%zff_linear(:, ii), rhob%zff_linear(:, ii), all_nodes, kernel=kernel)
790 select case (this%method)
793 .and. .not. this%is_dressed .and. this%cube%fft%type ==
fft_complex
808 select case (this%method)
841 .and. .not. this%cube%parallel_in_domains
851 subroutine dpoisson_solve(this, namespace, pot, rho, all_nodes, kernel, reset)
854 real(real64),
contiguous,
intent(inout) :: pot(:)
855 real(real64),
contiguous,
intent(in) :: rho(:)
859 logical,
optional,
intent(in) :: all_nodes
861 logical,
optional,
intent(in) :: reset
864 real(real64),
allocatable :: rho_corrected(:), vh_correction(:)
865 logical :: all_nodes_value
872 assert(ubound(pot, dim = 1) == der%mesh%np_part .or. ubound(pot, dim = 1) == der%mesh%np)
873 assert(ubound(rho, dim = 1) == der%mesh%np_part .or. ubound(rho, dim = 1) == der%mesh%np)
879 pot(1:der%mesh%np) =
m_zero
884 if (
present(kernel))
then
888 select case (this%method)
889 case (poisson_direct_sum)
890 if ((this%is_dressed .and. this%der%dim - 1 > 3) .or. this%der%dim > 3)
then
891 message(1) =
"Direct sum Poisson solver only available for 1, 2, or 3 dimensions."
897 call poisson_cg1(namespace, der, this%corrector, pot, rho)
900 safe_allocate(rho_corrected(1:der%mesh%np))
901 safe_allocate(vh_correction(1:der%mesh%np_part))
903 call correct_rho(this%corrector, der, rho, rho_corrected, vh_correction)
906 call poisson_cg2(namespace, der, pot, rho_corrected)
909 safe_deallocate_a(rho_corrected)
910 safe_deallocate_a(vh_correction)
917 call dpoisson_fft_solve(this%fft_solver, der%mesh, this%cube, pot, rho, this%mesh_cube_map, kernel=kernel)
919 safe_allocate(rho_corrected(1:der%mesh%np))
920 safe_allocate(vh_correction(1:der%mesh%np_part))
922 call correct_rho(this%corrector, der, rho, rho_corrected, vh_correction)
923 call dpoisson_fft_solve(this%fft_solver, der%mesh, this%cube, pot, rho_corrected, this%mesh_cube_map, &
924 average_to_zero = .
true., kernel=kernel)
927 safe_deallocate_a(rho_corrected)
928 safe_deallocate_a(vh_correction)
932 call poisson_isf_solve(this%isf_solver, der%mesh, this%cube, pot, rho, all_nodes_value)
936 if (this%psolver_solver%datacode ==
"G")
then
951 if (this%is_dressed .and. this%method /=
poisson_no)
then
960 subroutine poisson_init_sm(this, namespace, space, main, der, sm, grp, method, force_cmplx)
963 class(
space_t),
intent(in) :: space
968 integer,
optional,
intent(in) :: method
969 logical,
optional,
intent(in) :: force_cmplx
971 integer :: default_solver, idir, iter, maxl
972 integer :: box(space%dim)
979 this%is_dressed = .false.
981 this%all_nodes_default = .false.
987 this%all_nodes_default = main%all_nodes_default
990 default_solver = poisson_direct_sum
991 this%method = default_solver
992 if (
present(method)) this%method = method
994 if (der%mesh%use_curvilinear)
then
1000 select case (this%method)
1001 case (poisson_direct_sum)
1006 assert(.not. der%mesh%parallel_in_domains)
1009 call cube_init(this%cube, box, namespace, space, sm%mesh%spacing, sm%mesh%coord_system, &
1010 fft_type =
fft_none, need_partition=.not.der%mesh%parallel_in_domains)
1012 call poisson_isf_init(this%isf_solver, namespace, der%mesh, this%cube, grp%comm, init_world = this%all_nodes_default)
1016 assert(.not. der%mesh%parallel_in_domains)
1017 if (this%all_nodes_default)
then
1018 this%cube%mpi_grp = grp
1020 this%cube%mpi_grp = this%der%mesh%mpi_grp
1024 call cube_init(this%cube, box, namespace, space, sm%mesh%spacing, sm%mesh%coord_system, &
1025 fft_type =
fft_none, need_partition=.not.der%mesh%parallel_in_domains)
1038 do idir = 1, space%dim
1039 box(idir) = (2 * (box(idir) - 1)) + 1
1042 call cube_init(this%cube, box, namespace, space, sm%mesh%spacing, sm%mesh%coord_system, &
1043 fft_type =
fft_complex, need_partition=.not.der%mesh%parallel_in_domains)
1045 call cube_init(this%cube, box, namespace, space, sm%mesh%spacing, sm%mesh%coord_system, &
1046 fft_type =
fft_real, need_partition=.not.der%mesh%parallel_in_domains)
1048 call poisson_fft_init(this%fft_solver, namespace, space, this%cube, this%kernel)
1050 call parse_variable(namespace,
'PoissonSolverMaxMultipole', 4, maxl)
1051 write(
message(1),
'(a,i2)')
'Info: Boundary conditions fixed up to L =', maxl
1053 call parse_variable(namespace,
'PoissonSolverMaxIter', 500, iter)
1073 type(multicomm_t),
intent(in) :: mc
1078 if (multicomm_have_slaves(mc))
then
1080 call mpi_grp_init(this%local_grp, mc%group_comm(p_strategy_states))
1082 this%root = (this%local_grp%is_root())
1084 this%intercomm = mc%slave_intercomm
1085 call mpi_comm_remote_size(this%intercomm, this%nslaves)
1098 type(multicomm_t),
intent(in) :: mc
1107 if (multicomm_have_slaves(mc))
then
1110 do islave = this%local_grp%rank, this%nslaves - 1, this%local_grp%size
1111 call mpi_send(m_one, 1, mpi_double_precision, islave,
cmd_finish, this%intercomm)
1125 type(namespace_t),
intent(in) :: namespace
1128 real(real64),
allocatable :: rho(:), pot(:)
1130 type(mpi_status) :: status
1131 integer :: bcast_root
1134 call profiling_in(
"SLAVE_WORK")
1136 safe_allocate(rho(1:this%der%mesh%np))
1137 safe_allocate(pot(1:this%der%mesh%np))
1140 do while(.not. done)
1142 call profiling_in(
"SLAVE_WAIT")
1143 call mpi_recv(rho(1), this%der%mesh%np, mpi_double_precision, mpi_any_source, mpi_any_tag, this%intercomm, status)
1144 call profiling_out(
"SLAVE_WAIT")
1147 select case (status%MPI_TAG)
1155 call profiling_in(
"SLAVE_BROADCAST")
1156 bcast_root = mpi_proc_null
1157 if (this%root) bcast_root = mpi_root
1158 call mpi_bcast(pot(1), this%der%mesh%np, mpi_double_precision, bcast_root, this%intercomm)
1159 call profiling_out(
"SLAVE_BROADCAST")
1165 safe_deallocate_a(pot)
1166 safe_deallocate_a(rho)
1168 call profiling_out(
"SLAVE_WORK")
1178 async = (this%nslaves > 0)
1186 type(namespace_t),
intent(in) :: namespace
1187 class(space_t),
intent(in) :: space
1188 type(fourier_space_op_t),
intent(inout) :: coulb
1189 real(real64),
intent(in) :: qq(:)
1190 type(xc_cam_t),
intent(in) :: cam
1191 real(real64),
optional,
intent(in) :: singul
1197 if (space%is_periodic())
then
1198 assert(ubound(qq, 1) >= space%periodic_dim)
1202 if (cam%omega > m_epsilon)
then
1204 write(message(1),
'(a)')
"Poisson solver with range separation is only implemented with FFT."
1205 call messages_fatal(1, namespace=namespace)
1211 if (
allocated(coulb%qq))
then
1212 reinit = any(abs(coulb%qq(1:space%periodic_dim) - qq(1:space%periodic_dim)) > m_epsilon)
1214 reinit = reinit .or. (abs(coulb%mu - cam%omega) > m_epsilon .and. cam%omega > m_epsilon)
1215 reinit = reinit .or. (abs(coulb%alpha - cam%alpha) > m_epsilon .and. cam%alpha > m_epsilon)
1216 reinit = reinit .or. (abs(coulb%beta - cam%beta) > m_epsilon .and. abs(cam%beta) > m_epsilon)
1219 call profiling_in(
'POISSON_BUILD_KERNEL')
1222 select case (this%method)
1227 call coulb%init(space, qq, cam, singul)
1228 call poisson_fft_get_kernel(namespace, space, this%cube, coulb, this%kernel, &
1229 this%poisson_soft_coulomb_param)
1231 call messages_not_implemented(
"poisson_build_kernel with other methods than FFT", namespace=namespace)
1233 call profiling_out(
'POISSON_BUILD_KERNEL')
1250 type(xc_cam_t),
intent(in) :: cam
1252 select case (this%method)
1256 if(cam%omega < m_epsilon)
then
1258 else if(cam%alpha > m_epsilon .and. cam%beta < m_epsilon)
then
1260 else if(cam%alpha < m_epsilon .and. cam%beta > m_epsilon)
then
1268#include "poisson_init_inc.F90"
1269#include "poisson_direct_inc.F90"
1270#include "poisson_direct_sm_inc.F90"
1274#include "poisson_inc.F90"
1276#include "complex.F90"
1277#include "poisson_inc.F90"
1278#include "poisson_re_im_inc.F90"
1281#include "real32.F90"
1282#include "poisson_inc.F90"
1284#include "complex32.F90"
1285#include "poisson_inc.F90"
1286#include "poisson_re_im_inc.F90"
constant times a vector plus a vector
Prints out to iunit a message in the form: ["InputVariable" = value] where "InputVariable" is given b...
pure logical function, public accel_is_enabled()
This module implements batches of mesh functions.
This module handles the calculation mode.
integer, parameter, public p_strategy_kpoints
parallelization in k-points
subroutine, public cube_end(cube)
subroutine, public cube_init(cube, nn, namespace, space, spacing, coord_system, fft_type, fft_library, dont_optimize, nn_out, mpi_grp, need_partition, tp_enlarge, blocksize, batch_size, nthreads, single)
subroutine, public cube_init_cube_map(cube, mesh)
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
integer, parameter, public fft_none
global constants
integer, public fft_default_lib
integer, parameter, public fftlib_accel
integer, parameter, public fft_real
integer, parameter, public fft_complex
integer, parameter, public fftlib_nfft
integer, parameter, public fftlib_pfft
integer, parameter, public fftlib_fftw
real(real64), parameter, public m_two
real(real64), parameter, public m_zero
real(real64), parameter, public m_one
real(real64), parameter, public m_three
This module implements the index, used for the mesh points.
This module is intended to contain "only mathematical" functions and procedures.
subroutine, public mesh_cube_parallel_map_end(this)
subroutine, public mesh_cube_parallel_map_init(this, mesh, cube)
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
subroutine, public mesh_double_box(space, mesh, alpha, db)
finds the dimension of a box doubled in the non-periodic dimensions
subroutine, public messages_print_with_emphasis(msg, iunit, namespace)
subroutine, public messages_not_implemented(feature, namespace)
character(len=512), private msg
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_input_error(namespace, var, details, row, column)
subroutine, public messages_experimental(name, namespace)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
This module handles the communicators for the various parallelization strategies.
logical pure function, public multicomm_strategy_is_parallel(mc, level)
logical pure function, public multicomm_have_slaves(this)
Some general things and nomenclature:
subroutine, public photon_mode_compute_dipoles(this, mesh)
Computes the polarization dipole.
subroutine, public photon_mode_add_poisson_terms(this, mesh, rho, pot)
subroutine, public photon_mode_end(this)
subroutine, public photon_mode_init(this, namespace, dim, grp, photon_free)
subroutine, public photon_mode_set_n_electrons(this, qtot)
real(real64), public threshold
subroutine, public poisson_cg2(namespace, der, pot, rho)
subroutine, public poisson_cg1(namespace, der, corrector, pot, rho)
subroutine, public poisson_cg_init(thr, itr)
subroutine, public poisson_cg_end
subroutine, public poisson_corrections_end(this)
subroutine, public poisson_corrections_init(this, namespace, space, ml, mesh)
subroutine, public correct_rho(this, der, rho, rho_corrected, vh_correction)
integer, parameter, public poisson_fft_kernel_nocut
integer, parameter, public poisson_fft_kernel_cyl
subroutine, public zpoisson_fft_solve(this, mesh, cube, pot, rho, mesh_cube_map, average_to_zero, kernel, sm)
subroutine, public poisson_fft_end(this)
subroutine, public poisson_fft_init(this, namespace, space, cube, kernel, soft_coulb_param, fullcube)
integer, parameter, public poisson_fft_kernel_pla
integer, parameter, public poisson_fft_kernel_none
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, public poisson_isf_end(this)
subroutine, public poisson_isf_init(this, namespace, mesh, cube, all_nodes_comm, init_world)
subroutine, public poisson_isf_solve(this, mesh, cube, pot, rho, all_nodes, sm)
subroutine, public poisson_multigrid_solver(this, namespace, der, pot, rho)
A multigrid Poisson solver with corrections at the boundaries.
subroutine, public poisson_multigrid_end(this)
Poisson solver on the mesh points themselves, through non-equispaced FFTs.
subroutine, public dpoisson_nfft_solve(this, mesh, pot, rho)
subroutine, public poisson_nfft_end(this)
subroutine, public zpoisson_nfft_solve(this, mesh, pot, rho)
The transform is complex either way, so a complex density costs the same as a real one and needs no s...
subroutine, public poisson_no_solve(this, mesh, pot, rho)
subroutine, public poisson_no_end(this)
subroutine, public zpoisson_solve_sm(this, namespace, sm, pot, rho, all_nodes)
Calculates the Poisson equation. Given the density returns the corresponding potential.
integer, parameter, public poisson_multigrid
subroutine poisson_kernel_init(this, namespace, space, mc, stencil)
integer, parameter, public poisson_psolver
subroutine, public dpoisson_solve_start(this, rho)
integer, parameter cmd_finish
subroutine, public zpoisson_solve_finish(this, pot)
subroutine poisson_solve_direct(this, namespace, pot, rho)
integer, parameter, public poisson_fft
subroutine, public spoisson_solve_batch(this, namespace, pot, rho, kernel, all_nodes, pot_buffer, rho_buffer, count)
Solves the Poisson equation for batched quantities, using fast Fourier transforms (FFTs).
subroutine, public spoisson_solve(this, namespace, pot, rho, all_nodes, kernel, reset)
Single-precision scalar Poisson solve (FFT method only). This is the s/c counterpart of the concrete ...
subroutine, public zpoisson_solve_batch(this, namespace, pot, rho, kernel, all_nodes, pot_buffer, rho_buffer, count)
Solves the Poisson equation for batched quantities, using fast Fourier transforms (FFTs).
subroutine, public zpoisson_solve(this, namespace, pot, rho, all_nodes, kernel, reset)
subroutine, public poisson_init_sm(this, namespace, space, main, der, sm, grp, method, force_cmplx)
subroutine, public poisson_solve_batch(this, namespace, potb, rhob, all_nodes, kernel)
subroutine, public poisson_async_init(this, mc)
subroutine, public dpoisson_solve_sm(this, namespace, sm, pot, rho, all_nodes)
Calculates the Poisson equation. Given the density returns the corresponding potential.
subroutine zpoisson_solve_real_and_imag_separately(this, namespace, pot, rho, all_nodes, kernel)
subroutine, public cpoisson_solve_batch(this, namespace, pot, rho, kernel, all_nodes, pot_buffer, rho_buffer, count)
Solves the Poisson equation for batched quantities, using fast Fourier transforms (FFTs).
integer, parameter, public poisson_nfft
logical pure function poisson_solver_is_iterative(this)
subroutine, public poisson_slave_work(this, namespace)
subroutine, public dpoisson_solve(this, namespace, pot, rho, all_nodes, kernel, reset)
Calculates the Poisson equation. Given the density returns the corresponding potential.
integer, parameter cmd_poisson_solve
integer, parameter, public poisson_cg
subroutine, public poisson_init(this, namespace, space, der, mc, stencil, qtot, label, solver, verbose, force_serial, force_cmplx, fft_library, fft_batch_size, single_precision)
subroutine, public poisson_build_kernel(this, namespace, space, coulb, qq, cam, singul)
subroutine, public dpoisson_solve_finish(this, pot)
subroutine, public zpoisson_solve_start(this, rho)
subroutine, public poisson_async_end(this, mc)
integer, parameter, public poisson_cg_corrected
logical function, public poisson_is_device_batch_capable(this)
Whether a batch can be solved with the densities and potentials kept on the device.
logical function, public poisson_uses_nfft(this)
Whether the solve goes through a non-equispaced FFT.
subroutine, public cpoisson_solve(this, namespace, pot, rho, all_nodes, kernel, reset)
Single-precision scalar Poisson solve (FFT method only). This is the s/c counterpart of the concrete ...
logical function, public poisson_is_batch_capable(this)
Whether this solver can transform a whole batch of functions in one call.
integer, parameter, public poisson_isf
real(real64) function, public poisson_get_full_range_weight(this, cam)
Most Poisson solvers do not implement Coulomb attenuated potentials, and can only be used for global ...
subroutine, public dpoisson_solve_batch(this, namespace, pot, rho, kernel, all_nodes, pot_buffer, rho_buffer, count)
Solves the Poisson equation for batched quantities, using fast Fourier transforms (FFTs).
logical function, public poisson_solves_complex_natively(this)
Whether zpoisson_solve takes a complex density in one pass.
integer, parameter, public poisson_null
integer, parameter, public poisson_no
logical pure function, public poisson_is_async(this)
subroutine, public poisson_end(this)
subroutine, public poisson_psolver_global_solve(this, mesh, cube, pot, rho, sm)
subroutine, public poisson_psolver_parallel_solve(this, mesh, cube, pot, rho, mesh_cube_map)
subroutine, public poisson_psolver_end(this)
subroutine, public poisson_psolver_get_dims(this, cube)
subroutine, public poisson_psolver_init(this, namespace, space, cube, mu, qq, force_isolated)
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
This module defines stencils used in Octopus.
subroutine, public submesh_init_cube_map(sm, space)
subroutine, public submesh_get_cube_dim(sm, space, db)
finds the dimension of a box containing the submesh
type(type_t), parameter, public type_float
This module defines the unit system, used for input and output.
Class defining batches of mesh functions.
Class implementing a box that is a union of spheres. We do this in a specific class instead of using ...
class representing derivatives
Definition of a Fourier Space Coulomb Kernel.
This is defined even when running serial.
A submesh is a type of mesh, used for the projectors in the pseudopotentials It contains points on a ...