Module to handle the allocation of arrays to be later distributed it aims to bring modularity to the memory management. Of this way it should be easier to ensure that only arrays that are needed for a given task are allocated/deallocated
Todo
The number of arrays in the misc section should be reduced, and they should be located in the appropriate routines
subroutine handling the allocation/deallocation of arrays that describe the unit cell.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | nemb |
number of 'embedding' positions |
||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(inout), | dimension (:), allocatable | :: | cls |
Cluster around atomic sites |
|
integer, | intent(inout), | dimension (:), allocatable | :: | imt |
R point at MT radius |
|
integer, | intent(inout), | dimension (:), allocatable | :: | irws |
R point at WS radius |
|
integer, | intent(inout), | dimension (:), allocatable | :: | irns |
Position of atoms in the unit cell in units of bravais vectors |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ntcell |
Index for WS cell |
|
integer, | intent(inout), | dimension (:), allocatable | :: | refpot |
Ref. pot. card at position |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | kfg | ||
integer, | intent(inout), | dimension (:, :), allocatable | :: | kaoez |
atom types located at a given site |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | rmt |
Muffin-tin radius of true system |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | zat |
Nuclear charge |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | rws |
Wigner Seitz radius |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | mtfac |
Scaling factor for radius MT |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | rmtref |
Muffin-tin radius of reference system |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | rmtrefat | ||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | rmtnew |
Adapted muffin-tin radius |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rbasis |
Position of atoms in the unit cell in units of bravais vectors |
|
integer, | intent(inout), | dimension (:), allocatable | :: | lmxc | ||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | fpradius |
R point at which full-potential treatment starts |
subroutine handling the allocation/deallocation of arrays that describe the left and right host for the calculation of slabs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | nemb |
number of 'embedding' positions |
||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | tleft |
Vectors of the basis for the left host |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | tright |
vectors of the basis for the right host |
subroutine handling the allocation/deallocation of arrays that describe the potential
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | irm | |||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(in) | :: | npotd |
2*NATYP |
||
integer, | intent(in) | :: | ipand | |||
integer, | intent(in) | :: | nfund | |||
integer, | intent(in) | :: | lmxspd | |||
integer, | intent(in) | :: | lmpot | |||
integer, | intent(in) | :: | irmind | |||
integer, | intent(in) | :: | nspotd | |||
integer, | intent(inout), | dimension (:), allocatable | :: | nfu | ||
integer, | intent(inout), | dimension (:), allocatable | :: | irc |
R point for potential cutting |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ncore |
Number of core states |
|
integer, | intent(inout), | dimension (:), allocatable | :: | irmin |
Max R for spherical treatment |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | lmsp |
0,1 : non/-vanishing lm=(l,m) component of non-spherical potential |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | lmsp1 | ||
integer, | intent(inout), | dimension (:, :), allocatable | :: | ircut |
R points of panel borders |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | lcore |
Angular momentum of core states |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | llmsp |
lm=(l,m) of 'nfund'th nonvanishing component of non-spherical pot. |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | ititle | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | visp |
Spherical part of the potential |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | ecore |
Core energies |
|
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | vins |
Non-spherical part of the potential |
subroutine handling the allocation/deallocation of arrays that describe the CPA treatment
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(inout), | dimension (:), allocatable | :: | noq |
Number of diff. atom types located |
|
integer, | intent(inout), | dimension (:), allocatable | :: | icpa |
ICPA = 0/1 site-dependent CPA flag |
|
integer, | intent(inout), | dimension (:), allocatable | :: | iqat |
the site on which an atom is located on a given site |
|
integer, | intent(inout), | dimension (:), allocatable | :: | hostimp | ||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | conc |
concentration of a given atom |
subroutine handling the allocation/deallocation of arrays that describe the LDA+U approach
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(inout), | dimension (:), allocatable | :: | lopt |
angular momentum QNUM for the atoms on which LDA+U should be applied (-1 to switch it OFF) |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | ueff |
input U parameter for each atom |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | jeff |
input J parameter for each atom |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | erefldau |
the energies of the projector's wave functions (REAL) |
subroutine handling the allocation/deallocation of arrays that describe the potentials for the LDA+U approach
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | irm | |||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(in) | :: | mmaxd | |||
integer, | intent(in) | :: | nspind |
Counter for spin directions (KREL+(1-KREL)*(KSP+1)) |
||
integer, | intent(inout), | dimension (:), allocatable | :: | itldau |
integer pointer connecting the NTLDAU atoms to their corresponding index in the unit cell |
|
real(kind=dp), | intent(inout), | dimension (:, :, :, :), allocatable | :: | wldau |
potential matrix |
|
real(kind=dp), | intent(inout), | dimension (:, :, :, :, :), allocatable | :: | uldau |
calculated Coulomb matrix elements (EREFLDAU) |
|
complex(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | phildau |
subroutine handling the allocation/deallocation of arrays that describe the magnetization
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(in) | :: | lmmaxd | |||
integer, | intent(inout), | dimension (:), allocatable | :: | inipol |
Initial spin polarisation |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ixipol |
Constraint of spin pol. |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | qmtet | ||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | qmphi | ||
complex(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | drotq |
Rotation matrices to change between LOCAL/GLOBAL frame of reference for magnetisation <> Oz or noncollinearity |
subroutine handling the allocation/deallocation of arrays that describe the spin-orbit coupling (SOC)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | krel | |||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(in) | :: | lmax |
Maximum l component in wave function expansion |
||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | socscale |
Spin-orbit scaling |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | cscl |
Speed of light scaling |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | socscl |
subroutine handling the allocation/deallocation of arrays that describe energies
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | iemxd | |||
complex(kind=dp), | intent(inout), | dimension (:), allocatable | :: | ez | ||
complex(kind=dp), | intent(inout), | dimension (:), allocatable | :: | dez | ||
complex(kind=dp), | intent(inout), | dimension (:), allocatable | :: | wez |
subroutine handling the allocation/deallocation of arrays that describe relativistic corrections
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | krel | |||
integer, | intent(in) | :: | irm | |||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(inout), | dimension (:), allocatable | :: | zrel |
atomic number (cast integer) |
|
integer, | intent(inout), | dimension (:), allocatable | :: | jwsrel |
index of the WS radius |
|
integer, | intent(inout), | dimension (:), allocatable | :: | irshift |
shift of the REL radial mesh with respect no NREL |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | vtrel |
potential (spherical part) |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | btrel |
magnetic field |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rmrel |
radial mesh |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | drdirel |
derivative of radial mesh |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | r2drdirel |
r**2 * drdi |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | qmgam | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | qmgamtab | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | qmphitab | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | qmtettab |
subroutine handling the allocation/deallocation of arrays that describe relativistic transformations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | lmmaxd | |||
integer, | intent(inout), | dimension (:, :), allocatable | :: | nrrel | ||
integer, | intent(inout), | dimension (:, :, :), allocatable | :: | irrel | ||
complex(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rc |
NREL REAL spher. harm. > CMPLX. spher. harm. NREL CMPLX. spher. harm. > REAL spher. harm. |
|
complex(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | crel |
Non-relat. CMPLX. spher. harm. > (kappa,mue) (kappa,mue) > non-relat. CMPLX. spher. harm. |
|
complex(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rrel |
Non-relat. REAL spher. harm. > (kappa,mue) (kappa,mue) > non-relat. REAL spher. harm. |
|
complex(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | srrel |
subroutine handling the allocation/deallocation of arrays that describe clusters
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | lmax |
Maximum l component in wave function expansion |
||
integer, | intent(in) | :: | ncleb | |||
integer, | intent(in) | :: | nclsd | |||
integer, | intent(in) | :: | nembd1 | |||
integer, | intent(in) | :: | nsheld | |||
integer, | intent(in) | :: | naclsd | |||
integer, | intent(in) | :: | lmpot | |||
integer, | intent(in) | :: | natomimpd | |||
integer, | intent(inout), | dimension (:), allocatable | :: | nsh1 |
Corresponding index of the sites I/J in (NSH1/2) in the unit cell in a shell |
|
integer, | intent(inout), | dimension (:), allocatable | :: | nsh2 |
Corresponding index of the sites I/J in (NSH1/2) in the unit cell in a shell |
|
integer, | intent(inout), | dimension (:), allocatable | :: | nacls |
Number of atoms in cluster |
|
integer, | intent(inout), | dimension (:), allocatable | :: | nshell |
Index of atoms/pairs per shell (ij-pairs); nshell(0) = number of shells |
|
integer, | intent(inout), | dimension (:), allocatable | :: | atomimp | ||
integer, | intent(inout), | dimension (:, :), allocatable | :: | atom |
Atom at site in cluster |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | ezoa |
EZ of atom at site in cluster |
|
integer, | intent(inout), | dimension (:, :), allocatable | :: | icleb |
Pointer array |
|
integer, | intent(inout), | dimension (:, :, :), allocatable | :: | jend |
Pointer array for icleb() |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | ratom | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rclsimp | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | cmomhost |
Charge moments of each atom of the (left/right) host |
|
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | rcls |
Real space position of atom in cluster |
subroutine handling the allocation/deallocation of arrays that describe the functions for the expansion of the Green function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | lm2d | |||
integer, | intent(in) | :: | irid | |||
integer, | intent(in) | :: | nfund | |||
integer, | intent(in) | :: | ntotd | |||
integer, | intent(in) | :: | ncleb | |||
integer, | intent(in) | :: | lassld | |||
integer, | intent(in) | :: | ncelld | |||
integer, | intent(in) | :: | nchebd | |||
integer, | intent(inout), | dimension (:), allocatable | :: | loflm |
l of lm=(l,m) (GAUNT) |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | wg |
Integr. weights for Legendre polynomials |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | cleb |
GAUNT coefficients (GAUNT) |
|
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | yrg |
Spherical harmonics (GAUNT2) |
|
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | thetas |
shape function THETA=0 outer space THETA =1 inside WS cell in spherical harmonics expansion |
|
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | thetasnew |
subroutine handling the allocation/deallocation of arrays that describe the integration mesh
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | irm | |||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | a |
Constants for exponential R mesh |
|
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | b | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rmesh |
Radial mesh ( in units a Bohr) |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | drdi |
Derivative dr/di |
subroutine handling the allocation/deallocation of arrays that describe the panels
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(in) | :: | ntotd |
IPAND+30 |
||
integer, | intent(inout), | dimension (:), allocatable | :: | ipan |
Number of panels in non-MT-region |
|
integer, | intent(inout), | dimension (:), allocatable | :: | npan_tot | ||
integer, | intent(inout), | dimension (:), allocatable | :: | npan_eq_at | ||
integer, | intent(inout), | dimension (:), allocatable | :: | npan_log_at | ||
integer, | intent(inout), | dimension (:, :), allocatable | :: | ipan_intervall | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rpan_intervall |
subroutine handling the allocation/deallocation of misc arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | nr | |||
integer, | intent(in) | :: | irm | |||
integer, | intent(in) | :: | irid | |||
integer, | intent(in) | :: | lmax |
Maximum l component in wave function expansion |
||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | natyp |
number of kinds of atoms in unit cell |
||
integer, | intent(in) | :: | nfund | |||
integer, | intent(in) | :: | nrefd | |||
integer, | intent(in) | :: | iemxd | |||
integer, | intent(in) | :: | ntotd | |||
integer, | intent(in) | :: | nsheld | |||
integer, | intent(in) | :: | lmmaxd | |||
integer, | intent(in) | :: | nembd1 | |||
integer, | intent(in) | :: | nchebd | |||
integer, | intent(in) | :: | ncelld | |||
integer, | intent(in) | :: | lmxspd | |||
integer, | intent(in) | :: | nspindd | |||
integer, | intent(in) | :: | nsymaxd | |||
integer, | intent(in) | :: | nprincd | |||
integer, | intent(inout), | dimension (:, :), allocatable | :: | ifunm | ||
integer, | intent(inout), | dimension (:, :), allocatable | :: | ifunm1 | ||
integer, | intent(inout), | dimension (:, :), allocatable | :: | icheck | ||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | vref | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | s | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rr |
Set of real space vectors (in a.u.) |
|
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | dror | ||
real(kind=dp), | intent(inout), | dimension (:, :), allocatable | :: | rnew | ||
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | rs | ||
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | rrot | ||
real(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | thesme | ||
complex(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | dsymll | ||
complex(kind=dp), | intent(inout), | dimension (:, :, :), allocatable | :: | dsymll1 | ||
complex(kind=dp), | intent(inout), | dimension (:, :, :, :, :), allocatable | :: | lefttinvll | ||
complex(kind=dp), | intent(inout), | dimension (:, :, :, :, :), allocatable | :: | righttinvll |
subroutine handling the allocation/deallocation of arrays handling the Green functions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | flag | |||
integer, | intent(in) | :: | naez |
number of atoms in unit cell |
||
integer, | intent(in) | :: | iemxd | |||
integer, | intent(in) | :: | ngshd | |||
integer, | intent(in) | :: | nsheld | |||
integer, | intent(in) | :: | lmpot | |||
integer, | intent(in) | :: | nofgijd | |||
integer, | intent(inout), | dimension (:,:), allocatable | :: | ish | ||
integer, | intent(inout), | dimension (:,:), allocatable | :: | jsh | ||
integer, | intent(inout), | dimension (:), allocatable | :: | kmesh | ||
integer, | intent(inout), | dimension (:), allocatable | :: | imaxsh | ||
integer, | intent(inout), | dimension (:), allocatable | :: | iqcalc | ||
integer, | intent(inout), | dimension (:), allocatable | :: | iofgij |
Linear pointers, similar to NSH1/NSH2 but giving the actual index of sites I,J = 1,NATOMIMP in the cluster |
|
integer, | intent(inout), | dimension (:), allocatable | :: | jofgij |
Linear pointers, similar to NSH1/NSH2 but giving the actual index of sites I,J = 1,NATOMIMP in the cluster |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ijtabsh |
Linear pointer, assigns pair (i,j) to a shell in the array GS(,,*,NSHELD) |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ijtabsym |
Linear pointer, assigns pair (i,j) to the rotation bringing GS into Gij |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ijtabcalc |
Linear pointer,specifying whether the block (i,j) has to be calculated needs set up for ICC=-1, not used for ICC=1 |
|
integer, | intent(inout), | dimension (:), allocatable | :: | ijtabcalc_i | ||
integer, | intent(inout), | dimension (:,:), allocatable | :: | ilm_map | ||
real(kind=dp), | intent(inout), | dimension (:), allocatable | :: | gsh |