![]() |
(git:b77b4be)
|
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. | |
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. | |
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. | |
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. | |
Performs a wavelet based solution of the Poisson equation.
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.
geocode | Indicates 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. |
iproc | label of the process,from 0 to nproc-1 |
nproc | number of processors |
n01 | global dimension in the three directions. |
n02 | global dimension in the three directions. |
n03 | global dimension in the three directions. |
hx | grid spacings. For the isolated BC case for the moment they are supposed to be equal in the three directions |
hy | grid spacings. For the isolated BC case for the moment they are supposed to be equal in the three directions |
hz | grid spacings. For the isolated BC case for the moment they are supposed to be equal in the three directions |
rhopot | main 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 |
karray | kernel 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 | ... |
Definition at line 81 of file ps_wavelet_util.F.
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.
n01 | original real dimensions (input) |
n02 | original real dimensions (input) |
n03 | original real dimensions (input) |
m1 | original real dimension, with m2 and m3 exchanged |
m2 | original real dimension, with m2 and m3 exchanged |
m3 | original real dimension, with m2 and m3 exchanged |
n1 | the first FFT dimensions, for the moment supposed to be even |
n2 | the first FFT dimensions, for the moment supposed to be even |
n3 | the first FFT dimensions, for the moment supposed to be even |
md1 | the 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 |
md2 | the 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 |
md3 | the 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 |
nd1 | fourier 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 |
nd2 | fourier 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 |
nd3 | fourier 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 | ... |
Definition at line 237 of file ps_wavelet_util.F.
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.
n01 | original real dimensions (input) |
n02 | original real dimensions (input) |
n03 | original real dimensions (input) |
m1 | original real dimension, with 2 and 3 exchanged |
m2 | original real dimension, with 2 and 3 exchanged |
m3 | original real dimension, with 2 and 3 exchanged |
n1 | the first FFT dimensions, for the moment supposed to be even |
n2 | the first FFT dimensions, for the moment supposed to be even |
n3 | the double of the first FFT even dimension greater than m3 (improved for the HalFFT procedure) |
md1 | the n1,n2 dimensions. |
md2 | the n1,n2,n3 dimensions. |
md3 | the 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 |
nd1 | fourier 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 |
nd2 | fourier 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 |
nd3 | fourier 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 | ... |
Definition at line 333 of file ps_wavelet_util.F.
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.
n01 | original real dimensions (input) |
n02 | original real dimensions (input) |
n03 | original real dimensions (input) |
m1 | original real dimension with the dimension 2 and 3 exchanged |
m2 | original real dimension with the dimension 2 and 3 exchanged |
m3 | original real dimension with the dimension 2 and 3 exchanged |
n1 | ... |
n2 | ... |
n3 | the double of the first FFT even dimension greater than m3 (improved for the HalFFT procedure) |
md1 | half 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 |
md2 | half 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 |
md3 | half 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 |
nd1 | fourier 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 |
nd2 | fourier 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 |
nd3 | fourier 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 | ... |
Definition at line 440 of file ps_wavelet_util.F.