(git:db3ef62)
ps_wavelet_util Module Reference

Performs a wavelet based solution of the Poisson equation. More...

Functions/Subroutines

subroutine, public psolver (geocode, iproc, nproc, n01, n02, n03, hx, hy, hz, rhopot, karray, pw_grid)
 Calculate the Poisson equation $\nabla^2 V(x,y,z)=-4 \pi \rho(x,y,z)$ from a given $\rho$, for different boundary conditions an for different data distributions. Following the boundary conditions, it applies the Poisson Kernel previously calculated. More...
 
subroutine, public p_fft_dimensions (n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc)
 Calculate four sets of dimension needed for the calculation of the convolution for the periodic system. More...
 
subroutine, public s_fft_dimensions (n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc)
 Calculate four sets of dimension needed for the calculation of the convolution for the surface system. More...
 
subroutine, public f_fft_dimensions (n01, n02, n03, m1, m2, m3, n1, n2, n3, md1, md2, md3, nd1, nd2, nd3, nproc)
 Calculate four sets of dimension needed for the calculation of the zero-padded convolution. More...
 

Detailed Description

Performs a wavelet based solution of the Poisson equation.

Author
Florian Schiffmann (09.2007,fschiff)

Function/Subroutine Documentation

◆ psolver()

subroutine, public ps_wavelet_util::psolver ( character(len=1), intent(in)  geocode,
integer, intent(in)  iproc,
integer, intent(in)  nproc,
integer, intent(in)  n01,
integer, intent(in)  n02,
integer, intent(in)  n03,
real(kind=dp), intent(in)  hx,
real(kind=dp), intent(in)  hy,
real(kind=dp), intent(in)  hz,
real(kind=dp), dimension(*), intent(inout)  rhopot,
real(kind=dp), dimension(*), intent(in)  karray,
type(pw_grid_type), pointer  pw_grid 
)

Calculate the Poisson equation $\nabla^2 V(x,y,z)=-4 \pi \rho(x,y,z)$ from a given $\rho$, for different boundary conditions an for different data distributions. Following the boundary conditions, it applies the Poisson Kernel previously calculated.

Parameters
geocodeIndicates the boundary conditions (BC) of the problem: 'F' free BC, isolated systems. The program calculates the solution as if the given density is "alone" in R^3 space. 'S' surface BC, isolated in y direction, periodic in xz plane The given density is supposed to be periodic in the xz plane, so the dimensions in these direction mus be compatible with the FFT Beware of the fact that the isolated direction is y! 'P' periodic BC. The density is supposed to be periodic in all the three directions, then all the dimensions must be compatible with the FFT. No need for setting up the kernel.
iproclabel of the process,from 0 to nproc-1
nprocnumber of processors
n01global dimension in the three directions.
n02global dimension in the three directions.
n03global dimension in the three directions.
hxgrid spacings. For the isolated BC case for the moment they are supposed to be equal in the three directions
hygrid spacings. For the isolated BC case for the moment they are supposed to be equal in the three directions
hzgrid spacings. For the isolated BC case for the moment they are supposed to be equal in the three directions
rhopotmain input/output array. On input, it represents the density values on the grid points On output, it is the Hartree potential, namely the solution of the Poisson equation PLUS (when ixc/=0) the XC potential PLUS (again for ixc/=0) the pot_ion array. The output is non overlapping, in the sense that it does not consider the points that are related to gradient and WB calculation
karraykernel of the poisson equation. It is provided in distributed case, with dimensions that are related to the output of the PS_dim4allocation routine it MUST be created by following the same geocode as the Poisson Solver.
pw_grid...
Date
February 2007
Author
Luigi Genovese
Note
The dimensions of the arrays must be compatible with geocode, nproc, ixc and iproc. Since the arguments of these routines are indicated with the *, it is IMPERATIVE to use the PS_dim4allocation routine for calculation arrays sizes.

Definition at line 81 of file ps_wavelet_util.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p_fft_dimensions()

subroutine, public ps_wavelet_util::p_fft_dimensions ( integer, intent(in)  n01,
integer, intent(in)  n02,
integer, intent(in)  n03,
integer, intent(out)  m1,
integer, intent(out)  m2,
integer, intent(out)  m3,
integer, intent(out)  n1,
integer, intent(out)  n2,
integer, intent(out)  n3,
integer, intent(out)  md1,
integer, intent(out)  md2,
integer, intent(out)  md3,
integer, intent(out)  nd1,
integer, intent(out)  nd2,
integer, intent(out)  nd3,
integer, intent(in)  nproc 
)

Calculate four sets of dimension needed for the calculation of the convolution for the periodic system.

Parameters
n01original real dimensions (input)
n02original real dimensions (input)
n03original real dimensions (input)
m1original real dimension, with m2 and m3 exchanged
m2original real dimension, with m2 and m3 exchanged
m3original real dimension, with m2 and m3 exchanged
n1the first FFT dimensions, for the moment supposed to be even
n2the first FFT dimensions, for the moment supposed to be even
n3the first FFT dimensions, for the moment supposed to be even
md1the n1,n2,n3 dimensions. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
md2the n1,n2,n3 dimensions. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
md3the n1,n2,n3 dimensions. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
nd1fourier dimensions for which the kernel is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nd2fourier dimensions for which the kernel is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nd3fourier dimensions for which the kernel is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nproc...
Date
October 2006
Author
Luigi Genovese
Note
This four sets of dimensions are actually redundant (mi=n0i), due to the backward-compatibility with the other geometries of the Poisson Solver. The dimensions 2 and 3 are exchanged.

Definition at line 237 of file ps_wavelet_util.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_fft_dimensions()

subroutine, public ps_wavelet_util::s_fft_dimensions ( integer, intent(in)  n01,
integer, intent(in)  n02,
integer, intent(in)  n03,
integer, intent(out)  m1,
integer, intent(out)  m2,
integer, intent(out)  m3,
integer, intent(out)  n1,
integer, intent(out)  n2,
integer, intent(out)  n3,
integer, intent(out)  md1,
integer, intent(out)  md2,
integer, intent(out)  md3,
integer, intent(out)  nd1,
integer, intent(out)  nd2,
integer, intent(out)  nd3,
integer, intent(in)  nproc 
)

Calculate four sets of dimension needed for the calculation of the convolution for the surface system.

Parameters
n01original real dimensions (input)
n02original real dimensions (input)
n03original real dimensions (input)
m1original real dimension, with 2 and 3 exchanged
m2original real dimension, with 2 and 3 exchanged
m3original real dimension, with 2 and 3 exchanged
n1the first FFT dimensions, for the moment supposed to be even
n2the first FFT dimensions, for the moment supposed to be even
n3the double of the first FFT even dimension greater than m3 (improved for the HalFFT procedure)
md1the n1,n2 dimensions.
md2the n1,n2,n3 dimensions.
md3the half of n3 dimension. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
nd1fourier dimensions for which the kernel is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nd2fourier dimensions for which the kernel is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nd3fourier dimensions for which the kernel is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nproc...
Date
October 2006
Author
Luigi Genovese
Note
This four sets of dimensions are actually redundant (mi=n0i), due to the backward-compatibility with the Poisson Solver with other geometries. Dimensions n02 and n03 were exchanged

Definition at line 333 of file ps_wavelet_util.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_fft_dimensions()

subroutine, public ps_wavelet_util::f_fft_dimensions ( integer, intent(in)  n01,
integer, intent(in)  n02,
integer, intent(in)  n03,
integer, intent(out)  m1,
integer, intent(out)  m2,
integer, intent(out)  m3,
integer, intent(out)  n1,
integer, intent(out)  n2,
integer, intent(out)  n3,
integer, intent(out)  md1,
integer, intent(out)  md2,
integer, intent(out)  md3,
integer, intent(out)  nd1,
integer, intent(out)  nd2,
integer, intent(out)  nd3,
integer, intent(in)  nproc 
)

Calculate four sets of dimension needed for the calculation of the zero-padded convolution.

Parameters
n01original real dimensions (input)
n02original real dimensions (input)
n03original real dimensions (input)
m1original real dimension with the dimension 2 and 3 exchanged
m2original real dimension with the dimension 2 and 3 exchanged
m3original real dimension with the dimension 2 and 3 exchanged
n1...
n2...
n3the double of the first FFT even dimension greater than m3 (improved for the HalFFT procedure)
md1half of n1,n2,n3 dimension. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
md2half of n1,n2,n3 dimension. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
md3half of n1,n2,n3 dimension. They contain the real unpadded space, properly enlarged to be compatible with the FFT dimensions n_i. md2 is further enlarged to be a multiple of nproc
nd1fourier dimensions for which the kernel FFT is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nd2fourier dimensions for which the kernel FFT is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nd3fourier dimensions for which the kernel FFT is injective, formally 1/8 of the fourier grid. Here the dimension nd3 is enlarged to be a multiple of nproc
nproc...
Date
February 2006
Author
Luigi Genovese
Note
The dimension m2 and m3 correspond to n03 and n02 respectively this is needed since the convolution routine manage arrays of dimension (md1,md3,md2/nproc)

Definition at line 440 of file ps_wavelet_util.F.

Here is the call graph for this function:
Here is the caller graph for this function: