ABINIT/getngrec [ Functions ]

This routine computes the fft box for the recursion method, accordingly to the troncation radius.
It is quite similar to getng, but :
- there is no xboxcut and ecut consistency
- ngfft (the initial fft box) is the maximum fft box

INPUTS

ngfft(18)=non truncated fft box
mgfft=maximum of ngfft(1:3)
inf_rmet=define the infinitesimal metric : rprimd*(transpose(rprimd)), divided by the number of discretisation point
recrcut=truncating
delta=to obtain radius of truncation

Copyright (C) 2002-2018 ABINIT group (MMancini)
This file is distributed under the terms of the
GNU General Public License, see ~abinit/COPYING
or http://www.gnu.org/copyleft/gpl.txt .
For the initials of contributors, see ~abinit/doc/developers/contributors.txt.

NOTES

* Routines tagged with "@type_name" are strongly connected to the definition of the data type.
Strongly connected means that the proper functioning of the implementation relies on the
assumption that the tagged procedure is consistent with the type declaration.
Every time a developer changes the structure "type_name" adding new entries, he/she has to make sure
that all the strongly connected routines are changed accordingly to accomodate the modification of the data type.
Typical examples of strongly connected routines are creation, destruction or reset methods.

ABINIT/pspnl_hgh_rec [ Functions ]

This routine computes the matrices S_kk'^{l,A} of the projectors
(it is the exponential of the overlap matrix). It coorresponds to the matrix:
$$\left[(U_l)^{-1}*Exp(-temperature D_l )*U_l* (g_l)^{-1} -Identity\right]_kk'
where (U_l)^-1* D_l* U_l = h^lg_l.
$g_l = <f^l_k|f^l_{k'}>$ is the overlap matrix between projectors
and $h^l_{kk'}$ is the strength matrix of the projectors.
It calulates also the strength eigenvalues and eigenvectors of $h$,
used in the calculus of non-local energy

nlrec%mat_exp_psp_nl=the matrix of the exponential of the projectors:
for any psp, for any angular moment:
h_ij=strength; g_ij=ovelap => exp(-h.g/temp/4p).g^(-1)
nlrec%radii=Local radii of nl psp
nlrec%pspinfo(:,:) for any typat: (momang,typat)=number of projectors
nlrec%eival(:,:,:) for any psp, any momang, the eigenvalues of the
strength matrix H: eival(:,mang,psp)
nlrec%eivec(:,:,:,:)for any psp, any momang, the eigenvectors of the
strength matrix H: eivec(:,:,mang,psp)

ABINIT/pspnl_operat_rec [ Functions ]

It calculates the non-local projectors used in recursion for any psp non-local:
The nl interaction in recursion is $$exp{-V_{NL}/beta}=\sum_A\sum_{lm}
\sum{ij}Y_{lm}(\hat{r-R_A}')f^l_i(r-R_A)D^l_{i,j}Y_{lm}(\hat{r-R_A})f^l_j{r-R_A}$$
where $D^_{i,j}$ is a matrix previously (see pspnl_operat_rec).
In this routine the projectors $Y_{lm}(\hat{r-R_A}')f^l_i(r-R_A)$
are calculated. So an array of dimensions
rset%nl%projec(nfftrec,lmnmax,nlrec%npsp)

821 subroutine CleanRec(rset)
822 823 824 !This section has been created automatically by the script Abilint (TD).
825 !Do not modify the following lines by hand.
826 #undef ABI_FUNC
827 #define ABI_FUNC 'CleanRec'
828 !End of the abilint section
829 830 implicit none
831 832 !Arguments ------------------------------------
833 ! scalars
834 type(recursion_type),intent(inout) :: rset
835 ! arrays
836 ! *********************************************************************
837 838 ! @recursion_type839 840 if (allocated(rset%ZT_p)) then
841 ABI_DEALLOCATE(rset%ZT_p)
842 end if
843 if (allocated(rset%par%displs)) then
844 ABI_DEALLOCATE(rset%par%displs)
845 end if
846 if (allocated(rset%par%vcount)) then
847 ABI_DEALLOCATE(rset%par%vcount)
848 end if
849 if (allocated(rset%nl%mat_exp_psp_nl)) then
850 ABI_DEALLOCATE(rset%nl%mat_exp_psp_nl)
851 end if
852 if (allocated(rset%nl%eival)) then
853 ABI_DEALLOCATE(rset%nl%eival)
854 end if
855 if (allocated(rset%nl%eivec)) then
856 ABI_DEALLOCATE(rset%nl%eivec)
857 end if
858 if (allocated(rset%nl%pspinfo)) then
859 ABI_DEALLOCATE(rset%nl%pspinfo)
860 end if
861 if (allocated(rset%nl%radii)) then
862 ABI_DEALLOCATE(rset%nl%radii)
863 end if
864 if (allocated(rset%nl%indlmn)) then
865 ABI_DEALLOCATE(rset%nl%indlmn)
866 end if
867 if (allocated(rset%nl%projec)) then
868 ABI_DEALLOCATE(rset%nl%projec)
869 end if
870 if (allocated(rset%inf%gcart)) then
871 ABI_DEALLOCATE(rset%inf%gcart)
872 end if
873 874 call pawfgr_destroy(rset%pawfgr)
875 876 ! No is needed deallocate rset%mpi: it is a copy of mpi_enreg which
877 ! pointers are deallocated in gstate878 879 #ifdef HAVE_GPU_CUDA
880 call CleanRecGPU(rset%GPU,rset%load)
881 #endif
882 883 end subroutine CleanRec

m_rec/cpu_distribution [ Functions ]

ngfft(3)=nuber of point of the grid
gratio=recgratio ratio between the fine and coarse grid
beta_coeff=estimated time ratio between CPU_time and GPU_time
calc_type=if 0 takes the possible max for nptrec (to test the
completly full graphic card). 1 after test to calculate the min
possible value for nptrec

m_rec/find_maxmin_proc [ Functions ]

To calculate max and min pt for any cpu, it is useful for
recgratio!=1

INPUTS

nproc = number of procs
me = identity of the proc
ngfft(3) = fine grid (corresponds to dtset%ngfft(1:3))
proc_pt_dev(2,0:nproc-1) which device and how many points
recpar%npt = number of points computed by the proc me (see side effects)

OUTPUT

recpar%pt0<type(vec_int)>=Intial point for this proc in x,y,z
recpar%pt1<type(vec_int)>=Final point for this proc in x,y,z
recpar%min_pt=Intial point for this proc
recpar%max_pt=Final point for this proc

SIDE EFFECTS

recpar%ntranche=number of pts computed by the proc me on the fine grid.
So when recgratio!=1, ntranche will not correspond to the npt!

m_rec/H_D_distrib [ Functions ]

rset<recursion_type>= recursion variables
cpu (-1 if there are not gpu)
nfft=nuber of point of the fine grid
ngfftrec=nuber of point of one edge of the coarse grid
gratio=recgratio ratio between the fine and coarse grid
beta_coeff=estimated time ratio between CPU_time and GPU_time

OUTPUT

proc_pt_dev(2,0:nproc-1) which device and how many points
that proc has to compute: proc_pt_dev(1,iproc) which device
associated to proc i (-1 if none), proc_pt_dev(2,iproc) how
many points