A fast and precise DFT wavelet code

# Poisson_Solver.f90 File Reference

Define the module for Poisson Solver. More...

Go to the source code of this file.

## Modules

module  Poisson_Solver

The module of the Poisson Solver. It must be used in the parent routine. USAGE In the main routine in which the Poisson Solver is called

1. The Poisson kernel must be declared as a pointer, then the routine createKernel can be called. On exit, the kernel will be allocated and ready to use. See the documentation of the createKernel routine for more details
2. The correct sizes for allocating the density/potential and the pot_ion arrays are given from the routine PS_dim4allocation (see routine documentation for details). Its argument MUST be in agreement with the arguments of the PSolver routine. WARNING: No cross-check of the arguments is performed!
3. The PSolver routine can then be called. On exit, the Hartree potential is computed and summed (following ixc value) to XC and external potential. The input array is overwritten. Again, see routine documentation for details.
4. QUICK INSTRUCTION FOR THE IMPATIENT:If you want to use the Poisson Solver in the "ordinary" way, for a grid of dimensions nx,ny,nz and grid spacings hx,hy,hz, just create the Kernel with call createKernel(geocode,nx,ny,nz,hx,hy,hz,14,0,1,kernel) where kernel is a pointer as described above; geocode is 'F','S' or 'P' for Free, Surfaces of Periodic BC respectively. (Beware that for Surfaces BC the isolated direction is y!) After that you can calculate the potential with call PSolver(geocode,'G',0,1,nx,ny,nz,0,hx,hy,hz,& rhopot,kernel,fake_arr,energy,fake_exc,fake_vxc,0.d0,.false.,1) where:

## Detailed Description

Define the module for Poisson Solver.

Definition in file Poisson_Solver.f90.